Le 21/12/2016 à 10:09, mathieu stumpf guntz a écrit :
Hello everybody,
Following the suggestion of Andre Klapper https://phabricator.wikimedia.org/T150933#2886290, I'm turning to this set of lists to see if it can attract more feedback on the topic of internationalized programming facilities within WM environment https://phabricator.wikimedia.org/T150933.
As described more extensively in the ticket,the idea is to implement internationalization facilities (if they don't exist yet) in compilers used in the WM infrastructure, and enable contributors to localize them (possibly through Translatewiki), and then let them use localized versions if they wish.
Please let me know if you need more details or if you have any question. You can answer on the list or on phabricator, as you wish.
Hello,
The summary of the tasks is to provide some wrapper so one can code in its native language. The main examples would be the LUA language used for templating module on wiki and JavaScript for gadgets.
Thus a French developer could instead of writing LUA code:
local p = {}
function p.hello( frame ) return "Hello, world!" end
return p
Be able to write in its local language:
locale p = {}
fonction p.bonjour( cadre ) retourne "Bonjour à tous!" fin
retourne p
A task mentioned http://www.babylscript.com/ for which Mathieu is listed as the Esperanto maintainer. The system as a mapping of translation.
I like the idea, but that looks like a very huge effort which not really fit in Wikimedia movement goal (sharing knowledge). Though I have sympathy with the underlying idea of making software development accessible to non English speakers.
A few issues:
For both LUA Modules and Javascript gadgets, we would have to make the related MediaWiki components to have their whole API to be translated. So that in a Gadget instead of doing:
mw.loader.using(['mediawiki.util', 'mediawiki.notify']).then ( function () { function liveClock() { mw.util.addCSS( '#utcdate a { font-size: 120%; } } } $( liveClock ); } )
A french developer would do:
mw.chargeur.utilisant(['mediawiki.outil', 'mediawiki.annonce']).alors {
fonction () { fonction horloge() { mw.outil.ajoutFSC( '#dateTUC e { 'fontes-taille: 120%; } } } $( horloge() ); } )
(Example taken from mediawiki.org Gadget-UTCLiveClock.js)
You can see a few renames, some could be done, others are quite challenging:
* mediawiki.util get renamed to mediawiki.outil * then changed to alors * CSS translated to FSC which has absolutely no sense :D * the HTML element A (anchor) renamed to E (encre) * A CSS identifier that is changing from #utcdate to #dateTUC * The invalid CSS 'fontes-taille'
etc...
Again I appreciate the idea, but I don't think it is technically doable or worth pursuing. Not to mention that it will be very challenging to debug whenever some code has bug and the issue is referred to more knowledgable developers that happens to not know french or esperanto.