diff options
Diffstat (limited to 'MLEB/Translate/resources/js/ext.translate.edit.documentation.js')
-rw-r--r-- | MLEB/Translate/resources/js/ext.translate.edit.documentation.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MLEB/Translate/resources/js/ext.translate.edit.documentation.js b/MLEB/Translate/resources/js/ext.translate.edit.documentation.js index 6404cbb9..45bcc6e7 100644 --- a/MLEB/Translate/resources/js/ext.translate.edit.documentation.js +++ b/MLEB/Translate/resources/js/ext.translate.edit.documentation.js @@ -17,6 +17,15 @@ $( 'body' ).append( windowManager.$element ); windowManager.addWindows( [ warningDialog ] ); + // TODO load ext.translate.ve unconditionally after 1.39 release: T295203 + // (see gerrit I7a55a09514110fa7d290d6f03ce9c0b7962c9140; this should be + // loaded from extension.json, not from here) + if ( mw.config.get( 'wgVersion' ) >= '1.38' ) { + mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () { + mw.libs.ve.targetLoader.addPlugin( 'ext.translate.ve' ); + } ); + } + $( function () { mw.hook( 've.activationComplete' ).add( function () { // eslint-disable-next-line no-undef |