Page MenuHomePhabricator

Consolidate and migrate Module namespace to mediawiki.org
Open, Needs TriagePublic

Description

T121470 has been pending since long and a lot needs to be done before it's a reality.

A step in this direction could be to

  • Centralised and migrate module namespace to commons / meta / mediawiki
  • Allow invoking from mediawiki to various Wikipedia
  • Host all modules in mediawiki rather than on various language Wikipedia's.

Eg. Migrate Module:Infobox from all languages to commons. Use Module:Infobox/en, Module:Infobox/hi to code variations to the base module. So when enwiki invokes Module:Infobox it looks for commonsModule:Infobox/en and in its absense commonsModule:Infobox

Another example Module:WikidataIB, there's only 1 developer substantially (of enwiki) and rest of Wikipedia are copy-pasting it. So if something updates on enwiki, it is lagged behind on other wikis due to variation in time of updation.

See https://sa.m.wikipedia.org/wiki/विशेषः:योगदानानि/Capankajsmilyo of 1 November 2018. Just to update Module:WikidataIB, I had to import 9 modules from enwiki viz. Module:Compex_date, Module:I18n/Complex_date, Module:Ordinal, Module:Roman, Module:ISODate, Moduledate18n, Module:I18n/date, Module:Calendar

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 31 2018, 4:23 PM
Ankry awarded a token.Oct 31 2018, 5:16 PM

Please keep in mind that there are not only Wikipedias in various language versions.

There is also Wikisource, Wiktionary, etc.

The implementation of one Infobox module serving all needs of all Wikipedias and Wiktionaries and Wikisources with a slight difference in human language only would surprise me.

In general, only basic functionality is a good candidate for a central module or library (libraries like mw.html or mw.ustring), but project and culture and language and community dependent issues are not.

If the concept of Infobox is addressed to Wikipedias only, what is the advantage to host Infobox/fr on Commons rather than on French Wikipedia? Who will be permitted to modify and adapt which module? On behalf of which community, and with effect on all projects of the same human language?

BTW, the libraries like mw.html permit global access to basic and native functions for a couple of years now. That path may be followed easily.

Capankajsmilyo added a comment.EditedNov 1 2018, 1:02 AM

Please keep in mind that there are not only Wikipedias in various language versions.
There is also Wikisource, Wiktionary, etc.
The implementation of one Infobox module serving all needs of all Wikipedias and Wiktionaries and Wikisources with a slight difference in human language only would surprise me.
In general, only basic functionality is a good candidate for a central module or library (libraries like mw.html or mw.ustring), but project and culture and language and community dependent issues are not.
If the concept of Infobox is addressed to Wikipedias only, what is the advantage to host Infobox/fr on Commons rather than on French Wikipedia? Who will be permitted to modify and adapt which module? On behalf of which community, and with effect on all projects of the same human language?
BTW, the libraries like mw.html permit global access to basic and native functions for a couple of years now. That path may be followed easily.

If you go through code of module:Infobox and hundreds of other modules, you'll find that they have considerable length, and are more than 80% similar (sometimes even copy paste like en to sa).

Take a look at Module:WikidataIB, there's only 1 developer substantially (of enwiki) and rest of Wikipedia are copy-pasting it. So if something updates on enwiki, it is lagged behind on other wikis due to variation in time of updation.

If you go through code of module:Infobox and hundreds of other modules, you'll find that they have considerable length, and are more than 80% similar (sometimes even copy paste like en to sa).
Take a look at Module:WikidataIB, there's only 1 developer substantially (of enwiki) and rest of Wikipedia are copy-pasting it. So if something updates on enwiki, it is lagged behind on other wikis due to variation in time of updation.

Maybe. But these 20 % are necessary adaptions to own project, own language, own culture, own scripting system, own community decisions, own maintenance procedures.

These changes have been made since the upstream code delivered not really what was needed by the particular project.

Once again: The global thing is welcome as long it provides neutral functionality, independent of any language and project customs. That is what I would call basic functionality. High level functions need the capability for project and language dependent configuration, and that is a very big task.

Yurik added a subscriber: Yurik.Nov 1 2018, 5:29 PM

I agree this is needed, but perhaps we can already set this up without waiting for the complicated change in the system. There is one big reason modules and templates differ - language. So if we move translations out of the templates and modules, we can simply copy/paste them without any changes between wikis. Moreover, I think we can even automate that - e.g. any template or module that has some sort of a flag (e.g. embedded well known template) will be automatically copied from the central wiki to all other ones that want to use it. I wrote a Module:TNT that allows for the translations to be stored on Commons using shared data tables. This way, when you update a message on commons, all existing templates will automatically start using the new translation.

Yurik added a comment.Nov 1 2018, 5:31 PM

P.S. I am not sure Commons is the good place for the shared modules - simply because Commons community tends to be much less technical than the mediawiki.org community. Maybe the main source of templates and modules should be there instead, with the proper things like unit testing.

I agree this is needed, but perhaps we can already set this up without waiting for the complicated change in the system. There is one big reason modules and templates differ - language. So if we move translations out of the templates and modules, we can simply copy/paste them without any changes between wikis. Moreover, I think we can even automate that - e.g. any template or module that has some sort of a flag (e.g. embedded well known template) will be automatically copied from the central wiki to all other ones that want to use it. I wrote a Module:TNT that allows for the translations to be stored on Commons using shared data tables. This way, when you update a message on commons, all existing templates will automatically start using the new translation.

Liked your idea. I'll ask a few coders at enwiki if they wanna do the same.

He7d3r added a subscriber: He7d3r.Nov 2 2018, 4:04 PM
Anomie added a subscriber: Anomie.Nov 5 2018, 5:57 PM

I think you're jumping the gun here by proposing a specific solution before T121470: Central Global Repository for Templates, Lua modules, and Gadgets has gotten any real progress.

P.S. I am not sure Commons is the good place for the shared modules - simply because Commons community tends to be much less technical than the mediawiki.org community. Maybe the main source of templates and modules should be there instead, with the proper things like unit testing.

I completely agree that Commons seems like a wrong place for this. The existing community there is heavily organized around curating media files, not code.

I don't know whether mediawiki.org would really be the right place either, versus a new wiki organized around being a centralized location for shared technical code.

Yurik added a comment.Nov 5 2018, 6:43 PM

@Anomie I don't think that task will have anyone working on it any time soon - that's why I proposed a bot-based solution. The good thing about that solution is that:

  • it doesn't need to wait for MW to change
  • it is multilingual
  • once MW implements something, all shared templates and modules can be switched to the new system without much effort (essentially just disable the bot)
Capankajsmilyo renamed this task from Consolidate and migrate Module namespace to Commons to Consolidate and migrate Module namespace to Mediawiki.EditedMar 12 2019, 3:25 AM
Capankajsmilyo updated the task description. (Show Details)

@Yurik any progress on bot based one?

Anomie renamed this task from Consolidate and migrate Module namespace to Mediawiki to Consolidate and migrate Module namespace to mediawiki.org.Mar 12 2019, 1:38 PM

@Capankajsmilyo renamed this task from Consolidate and migrate Module namespace to Commons to Consolidate and migrate Module namespace to Mediawiki.

I assume by "Mediawiki" you mean the site at mediawiki.org, not the MediaWiki software. That should probably be made more clear.

Yurik added a comment.Mar 12 2019, 4:40 PM

@Yurik any progress on bot based one?

Not yet. I would need a global bot flag for this too, which may require a lot of back and forth. The actual bot code would be relatively simple to implement.