Community Wishlist Survey 2019/Miscellaneous/Shared Multilingual Templates and Modules available to all wikis

From Meta, a Wikimedia project coordination wiki

Shared Multilingual Templates and Modules available to all wikis

  • Problem: Every wiki has to maintain its own its own templates and modules. They are often copied from other wikis and translated, but any fixes and improvements to the original templates often do not get copied, making them very hard to maintain. This is especially bad for the smaller wikis because they often do not have enough technical volunteers to maintain it.
  • Who would benefit: Content contributors
  • Proposed solution: Ideally this should be fixed in MediaWiki, but that may take too long. A much simpler and quicker solution is to use already existing technologies, and create a bot that will do most of what we need. A typical workflow for the multilingual templates and modules:
  • A template or a module is created on (MW is better because its community is more dev-focused, whereas Commons tends to be content-focused)
  • all localization strings are placed in the tabular data on Commons to simplify translation
  • template parameters are also placed in a tabular data on Commons
  • All strings are used via the Module:TNT
  • Some well known infobox is placed at the top of the template/module documentation to indicate that this module is shared between multiple wikis, and should not be changed anywhere else.
  • A bot looks for all modules/templates on that have that infobox, and copies them automatically to all other wikis using the sitelink list in Wikidata
  • If someone wants to use that template/module in a wiki X, they just need to copy/paste it to the wiki X, and add the sitelink - the bot will automatically keep it up to date from there on.
  • If a wiki decides to "fork" their version, they can simply remove the infobox from the docs.


  • See also Community Wishlist Survey 2019/Archive/Centralized templates and modules and Community Wishlist Survey 2019/Miscellaneous/Centralised language independent wikiproject for modules and templates. This proposal in a nutshell seems to be "doing it in MediaWiki is too hard, so hack it up with a bot". Anomie (talk) 16:07, 11 November 2018 (UTC)[reply]
    @Anomie: thx for the links. Yes, this proposal is a stopgap until MediaWiki implements it, AND it can be easily migrated to a more permanent solution once it becomes available. --Yurik (talk) 20:15, 11 November 2018 (UTC)[reply]
  • I've said this elsewhere, but "Module:TNT" is a garbage name. What is the point of the module? Name it that. --Izno (talk) 01:12, 12 November 2018 (UTC)[reply]
    @Izno:, there was a reason for such name -- it has to be short, and it should NOT be language-specific. Unlike all other templates and modules, TNT must be named the same way in all languages, so that templates and modules that use it would not have to be changed when copied from wiki to wiki. --Yurik (talk)
    So you chose en:TNT? :) As for "TNT must be named the same way in all languages, so that templates and modules that use it would not have to be changed when copied from wiki to wiki", this seems like an artificial restriction. If it is a template, and it's used for meta templates, it probably doesn't need a localized name (since most programmers are willing to program in English). And for where it's not used in meta templates, TNT does not tell them anything at all! --Izno (talk) 01:26, 12 November 2018 (UTC)[reply]
    It has to be short AND not already taken in any of the wikis. So yes, I had to do some considerable checking in all of the wikis to make sure. Some wikis are very serious about English names, e.g. I had a big discussion in dewiki trying to convince them to add a redirect to some well know help template to simplify the copying. They said they do not want any English-named content, even including a redirect. Also, considering that you will have to use TNT all over your modules and templates (one for each localized message string), the shorter the better. --Yurik (talk) 01:51, 12 November 2018 (UTC)[reply]
    P.S. Turns out it wasn't fully random either -- TNT Template (not Module) is already used as a redirect for Translatable template. --Yurik (talk) 22:04, 14 November 2018 (UTC)[reply]
  • I have a vaguely similar project (in development) at T187749, except instead of a bot it uses a MediaWiki extension to sync wiki pages to a git repo. It's meant more for CSS/JS than modules/templates (which benefit from integration with the wiki editor, and have a more complex localization ecosystem) but might be a starting point for handling this in another way. --Tgr (talk) 21:00, 26 November 2018 (UTC)[reply]



This functionality has been implemented, but needs a global bot flag (or a bot flag on every wiki that wants to use it). --Yurik (talk) 02:38, 12 April 2019 (UTC)[reply]