diff --git a/i18n/en.json b/i18n/en.json index 35de53c..5a14723 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -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", diff --git a/i18n/qqq.json b/i18n/qqq.json index fb57216..e7bb330 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -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}}", diff --git a/includes/SkinVector.php b/includes/SkinVector.php index dbfae39..6d2812d 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -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;