Merge "Don't depend on captcha extension messages in ext.visualEditor.mwcore module"

This commit is contained in:
jenkins-bot 2016-07-27 16:35:52 +00:00 committed by Gerrit Code Review
commit 8bbfeb08b9
2 changed files with 23 additions and 6 deletions

View file

@ -747,6 +747,27 @@ class VisualEditorHooks {
] ] );
}
$extensionMessages = [];
if ( class_exists( 'ConfirmEditHooks' ) ) {
$extensionMessages[] = 'captcha-edit';
$extensionMessages[] = 'captcha-label';
if ( class_exists( 'QuestyCaptcha' ) ) {
$extensionMessages[] = 'questycaptcha-edit';
}
if ( class_exists( 'FancyCaptcha' ) ) {
$extensionMessages[] = 'fancycaptcha-edit';
$extensionMessages[] = 'fancycaptcha-reload-text';
}
}
$resourceLoader->register( [
'ext.visualEditor.mwextensionmessages' => $veResourceTemplate + [
'messages' => $extensionMessages,
'targets' => [ 'desktop', 'mobile' ],
]
] );
return true;
}

View file

@ -1179,17 +1179,13 @@
"mediawiki.skinning.content.parsoid",
"mediawiki.widgets",
"ext.visualEditor.switching",
"ext.visualEditor.welcome"
"ext.visualEditor.welcome",
"ext.visualEditor.mwextensionmessages"
],
"messages": [
"captcha-edit",
"captcha-label",
"colon-separator",
"fancycaptcha-edit",
"fancycaptcha-reload-text",
"hidetoc",
"ooui-dialog-process-continue",
"questycaptcha-edit",
"showtoc",
"summary-preview",
"toc",