« MediaWiki:Scribunto/Central modules reference manual » : différence entre les versions

Contenu supprimé Contenu ajouté
update Central modules in brief
CentralManual shorter sections titles for better look 20190122.xml
 
Ligne 1 :
<!-- CentralManual.xml
Save as CentralManual.xml CentralManual Beginupdate S190128rlvCentral args_knownmodules toin known_argumentsbrief 2018122120190114.xml
-------------------------|------------------------ typical length --------------------------|----------max| DODO
end -- res = res .. p.init_central_module(frame, mode_name, known_arguments, options_for_modes, QITEM) replaces function Central.init(...
Ligne 53 :
 
=== Central modules in brief ===
<br>In 2019, they are multi languages using i18n translations tables for each language.
<br>They are also multi languages as able to use in one run the content language, the page language and the user langage.
<br>They are multi wikis using the future Phabricator task [[phab:T121470|T121470]] "Begin T121470 Central Global Repository for Templates, Lua modules, and Gadgets"
Ligne 70 :
 
=== Why central modules ===
<br>Current modules are made for one wiki and one language. They need Lua-coders to translate and adapt them for another wiki or language.
<br>Errors in them are corrected in one wiki/language but continue in others.
<br>Small wikis do not have Lua-coders to translate them and can not use them.
Ligne 400 :
* The <code>tests</code> option asks to display the tests part of the result, after boxes to view and <code>notests</code> to mask it. That include <code>viewers.doc_page</code>, <code>viewers.doc_module</code> and <code>viewers.doc_internal</code>.
 
=== Arguments: their processProcess and translations of arguments ===
The main module defines all arguments, and all must have translations in all available languages.
<br><code>modes.args_source</code>: The source arguments come from template, else from #invoke, for each argument.
Ligne 465 :
{{Central|doc|dockey=tools_known_arguments_structure_title|docitem=Q535}}<!---->
 
=== Arguments from template to configure supports ===
They drive directly supports aspects, without translations, examples:
<source lang=lua>
Ligne 515 :
</source><!-- TODOC up to which line has this document been updated? ▼ }} -->
 
=== Translate arguments, errors, categories...types ===
To add a new language, only do add dedicated i18n tables in the main module or the sub-module /I18N.
<br>Proposed method: Include 3 or 4 most used languages in the central module and add some other languages for each case: project + language.