MediaWiki:Gadget-TranslationAdder.js/documentation

Documentation for MediaWiki:Gadget-TranslationAdder.js. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.

Uses data in MediaWiki:Gadget-TranslationAdder-Data.js.

Todo

How to edit the code and test

Disable the gadget "Enable the buttons that allow editing of translation tables on by default" in Special:Preferences#mw-prefsection-gadgets. Make an editable version by copying the code in MediaWiki:Gadget-TranslationAdder.js to User:YourNameHere/scripts/TranslationAdder.js. (Put your name in place of YourNameHere and change the page name however you want.) Run this editable version by putting this code in Special:MyPage/common.js:

// This array of dependencies comes from [[MediaWiki:Gadgets-definition]].
// If the list of dependencies changes, copy the text after dependencies=
// for TranslationAdder and run console.log(JSON.stringify("paste dependencies here".split(/, ?/)))
// in your browser's JavaScript console. Put the resulting array as the first argument to mw.loader.using.
mw.loader.using(["ext.gadget.Editor","ext.gadget.LegacyScriptsNewNode","mediawiki.cookie","ext.gadget.LanguageUtils","mediawiki.util","ext.gadget.TranslationAdder-Data"],
function() {
	importScript('User:YourNameHere/scripts/TranslationAdder.js');
});

Edit and see if you can make any improvements.