Merge "Fix tab messages being changed wrong by JavaScript"

This commit is contained in:
jenkins-bot 2022-06-13 21:15:09 +00:00 committed by Gerrit Code Review
commit d7140912c7
3 changed files with 7 additions and 10 deletions

View file

@ -414,11 +414,6 @@
"messages": [ "messages": [
"accesskey-ca-editsource", "accesskey-ca-editsource",
"accesskey-ca-ve-edit", "accesskey-ca-ve-edit",
"create",
"create-local",
"edit",
"edit-local",
"editsection",
"pipe-separator", "pipe-separator",
"postedit-confirmation-created", "postedit-confirmation-created",
"postedit-confirmation-published", "postedit-confirmation-published",
@ -427,8 +422,7 @@
"tooltip-ca-createsource", "tooltip-ca-createsource",
"tooltip-ca-edit", "tooltip-ca-edit",
"tooltip-ca-editsource", "tooltip-ca-editsource",
"tooltip-ca-ve-edit", "tooltip-ca-ve-edit"
"visualeditor-ca-editsource-section"
] ]
}, },
"ext.visualEditor.desktopArticleTarget.noscript": { "ext.visualEditor.desktopArticleTarget.noscript": {

View file

@ -34,8 +34,11 @@ class VisualEditorDesktopArticleTargetInitModule extends FileModule {
// Check the localisation cache for which skins have a custom message for this. // 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 // We only need this for the current skin, but ResourceLoader's message cache
// does not fragment by skin. // 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 // Messages: vector-view-edit, vector-view-create
// Disable database lookups for site-level message overrides as they // Disable database lookups for site-level message overrides as they
// are expensive and not needed here (T221294). We only care whether the // are expensive and not needed here (T221294). We only care whether the

View file

@ -323,7 +323,7 @@
// * vector-view-create // * vector-view-create
// * messages for other skins // * messages for other skins
if ( !mw.message( tabMsgKey ).exists() ) { if ( !mw.message( tabMsgKey ).exists() ) {
tabMsgKey = key; tabMsgKey = 'skin-view-' + key;
} }
} }
return mw.msg( tabMsgKey ); return mw.msg( tabMsgKey );