Bidi-embed user names and page names in secondary links

Bug: T127407
Change-Id: I50c0363aee2e1f985c5920f869f11675992ecb10
This commit is contained in:
Roan Kattouw 2016-02-29 12:48:11 -08:00
parent a42869d2de
commit 08a3a92794

View file

@ -406,7 +406,7 @@ abstract class EchoEventPresentationModel implements JsonSerializable {
return array( return array(
'url' => $url, 'url' => $url,
'label' => $truncatedLabel, 'label' => $this->language->embedBidi( $truncatedLabel ),
'tooltip' => $isTruncated ? $label : '', 'tooltip' => $isTruncated ? $label : '',
'description' => '', 'description' => '',
'icon' => 'userAvatar', 'icon' => 'userAvatar',
@ -429,9 +429,12 @@ abstract class EchoEventPresentationModel implements JsonSerializable {
} else { } else {
$icon = 'article'; $icon = 'article';
} }
return array( return array(
'url' => $title->getFullURL( $query ), 'url' => $title->getFullURL( $query ),
'label' => $this->language->truncate( $title->getText(), self::PAGE_NAME_AS_LABEL_RECOMMENDED_LENGTH ), 'label' => $this->language->embedBidi(
$this->language->truncate( $title->getText(), self::PAGE_NAME_AS_LABEL_RECOMMENDED_LENGTH )
),
'tooltip' => $title->getPrefixedText(), 'tooltip' => $title->getPrefixedText(),
'description' => $description, 'description' => $description,
'icon' => $icon, 'icon' => $icon,