Multilingual Templates and Modules

--- --- In the name and memory of the great and merciful Creator who created humanity beyond a belief in a new thought. What I have prepared in this article (the creator of the world of digital currencies) is Satoshi. The world around mankind has always been subject to pure human talents and new creations from the beginning of creation.At the beginning of the creation of each phenomenon, humanity has presented various criticisms based on the lack of complete understanding and thought. By reflecting on the creation of technology and the advancement of science and the normalization of its understanding, followed by numerous experiments to serve Humanity will change its beliefs again, and the inferential understanding of that idea and example will reach its peak. Reach valuable. At the time I was onI was working on this topic (digital currencies), no one around and even in other lands was able to induce and fully understand this phenomenon, but this issue did not create any point of confrontation and obstacle for my emergence and coding, because every creator must first understand It is full of its own creation and may be beyond the mind of the Creator in the age of this idea and phenomenon beyond the beliefs of other peoples who have an irrational mentality and nature. Once I was sitting on a chair in one of my country's banks waiting for my banking process and waiting for my request fromI was a banker and a clerk. Suddenly, a new thought came to me. The initial spark appeared in me, and that spark was the creation of a new platform for transactions and exchanges, as well as a new phase of the economic system in which money (banknotes, coins) The material meaning does not exist externally. And the whole base consists of technology and the receiver communicates with the sender through a two-way program away from the expectation and absence of the person in the banks, as well as the opposition and superiority of the mind of each person in the position of banker. And he is responsible for auditing his propertyWhat we see during the day and night and the passing of months and years and years of our lives is far more complex than it can be understood by humanity. We only see aging but the friends of many cocoons after the birth of the silkworm. It turns out that it is full of mysteries. Yes, our dear ones, we have come for the beyond and our power is to the infinity of our inner thoughts. We are all the highest creatures in the world and have a great position. I came to this great induction from the knowledge of God and His understanding, and through this sparksPromising the greatness of God, I have been able to witness to the service of my invention to the world to this day. The defined irregular numerical scale gives rise to a specific order. My main goal in creating the prototype of this phenomenon was to know and understand humanity to fully understand this knowledge and science. Over the years, many different people have tried to replace their virtual identities with mine, but in the meantime, they are the only real creators of any phenomenon.It can prove to the world what it has created and has a sufficient and completeknowledge of its phenomenon. In the years 2008-2009, all my work in this field (digital currency) sought to understand and find a suitable solution to facilitate communication (P2P). And finally, with the help of the transcendental power and ability instilled in me, this thinking was able to work successfully and be happy. The idea of digital currencies is an evolved example of billions of cells from the infinite position of the cells of the universe, and

the blocks each represent these cells, each of which is a position.They have special. The past and present economic system no longer meets the existential needs of those who look beyond the genius. So the advent of digital currency science itself is a huge ascent. At that time the friends who were in contact with me in the chat room criticized all the original coding. But only my true faith and hope was able to stabilize its true place. Reach yourself. My dear, digital currency coding will now reach a new direction and point with the re- emergence and resurrection of me, and that after the evolution of initial understanding and familiarityThe whole world will happen with this phenomenon. If what is written now and if my determination for another new revolution is broken, all this is due to the trust and honors of you dear ones who have helped me from the beginning and have always been by my side because of their inner beliefs in digital currencies. I have the power of pen and writing in my hands. Let me say that I will always be by your side with eternity and with all my heart and all that I have, and I will create a wonderful evolution of myself for your trust. Our inner concerns stem from misconceptions thatWe stimulate our inner hope and essence to challenge them. My dear friends and masters, from now on, instead of laughing at each other, let's learn to laugh together. Once upon a time, when I was talking to others about the idea and creation of a phenomenon, it was nothing but ridicule. My story was exactly like a human being who experienced a journey through time and did not understand what he was saying. These issues gave me more hope and belief. My dear, you should know that everything has a halfThere is (good, bad_gg, beauty_of_knowledge, complete ignorance, incomplete_wealth, poverty) Choose your own half. After creating the prototype, I started serving in the way of my created phenomenon (Bitcoin) and started sharing their advertisements in different markets and I received a salary of 0.3 Bitcoin units and in exchange for several advertisements and sharing of different brands. I was paid 1 bitcoin as a wage and I kept my balance in Paypall. I continued my activity for a few months and earned about 1000 bitcoins this wayFor the first time, I did extraction and mining operations on 500 of them with my mobile phone, which eventually led to the burning of my phone's hard drive after extraction, but this operation was very interesting. There are many memories and stories. In my autobiography, I will tell and transmit them all in their entirety to each and every one of you all over the world. The ID used that the world remembers as Satoshi Nakamoto, and I chose it for myself. It is just a mask and an identity. My real and original is something elseThey have not been able to find me now, but it is better to say that the great economic mafia of the world did not want anyone to know my true identity and be aware of my existence. Turn on. The new dawn in this century can be promising, newer ideas, thoughts and creations. In this article, I do not intend to challenge a particular character, but it is better to say that any person or persons who want to understand my identity Must know that I belong to a particular race or tribe or territoryI am not, but I am only in the service of the whole world and my fellow human beings, and my main goal is to end poverty and poor belief in the whole world, and I want the world to be needless in every way. I get a lot of conversations in chat rooms during the day. If you want to understand this fact. Let me be honest and assertive to everyone, I have the ability to raise or lower the value of digital currencies very, very easily. For the purpose I have stated. I always try to maintain

moderation and assert the value of my invention.I will increase the d to higher digits. After sharing this article, each recipient will be responsible for transmitting it to others. The cryptography of this article all belongs to Satoshi Nakamoto's identity. This article will be translated and submitted in several languages of the world.

Introduction
What is it? This project makes it possible for modules and templates to be used on multiple wikis, without any modifications. All translations are stored in one place, accessible from everywhere.

Why is this needed? Because we do not have a single Wikipedia, we have 300+ separate Wikipedias and other wiki projects, and every time someone creates a good new template or a Lua module, it gets copied and translated 300+ times. Every translator has to thoroughly understand MediaWiki markup, making copying a very tedious and error-prone process, partially because template authors often assume their templates will be used in just one language. Once copied, the original templates are often improved, and each copy has to be updated while maintaining all existing translations. The pure human expense of copying templates and modules is so high that most of them are either never copied or never updated, especially for the smaller wikis.

Is this the best approach? No, but it is the best approach with the current technology. A significant MediaWiki rewrite is required to make this possible on the system level. Multi-site templates has been requested from the start in 2001, but not much was done simply because this is a hard problem to solve. With this approach it is possible to create multilingual content now, and once MediaWiki supports it, we can easily migrate multilingual content to the new system without much work.

Method

 * DiBabel tool allows users to copy templates and modules from origin (mediawiki.org) to all other sites/languages listed in Wikidata for that page, automatically translating dependent template and module names.
 * DiBabel only shows pages whose Wikidata item has "instance of" set to (Q63090714).
 * DiBabel will indicate if the content of the local page exists in the history of the page on origin. E.g. if a user modifies en.wikipedia version of a page, it will not be considered "diverged" unless that exact text ever existed in the history of the page on mediawiki.org.  Note that simply reverting a page to an older version will not be enough to mark the page as "diverged". A page has to be different from any of origin's revisions (e.g. add a note why the page was modified).
 * Any template names will be automatically localized inside the wiki markup, e.g. text will become , as long as Template:MW name exists on mediawiki.org, and has a corresponding template on the destination wiki. Shared templates should not use non-shared templates, as that may cause unexpected results.
 * Just like templates, modules text  will be converted to.
 * NOTE: The original DiBabel bot has been decommissioned in favor of the new user-controlled tool.

How can you help?

 * translate DiBabel interface --most importantly translate these ones:, , , (switch to your language before modifying).
 * translate warning messages (shown at the top of all auto-copied templates and modules), and corresponding template data params.
 * translate TNT error messages (shown when TNT module finds an error in a template).
 * For template and module authors -- create a new localized template or module on mediawiki.org. It might be easiest to start with a simple template, like an info or a warning box, or internationalize a popular existing module. Shared templates and modules should not use any templates or modules that are not already shared, except for the few listed as non-shareable below, like.

Module Example
Module:No globals was migrated to the new system with very few changes. These were the steps taken:


 * 1) Ensure proper testing. There could be millions of pages that rely on any given module, so we need to make sure the module is adequately tested before making any changes. For this example, I had to create Module:No_globals/testcases that verified that the module would raise expected errors when global variables were accessed without declaration, and do nothing otherwise. The testcases/doc (detailed) and the main doc (summary) pages were updated to show the results of the test runs.
 * 2) *Note that the testcases can work with both the main module and the sandbox module, so that we can compare the results.
 * 3) *Note that the testcases/doc and the main doc pages shows the results of both the sandbox and main modules. The summary test results must always be visible in order to catch errors as early as possible.
 * 4) Create translation table from strings. The No globals module contained two English strings:  and , and both strings were followed by a parameter  . We created a new translation table Data:I18n/No_globals.tab on Commons with the two strings, giving each a unique ID:   and  . The parameter placeholder for both strings had to be included into the string itself as a  .  It is very important to store parameters as parts of the string because in many languages the parameter would have to be placed at a different position in the string according to the norms of the language.
 * 5) Replace strings with calls to TNT module. Now we can use Module:TNT format function to convert  from the translation table into a localized string.  Place   at the top of your module, and call   to get the localized text.  For this specific example, we do not need to load TNT module unless there is an error, so we can do both calls on the same line to optimize performance. These were the two replacements made:  Note that we first modified the Module:No globals/sandbox page to make sure our changes did not break any of the tests (see point #1).
 * 6) Lastly we need to indicate that this is a shared module by adding a   to the top of the doc page. The first parameter is the name of our template on mediawiki.org, and the second parameter indicates that this module has a translation table called Data:I18n/No_globals.tab on Commons.  We also need to add Q63090714 as an additional instance-of for the Module:No globals wikidata entry (Q16748603).

Requirements for the Shared Modules

 * Sandbox: Each module must have a .../sandbox sub-page with a copy of the module code (the code might have a few changes compared to the main module page)
 * Testcases: Each module must have a .../testcases page with good unit tests to ensure high quality and stability of the shared module.
 * Testcases must use Module:ScribuntoUnit
 * Testcases must be able to run with both the module and module/sandbox versions (see TNT or TableTools examples)
 * Testcases should have require('Module:no globals') to avoid accidentally using non-declared variables
 * Documentation: Each module must have a good quality documentation in the /doc page:
 * The /doc page must start with.
 * If module has a translation table, add it as a second parameter in the warning, e.g.  would link to Data:I18n/Module:TNT.tab on Commons.
 * Add a quality control section at the top, listing the summary of the testcase runs for both the primary and the sandbox versions of the module. See Module:TNT for an example.
 * Document all public functions of the module.
 * Translations: module must not have any user-visible strings hard-coded in any human language. If it needs any user-visible strings, it must use the TNT module to convert a message ID with optional parameters to a string for the current language. See below for an example.

Requirements for the Shared Templates

 * Translations: template must not have any user-visible strings in any language. Instead, it should use TNT module to convert a message ID with optional parameters to a string for the current language. See below for an example.
 * Documentation: Each template must have a good quality documentation in the /doc page:
 * The /doc page must start with.
 * If template has a translation table, add it as a second parameter in the warning, e.g.  would link to Data:I18n/Template:XX.tab on Commons.
 * Template one-line description and parameters must be stored in a template parameter table, see Translating Template Parameters below.
 * Insert  at the end of the /doc page, where Template_Name would mean Data:Templatedata/Template_Name.tab on Commons.
 * If possible, create a /testcases subpage to run unit tests.

Translating user-readable strings
There is very little value in having non-translated user-readable strings copied as is. The TNT module was created specifically to solve that. Instead of storing text in English or in another human language in a module or a template, TNT allows them to be designed as language-neutral, and store multilingual text in the tabular data pages on Commons. This way your module or template will use those translated strings (messages). If the message has not yet been translated, will fall back to English (or other fallback language as defined by the language's fallback sequence). When someone updates the translation table, your page will automatically update (might take some time, or you can purge it), but no change in the template or module is needed on any of the wikis. This process is very similar to MediaWiki's localisation, and supports all standard localization conventions such as NaN undefineds and other parameters.

For a simple example, see Data:I18n/Template:Graphs.tab - a table with two messages, each message having a single parameter. By convention, all translation pages should have  Data:I18n/...  prefix to separate them from other types of data.

Global Modules
Just like templates, modules should also use TNT module for localization:

Translating Template Parameters
Template parameters are usually stored as a JSON templatedata block inside the template's /doc subpage. This makes it convenient to translate, but when a new parameter is added to a global template, all /doc pages need to be updated in every language. Module:TNT helps with this by automatically generating the templatedata block from a table stored on Commons. Placing this line into every /doc sub-page will use Data:Templatedata/Graph:Lines.tab table to generate all the needed templatedata information in every language. Even if the local community has not translated the full template documentation, they will be able to see all template parameters, centrally updated.

Volunteers

 * Capankajsmilyo (talk) 18:24, 17 May 2019 (UTC)
 * Viztor (talk) 00:13, 5 August 2019 (UTC)

FAQ

 * Q) If templates and modules are centralized, what will be about translated templates and modules?
 * A) Each centralized module/template will have Template:Shared Template Warning placed at the top. In this mechanism, code and translation is separated to make the work easier for editors. Code is stored and reused from mediawiki.org and the translations are stored and used from commons Data. For example, code of Template:Shared Template Warning will be copied from Template:Shared Template Warning and the translations are managed at commons:Data:I18n/Shared Template Warning.tab


 * Q) We need a template and module which can accept Devanagari Number (१,२....), so this updation will provide sa.wiki this facility?
 * A) Only the compatible modules/templates are converted as centralized after aggressive test validations. So specific requirements of each wiki given utmost importance. Conversion of only Module:TNT, Module:No globals, Module:TableTools and Template:Shared Template Warning has been completed so far due to this. Rest are still in the process and will not be impacted till everything is set right.


 * Q) If some mistake occurred, who should be informed for correction?
 * A) In case of any mistake, you can simply leave a message on talk page or contact on the template/module talk page on mediawiki or can directly contact or me. The issue will be resolved.

Done

 * Module:TNT
 * Module:No globals (translations) -- implemented, needs to be moved to communities
 * Module:TableTools
 * Module:Transcluder
 * Template:Shared Template Warning
 * Template:BCP47 – not very useful on monolingual wikis, although other global templates may use it; auto-update is quite useful on multilingual ones

Pages OK to use without synchronization
These templates and modules exist on most wikis, but contain too much language-specific customizations to benefit from this system. A shared module/template can rely on these in addition to any other shared module/templates. Any new wiki should copy and modify these templates by hand.


 * Template:Documentation -- most templates on most wikis use this template to show a documentation header on the template pages.
 * I'm not sure about this. All templates perform the same function, are equally structured and are equally used. All graphic changes can be made through CSS without touching the code itself. You can look at my solution to this: Module:Documentation/sandbox, Template:Documentation/sandbox. Iniquity (talk) 23:45, 28 May 2019 (UTC)
 * Module:Yesno -- what each language accepts as "yes" and "no" for template parameters
 * This shouldn't cause much trouble even synchronized, but may not be necessary. Viztor (talk) 23:16, 4 August 2019 (UTC)

In progress

 * Module:Arguments (Status: Unit test pending)
 * - while we can adapt it as is, we may also enhance it to allow parameter name translation table to come from Commons (many templates localize their parameters). --Yurik (talk) 19:06, 7 May 2019 (UTC)
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * , the same version is used in a bunch of wikis. There is a kind of related patch at https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Scribunto/+/158323/ . --Amir E. Aharoni &#123;{🌎🌍🌏}} 23:36, 24 January 2020 (UTC)
 * Module:Lua banner – ready, but not actually made global because its dependencies are not global yet, which would cause a mess
 * Viztor (talk) 23:39, 4 August 2019 (UTC)

Proposed

 * Module:Navbar
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * --BoldLuis (talk) 13:44, 20 April 2021 (UTC)
 * Module:Infobox
 * - eventually yes, but I suspect infobox has some dependencies we need to solve first. --Yurik (talk) 19:06, 7 May 2019 (UTC)
 * - hard CSS dependencies. Missing navbar module can be handled with code. --Zache (talk) 02:01, 8 May 2019 (UTC)
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * , of course. How can there even be any doubt. It's big and difficult, and local communities need to have the ability to override content and design in some places, but it's one of the most visible families of templates, and most of the functionality is the same in all wikis, even if the implementation and the content policies around using infoboxes may be different. For small wikis, the lack of infobox templates is one of the biggest pain points. --Amir E. Aharoni (talk) 10:33, 25 September 2019 (UTC)
 * -- Masumrezarock100 (talk) 11:20, 23 November 2019 (UTC)
 * and urgent. w:Module:Infobox depends on Module:Navbar--BoldLuis (talk) 13:18, 20 April 2021 (UTC)
 * Module:Location map
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * Thousands of subpages with the name being the only parameter needed to be translated to different languages. -- 94rain  Talk  06:15, 6 August 2019 (UTC)
 * location map -template will be eventually deprecated as development is already moving to dynamic maps. --Zache (talk) 06:34, 23 August 2019 (UTC)
 * Module:String
 * - the _error function should be changed to accept (message_id, ...) (id + optional params). If not ignoring errors, use TNT to translate messages. --Yurik (talk)
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * --Jarekt (talk) 03:58, 13 April 2020 (UTC)
 * d:Module:Databox
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * Module:Navbox
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * -- Masumrezarock100 (talk) 11:20, 23 November 2019 (UTC)
 * Module:Message box
 * --Obsuser (talk) 21:09, 11 July 2019 (UTC)
 * Module:ScribuntoUnit
 * can be easily supported, not much site-specific info. Viztor (talk) 00:32, 6 August 2019 (UTC)
 * --Jarekt (talk) 04:00, 13 April 2020 (UTC)
 * Template:Bot
 * It's one of the most commonly used templates in all fo Wikimedia's projects, perhaps the most used one. --Amir E. Aharoni (talk) 10:33, 25 September 2019 (UTC)
 * Template:Convert
 * It even has instructions for adapting to other languages. --Amir E. Aharoni (talk) 06:27, 26 September 2019 (UTC)
 * Module:InfoboxImage
 * Capankajsmilyo (talk) 01:06, 25 March 2020 (UTC)
 * Module:DateI18n
 * - This module localizes dates, is the latest incarnation of the code used for over a decade on majority of files on Commons. It is cloned to many other wikis. I recently rewrote it to use c:Data:DateI18n.tab and c:Data:I18n/MonthCases.tab to store data on language specific date formats. --Jarekt (talk) 03:58, 13 April 2020 (UTC)
 * Template:User link
 * Template:Tl
 * comment Suggest to migrate this to be a magic word, instead of copy-pasting everywhere. --Liuxinyu970226 (talk) 14:51, 30 April 2020 (UTC)
 * Module:Clickable button 2 and Template:Clickable button 2
 * , is used widely across multiple Wikis. And often this creates confusion as there is an unlinked version 1 as well and some templates use depreciated ui-button. A global version would provide constancy and use updated css class Vis M (talk) 19:53, 26 June 2021 (UTC)