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": [
"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": {

View file

@ -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 ) {
// 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

View file

@ -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 );