Allow plain text labels in side bar
Follow up to I2549af3e24e5d51c09e9a88ca50a0d9b2e154c3f Bug: T252727 Change-Id: I91e6e535e2da672b41d31cee709084beb87af47a
This commit is contained in:
parent
de788c6446
commit
0846c8463d
@ -454,13 +454,15 @@ class VectorTemplate extends BaseTemplate {
|
||||
];
|
||||
$isPortal = self::MENU_TYPE_PORTAL === $type;
|
||||
|
||||
// For some menu items, there is no language key corresponding with its menu key.
|
||||
// These inconsitencies are captured in MENU_LABEL_KEYS
|
||||
$msgObj = $this->msg( self::MENU_LABEL_KEYS[ $label ] ?? $label );
|
||||
$props = [
|
||||
'id' => "p-$label",
|
||||
'class' => trim( "$class $extraClasses[$type]" ),
|
||||
'label-id' => "p-{$label}-label",
|
||||
// For some menu items, there is no language key corresponding with its menu key.
|
||||
// These inconsitencies are captured in MENU_LABEL_KEYS
|
||||
'label' => $this->msg( self::MENU_LABEL_KEYS[ $label ] ?? $label )->text(),
|
||||
// If no message exists fallback to plain text (T252727)
|
||||
'label' => $msgObj->exists() ? $msgObj->text() : $label,
|
||||
'html-userlangattributes' => $this->get( 'userlangattributes', '' ),
|
||||
'html-items' => '',
|
||||
'is-dropdown' => self::MENU_TYPE_DROPDOWN === $type,
|
||||
|
Loading…
Reference in New Issue
Block a user