Cleanup: Standardise msg keys

Keys prefixed with msg- should relate to i18n keys. Fix the existing
template variables where that's not the case.

Change-Id: I33587a09a9803a3667eaeea95ce3e1753439f413
This commit is contained in:
jdlrobson 2020-06-01 12:28:51 -07:00 committed by Jdlrobson
parent a4a3c17a99
commit e84809c44b
5 changed files with 17 additions and 17 deletions

View File

@ -167,8 +167,8 @@ class VectorTemplate extends BaseTemplate {
// From Skin::getNewtalks(). Always returns string, cast to null if empty.
'html-newtalk' => $skin->getNewtalks() ?: null,
'msg-jumptonavigation' => $this->msg( 'vector-jumptonavigation' )->text(),
'msg-jumptosearch' => $this->msg( 'vector-jumptosearch' )->text(),
'msg-vector-jumptonavigation' => $this->msg( 'vector-jumptonavigation' )->text(),
'msg-vector-jumptosearch' => $this->msg( 'vector-jumptosearch' )->text(),
// Result of OutputPage::addHTML calls
'html-bodycontent' => $this->get( 'bodycontent' ),
@ -371,7 +371,7 @@ class VectorTemplate extends BaseTemplate {
),
'array-portals-rest' => array_slice( $props, 1 ),
'data-portals-first' => $firstPortal,
'msg-toggle-sidebar-button-label' => $this->msg( 'vector-action-toggle-sidebar' )->text(),
'msg-vector-action-toggle-sidebar' => $this->msg( 'vector-action-toggle-sidebar' )->text(),
// [todo] fetch user preference when logged in (T246427).
'sidebar-visible' => false
];

View File

@ -7,7 +7,7 @@
MenuDefinition data-portals-first
MenuDefinition[] array-portals-rest
emphasized-sidebar-action data-emphasized-sidebar-action For displaying an emphasized action in the sidebar.
string msg-toggle-sidebar-button-label The label used by the sidebar button.
string msg-vector-action-toggle-sidebar The label used by the sidebar button.
boolean sidebar-visible For users that want to see the sidebar on initial render, this should be
true.
}}
@ -31,7 +31,7 @@
"
for="mw-sidebar-checkbox"
data-event-name="ui.sidebar">
{{msg-toggle-sidebar-button-label}}
{{msg-vector-action-toggle-sidebar}}
</label>
<div id="mw-panel" class="mw-sidebar mw-checkbox-hack-target">
{{#data-portals-first}}{{>Menu}}{{/data-portals-first}}

View File

@ -13,8 +13,8 @@
string html-subtitle
string html-undelete
string html-newtalk
string msg-jumptonavigation
string msg-jumptosearch
string msg-vector-jumptonavigation
string msg-vector-jumptosearch
string html-bodycontent
string html-printfooter
string html-catlinks
@ -55,8 +55,8 @@
using this place to insert extra elements before.
}}
<div id="jump-to-nav"></div>
<a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a>
<a class="mw-jump-link" href="#p-search">{{msg-jumptosearch}}</a>
<a class="mw-jump-link" href="#mw-head">{{msg-vector-jumptonavigation}}</a>
<a class="mw-jump-link" href="#p-search">{{msg-vector-jumptosearch}}</a>
{{{html-bodycontent}}}
{{#html-printfooter}}
<div class="printfooter">{{{html-printfooter}}}</div>

View File

@ -13,8 +13,8 @@
string html-subtitle
string html-undelete
string html-newtalk
string msg-jumptonavigation
string msg-jumptosearch
string msg-vector-jumptonavigation
string msg-vector-jumptosearch
string html-bodycontent
string html-printfooter
string html-catlinks
@ -57,8 +57,8 @@
using this place to insert extra elements before.
}}
<div id="jump-to-nav"></div>
<a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a>
<a class="mw-jump-link" href="#p-search">{{msg-jumptosearch}}</a>
<a class="mw-jump-link" href="#mw-head">{{msg-vector-jumptonavigation}}</a>
<a class="mw-jump-link" href="#p-search">{{msg-vector-jumptosearch}}</a>
{{{html-bodycontent}}}
{{#html-printfooter}}
<div class="printfooter">{{{html-printfooter}}}</div>

View File

@ -75,8 +75,8 @@ export const LEGACY_TEMPLATE_DATA = {
'page-isarticle': true,
'msg-tagline': 'From Wikipedia, the free encyclopedia',
'html-userlangattributes': htmluserlangattributes,
'msg-jumptonavigation': 'Jump to navigation',
'msg-jumptosearch': 'Jump to search',
'msg-vector-jumptonavigation': 'Jump to navigation',
'msg-vector-jumptosearch': 'Jump to search',
// site specific
'data-footer': FOOTER_TEMPLATE_DATA,
@ -99,8 +99,8 @@ export const MODERN_TEMPLATE_DATA = {
'page-isarticle': true,
'msg-tagline': 'From Wikipedia, the free encyclopedia',
'html-userlangattributes': htmluserlangattributes,
'msg-jumptonavigation': 'Jump to navigation',
'msg-jumptosearch': 'Jump to search',
'msg-vector-jumptonavigation': 'Jump to navigation',
'msg-vector-jumptosearch': 'Jump to search',
// site specific
'data-footer': FOOTER_TEMPLATE_DATA,