Refactor: All messages should be listed from skin.json
This allows us easily to identify in templates what messages are used and where, as well as allow us an easy way to tell when messages are no longer being used. Change-Id: I610224d551ebea54ae32e9e79901befe80cfd5ce
This commit is contained in:
parent
fe4526e125
commit
5ac25943a2
|
@ -130,7 +130,6 @@ class SkinVector extends SkinMustache {
|
|||
|
||||
'html-categories' => $skin->getCategories(),
|
||||
'data-footer' => $this->getFooterData(),
|
||||
'html-navigation-heading' => $skin->msg( 'navigation-heading' ),
|
||||
'is-search-in-header' => $this->getConfig()->get( Constants::CONFIG_SEARCH_IN_HEADER ),
|
||||
|
||||
// Header
|
||||
|
@ -149,8 +148,6 @@ class SkinVector extends SkinMustache {
|
|||
false,
|
||||
'mw-prefsection-rendering-skin-skin-prefs'
|
||||
)->getLinkURL( 'wprov=' . self::OPT_OUT_LINK_TRACKING_CODE ),
|
||||
'text' => $skin->msg( 'vector-opt-out' )->text(),
|
||||
'title' => $skin->msg( 'vector-opt-out-tooltip' )->text(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
{{#data-portals-first}}{{>Menu}}{{/data-portals-first}}
|
||||
{{#data-emphasized-sidebar-action}}
|
||||
<div class="mw-sidebar-action">
|
||||
<a class="mw-sidebar-action-link" title="{{title}}" href="{{href}}">{{text}}</a>
|
||||
<a class="mw-sidebar-action-link" title="{{msg-vector-opt-out-tooltip}}"
|
||||
href="{{href}}">{{msg-vector-opt-out}}</a>
|
||||
</div>
|
||||
{{/data-emphasized-sidebar-action}}
|
||||
{{#array-portals-rest}}{{>Menu}}{{/array-portals-rest}}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
string html-body-content
|
||||
string html-categories
|
||||
string html-after-content
|
||||
string html-navigation-heading heading for entire navigation that is
|
||||
string msg-navigation-heading heading for entire navigation that is
|
||||
usually hidden to screen readers
|
||||
MenuDefinition data-personal-menu
|
||||
MenuDefinition data-namespace-tabs
|
||||
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
{{{html-after-content}}}
|
||||
<div id="mw-navigation">
|
||||
<h2>{{{html-navigation-heading}}}</h2>
|
||||
<h2>{{msg-navigation-heading}}</h2>
|
||||
<div id="mw-head">
|
||||
{{#data-personal-menu}}{{>Menu}}{{/data-personal-menu}}
|
||||
<div id="left-navigation">
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
string html-body-content
|
||||
string html-categories
|
||||
string html-after-content
|
||||
string html-navigation-heading heading for entire navigation that is usually hidden to screen
|
||||
readers
|
||||
string msg-navigation-heading
|
||||
LogoOptions data-logos
|
||||
MenuDefinition data-personal-menu
|
||||
MenuDefinition data-namespace-tabs
|
||||
|
@ -92,7 +91,7 @@
|
|||
</header>
|
||||
|
||||
<div id="mw-navigation">
|
||||
<h2>{{{html-navigation-heading}}}</h2>
|
||||
<h2>{{{msg-navigation-heading}}}</h2>
|
||||
<div id="mw-head">
|
||||
{{^is-search-in-header}}
|
||||
{{#data-personal-menu}}{{>Menu}}{{/data-personal-menu}}
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
"mediawiki.ui.icon"
|
||||
],
|
||||
"messages": [
|
||||
"vector-opt-out-tooltip",
|
||||
"vector-opt-out",
|
||||
"navigation-heading",
|
||||
"vector-action-toggle-sidebar",
|
||||
"vector-jumptonavigation",
|
||||
"vector-jumptosearch",
|
||||
|
|
|
@ -24,8 +24,8 @@ export const SIDEBAR_DATA = {
|
|||
'data-portals-first': PORTALS.navigation,
|
||||
'data-emphasized-sidebar-action': {
|
||||
href: '#',
|
||||
text: 'Switch to old look',
|
||||
title: 'Change your settings to go back to the old look of the skin (legacy Vector)'
|
||||
'msg-vector-opt-out': 'Switch to old look',
|
||||
'msg-vector-opt-out-tooltip': 'Change your settings to go back to the old look of the skin (legacy Vector)'
|
||||
},
|
||||
'array-portals-rest': [
|
||||
PORTALS.toolbox,
|
||||
|
|
|
@ -24,7 +24,7 @@ export const NAVIGATION_TEMPLATE_DATA = {
|
|||
'data-variants': variantsData,
|
||||
'data-search-box': searchBoxData,
|
||||
'data-sidebar': SIDEBAR_DATA.withPortalsAndOptOut,
|
||||
'html-navigation-heading': 'Navigation menu',
|
||||
'msg-navigation-heading': 'Navigation menu',
|
||||
'html-logo-attributes': `class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"`
|
||||
},
|
||||
loggedOutWithVariants: {
|
||||
|
@ -34,7 +34,7 @@ export const NAVIGATION_TEMPLATE_DATA = {
|
|||
'data-variants': variantsData,
|
||||
'data-search-box': searchBoxData,
|
||||
'data-sidebar': SIDEBAR_DATA.withPortals,
|
||||
'html-navigation-heading': 'Navigation menu',
|
||||
'msg-navigation-heading': 'Navigation menu',
|
||||
'html-logo-attributes': `class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"`
|
||||
},
|
||||
loggedInWithMoreActions: {
|
||||
|
@ -44,7 +44,7 @@ export const NAVIGATION_TEMPLATE_DATA = {
|
|||
'data-page-actions-more': moreData,
|
||||
'data-search-box': searchBoxData,
|
||||
'data-sidebar': SIDEBAR_DATA.withPortals,
|
||||
'html-navigation-heading': 'Navigation menu',
|
||||
'msg-navigation-heading': 'Navigation menu',
|
||||
'html-logo-attributes': `class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"`
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue