Provide messages through skin options

Bug: T259664
Depends-On: Ie52aadd6b7de8c4db66de662f2f03e295c29034d
Change-Id: Ib03c0683aa00d334224e7b3507098dedcc848e44
This commit is contained in:
mainframe98 2020-08-05 10:22:22 +02:00
parent 05a82f6069
commit ddc32a5833
2 changed files with 8 additions and 8 deletions

View file

@ -126,26 +126,18 @@ class SkinVector extends SkinMustache {
// Remember that the string '0' is a valid title.
// From OutputPage::getPageTitle, via ::setPageTitle().
'html-title' => $out->getPageTitle(),
'msg-tagline' => $skin->msg( 'tagline' )->text(),
'html-newtalk' => $newTalksHtml ? '<div class="usermessage">' . $newTalksHtml . '</div>' : '',
'msg-vector-jumptonavigation' => $skin->msg( 'vector-jumptonavigation' )->text(),
'msg-vector-jumptosearch' => $skin->msg( 'vector-jumptosearch' )->text(),
'html-categories' => $skin->getCategories(),
'data-footer' => $this->getFooterData(),
'html-navigation-heading' => $skin->msg( 'navigation-heading' ),
// Header
'data-logos' => ResourceLoaderSkinModule::getAvailableLogos( $this->getConfig() ),
'msg-sitetitle' => $skin->msg( 'sitetitle' )->text(),
'msg-sitesubtitle' => $skin->msg( 'sitesubtitle' )->text(),
'main-page-href' => $mainPageHref,
'data-sidebar' => $this->buildSidebar(),
'sidebar-visible' => $this->isSidebarVisible(),
'msg-vector-action-toggle-sidebar' => $skin->msg( 'vector-action-toggle-sidebar' )->text(),
] + $this->getMenuProps();
if ( $skin->getUser()->isLoggedIn() ) {

View file

@ -28,6 +28,14 @@
"skins.vector.styles",
"mediawiki.ui.icon",
"skins.vector.icons"
],
"messages": [
"vector-action-toggle-sidebar",
"vector-jumptonavigation",
"vector-jumptosearch",
"sitesubtitle",
"sitetitle",
"tagline"
]
}
]