mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Merge "Fix tab messages being changed wrong by JavaScript"
This commit is contained in:
commit
d7140912c7
|
@ -414,11 +414,6 @@
|
|||
"messages": [
|
||||
"accesskey-ca-editsource",
|
||||
"accesskey-ca-ve-edit",
|
||||
"create",
|
||||
"create-local",
|
||||
"edit",
|
||||
"edit-local",
|
||||
"editsection",
|
||||
"pipe-separator",
|
||||
"postedit-confirmation-created",
|
||||
"postedit-confirmation-published",
|
||||
|
@ -427,8 +422,7 @@
|
|||
"tooltip-ca-createsource",
|
||||
"tooltip-ca-edit",
|
||||
"tooltip-ca-editsource",
|
||||
"tooltip-ca-ve-edit",
|
||||
"visualeditor-ca-editsource-section"
|
||||
"tooltip-ca-ve-edit"
|
||||
]
|
||||
},
|
||||
"ext.visualEditor.desktopArticleTarget.noscript": {
|
||||
|
|
|
@ -34,8 +34,11 @@ class VisualEditorDesktopArticleTargetInitModule extends FileModule {
|
|||
// Check the localisation cache for which skins have a custom message for this.
|
||||
// We only need this for the current skin, but ResourceLoader's message cache
|
||||
// does not fragment by skin.
|
||||
foreach ( $services->getSkinFactory()->getSkinNames() as $skname => $unused ) {
|
||||
foreach ( [ 'edit', 'create' ] as $msgKey ) {
|
||||
foreach ( [ 'edit', 'create' ] as $msgKey ) {
|
||||
// MediaWiki defaults
|
||||
$messages[] = "skin-view-$msgKey";
|
||||
foreach ( $services->getSkinFactory()->getSkinNames() as $skname => $unused ) {
|
||||
// Per-skin overrides
|
||||
// Messages: vector-view-edit, vector-view-create
|
||||
// Disable database lookups for site-level message overrides as they
|
||||
// are expensive and not needed here (T221294). We only care whether the
|
||||
|
|
|
@ -323,7 +323,7 @@
|
|||
// * vector-view-create
|
||||
// * messages for other skins
|
||||
if ( !mw.message( tabMsgKey ).exists() ) {
|
||||
tabMsgKey = key;
|
||||
tabMsgKey = 'skin-view-' + key;
|
||||
}
|
||||
}
|
||||
return mw.msg( tabMsgKey );
|
||||
|
|
Loading…
Reference in a new issue