Merge "The label of the language button refers to the number of languages"
This commit is contained in:
commit
497b0aad8a
|
@ -11,6 +11,7 @@
|
|||
"vector.css": "/* All CSS here will be loaded for users of the Vector skin */",
|
||||
"vector.js": "/* All JavaScript here will be loaded for users of the Vector skin */",
|
||||
"vector-action-toggle-sidebar": "Toggle sidebar",
|
||||
"vector-language-button-label": "{{PLURAL:$1|$1 language|$1 languages}}",
|
||||
"vector-action-addsection": "Add topic",
|
||||
"vector-action-delete": "Delete",
|
||||
"vector-action-move": "Move",
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"vector.css": "{{optional}}",
|
||||
"vector.js": "{{optional}}",
|
||||
"vector-action-toggle-sidebar": "Accessibility label for the button that toggles the sidebar's visibility, as well as audible presentation for screen readers.",
|
||||
"vector-language-button-label": "Label for language button in modern Vector.\nArguments:\n - $1 number of languages, supports plural",
|
||||
"vector-action-addsection": "Used in the Vector skin. See for example {{canonicalurl:Talk:Main_Page|useskin=vector}}\n{{Identical|Add topic}}",
|
||||
"vector-action-delete": "Used in the Vector skin, as the name of a tab at the top of the page. See for example {{canonicalurl:Translating:MediaWiki|useskin=vector}}\n\n{{Identical|Delete}}",
|
||||
"vector-action-move": "Used in the Vector skin, on the tabs at the top of the page. See for example {{canonicalurl:Talk:Main_Page|useskin=vector}}\n\n{{Identical|Move}}",
|
||||
|
|
|
@ -231,6 +231,12 @@ class SkinVector extends SkinMustache {
|
|||
self::MENU_TYPE_PORTAL => 'vector-menu vector-menu-portal portal',
|
||||
self::MENU_TYPE_DEFAULT => 'vector-menu',
|
||||
];
|
||||
if ( $portletData['id'] === 'p-lang' && $this->isLanguagesInHeader() ) {
|
||||
$portletData['label'] = $this->msg(
|
||||
'vector-language-button-label',
|
||||
count( $this->getLanguages() )
|
||||
)->parse();
|
||||
}
|
||||
$class = $portletData['class'];
|
||||
$portletData['class'] = trim( "$class $extraClasses[$type]" );
|
||||
return $portletData;
|
||||
|
|
Loading…
Reference in New Issue