Jump to content

Talk:Multilingual Templates and Modules/Flow export

Add topic
From mediawiki.org
Latest comment: 2 years ago by Quiddity (WMF) in topic Lack of interest

Thanks a lot

[edit]

Have been waiting for this for agaes...You're a lifesaver Capankajsmilyo (talk) 02:46, 12 April 2019 (UTC)Reply

You are very welcome. The technical part was relatively easy, but now please help with the organizational part - it needs a bot flag on every wiki, this page needs to be cleaned up for content and made more understandable and polished, and we need some sort of a global "warning" box that explains that this template is part of auto-sync, and should not be modified locally. This box itself needs to be global too, and should be a good test of the new system. Yurik (talk) 03:07, 12 April 2019 (UTC)Reply
Fantastic! After so many years at last movement to solve this issue. Rob Kam (talk) 10:07, 12 April 2019 (UTC)Reply
@Yurik Hi. In cawiki we have been developing a very complete WD-powered infoboxes, that we exposed in WikidataCon'17.
The most important, that cover almost 60% of all cawiki articles, are also runnig in multilingual using a mix of WD label and /I18 to handle the exceptions.
Actually, some other WPs have adopted (copied) our code to best document the articles since the content of WD has grown.
My question is: Could this new tool make our infobox collection accessible to the rest of WP?
Thanks Amadalvarez (talk) 14:11, 12 April 2019 (UTC)Reply
@Amadalvarez: yes, if you create a template page on mw.org, and tag it for copying, it will get copied to all of its clones on other wikis. Technically you don't need to use TNT for translation, but I think it will greatly help because otherwise you will have to have every single text message on wikidata, which might be impractical, and wd community might not like to use wd as a translation tool. Yurik (talk) 14:51, 12 April 2019 (UTC)Reply
Perfect !. It's a very good new to me.
Thanks for this good work Amadalvarez (talk) 14:57, 12 April 2019 (UTC)Reply

Moving forward

[edit]

Yurik, I would like to assist you with proper permissions on Commons and Wikidata. But I am a bit confused about your needs. On Commons and Wikidata most template and module pages worth reusing on other projects, will be protected so they can be only edited by admins. So your account would need a rare "admin" and "bot" flags. Those are very seldom granted and usually to a single task bots like User:CommonsDelinker. Are you planning on seeking admin bot flags? If so I would suggest creating new account only for this one task.

I am also not sure about security of the source code of the templates. For example Module:TNT is not protected right now, so what would prevent a vandal from breaking it and than using bot to copy it to other projects. But if we protect those pages here than we will need to either become admins here or rely on local admins for code changes.

Eventually I would like to use this for some of my multi-project modules: Module:DateI18n (Q56528363), Module:ISOdate (Q26209111), Module:Complex date (Q26905045), Module:Calendar (Q59263842), Module:LangSwitch (Q58832772), Module:Autotranslate (Q59264012), Module:Wikidata label (Q22050722), Module:Wikidata date (Q31202303). But probably we should start with one of them, maybe Module:Calendar (Q59263842). Jarekt (talk) 16:59, 12 April 2019 (UTC)Reply

@Jarekt thanks for your offer! Yes, code security does need some thinking, e.g. if MW version of a module is not protected, and the module is widely used, it creates a problem. So yes, I guess we might need to have a separate bot+admin account, and get it approved on every participating wiki... I would love some help with organizing this discussion. As for mediawiki.org itself - yes, we would have to protect common modules too, and we might need to have a convention for modifying them, e.g. "Module:Name" (locked), "Module:Name/Sandbox" for experiments, and "Module:Name/Pending" (or /Staging or ...?) for the code that is ready to be moved to production, but requires an admin or if the protection is less severe - a seasoned user... Note that this is not a problem just yet, but several wikis already use revision flag extension, delaying the sync. Yurik (talk) 18:55, 12 April 2019 (UTC)Reply
I just created DiBabelYurikBot account. (P.S. I changed the bot name to indicate ownership) Yurik (talk) 19:53, 12 April 2019 (UTC)Reply
@Jarekt so it seems we are now facing this problem (as you expected) :). I think the way forward is to update the .../sandbox page, while at the same time bring more and more infrastructural plumbing (testing and documentation) to mediawiki. For example, I updated a very common module Module:No globals (see Module:No globals/sandbox) -- added unit tests and copied translations from all wikis that changed those strings. Now we should organize proper process of distributing it to every wiki. This btw is a good example of how a module could be translated with the least disruption. Yurik (talk) 23:43, 8 May 2019 (UTC)Reply

Same name on every project constraint

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I am afraid we might run into issues with names of the templates and modules and possible conflicts with other codes using the same name. For example I wrote c:Module:Date which was exported by others to other projects. Unfortunately the exporters changed the name to Module:DateI18n (Q56528363), so the module uses different names on different projects. I guess I can try to rename it on Commons and Wikidata, which use old name, but that would affect 55,471,286 pages.

I am afraid that other projects might already have "Module:Date" and "Module:DateI18n", which will lead to name conflicts. On the other hand Module:ISOdate (Q20962109), which calls Module:DateI18n (Q56528363), has a different source code on some projects because of that. Jarekt (talk) 17:19, 12 April 2019 (UTC)Reply

@Jarekt I have been thinking about this same issue -- in a more generic terms - how to reference a template from another template in a language-neutral way (same for modules). We have several options:
  • Use Wikidata IDs, e.g. instead of {{ SubTemplate | a | b }} we could write {{#invoke:TNT | T | Q123 | a | b }}, where Q123 is the ID of the SubTemplate. The TNT module would figure out which template to use based on the ID. The issue with this approach is that wikibase.getEntity(id) is an expensive call, and we can quickly run out of allowed calls per page rendering.
  • Similar to above, but let DiBabel bot automatically convert some magical text to a localized template name. This is a more dangerous path, because I really don't want the bot to know anything about wiki markup (it's a rabbit hole), but for something like this it might be needed. So the bot would look for {{#invoke:TNT | T | Template Name | a | b }}, and replace "Template Name" with the localized name based on a Wikidata lookup.
  • Similar to above, but make the bot much smarter, and be able to replace any {{TemplateName|a|b}} and {{#invoke:ModuleName}} with the localized name. Tricky because wiki markup is a massive pain to parse, and I am worried about about false replacements (e.g. {{{something}}} should not be replaced, or some code that dynamically computes the name of the template depending on parameters would).
  • For modules, we might still have to use approach #2:
    • require('module') -- this one is easy to solve if the string 'module' is not computed
    • require(condition and 'a' or 'b') and frame:expandTemplate{ title = title, ...} are harder, and we may have to do something like this: TNT.module('ModuleName') and TNT.template('TemplateName') -- both of these functions will simply return the same string as passed in, but the bot will know to replace those strings with the localized ones.
Yet, I think we may end up using the last two approaches... Yurik (talk) 18:42, 12 April 2019 (UTC)Reply
Yes it is getting very complicated very fast, and some modules I would like to use it for are supposed to be very light weight. In case of my Module:Date / Module:DateI18n, I can just rename it on Commons and Wikidata, but there might be cases where that is not possible. Jarekt (talk) 19:01, 12 April 2019 (UTC)Reply
Well, if the bot automatically adjusts template and module names (i just updated previous post), your code would not grow in size by much, so it will stay simple and lightweight. Yurik (talk) 19:04, 12 April 2019 (UTC)Reply
@Jarekt following our discussion, I added support for multilingual template names. E.g. any {{mwname|...}} will be replaced with {{localized name|...}}, as long as Template:mwname exists on mw.org, and there is a corresponding template on the other wiki (listed in sitelinks). The bot will resolve any redirects too. Localized module names are coming... Yurik (talk) 02:01, 14 April 2019 (UTC)Reply
P.S. Modules are done as well - just the simple case of require('Module:name') -- autoconverts Yurik (talk) 03:54, 14 April 2019 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I can help with translations

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I can help with translations into some languages like hindi, sanskrit, french, etc. But I am unable to figure out what to translate and how. Also is there any sample through which we can understand how this will work? Cos I'm confused. Capankajsmilyo (talk) 00:28, 13 April 2019 (UTC)Reply

@Capankajsmilyo you could try translating the summary text (edit_summary message) that the bot leaves when it makes a change. This will get you started with how internationalization (i18n) works.
Have you had any experience writing Lua modules or creating templates? If so, you could try to take a simple template -- for example, a Template:Shared/Multilingual Template Warning - a warning box that will tell people that the current template is managed on mediawiki.org, and that if people want to modify it, they should go to that page, but they should not change it on the local site. Even if you do most of the formatting and wiki markup coding, someone could always help you with it. Yurik (talk) 01:32, 13 April 2019 (UTC)Reply
I have tried one in hindi. Now how can I see the final result? Capankajsmilyo (talk) 03:00, 13 April 2019 (UTC)Reply
Thanks @Capankajsmilyo! it looks good, but I think you forgot one part inside the PLURAL -- it still says "$1 changes", see Hindi rules. Also, unlike the usual usages of the translation tables, this specific table is only used by my bot - so the only way you will see it is if my bot updates some page on a Hindi wiki -- then you will see it in the page change history (note that YurikBot hasn't done anything in hi.wiki since 2006, but with this new approach it might be coming back soon :) ) Yurik (talk) 03:15, 13 April 2019 (UTC)Reply
Done. Will add some more soon. In the description you've written that it require permission on 10 Wikipedia. Does that mean we can use it on 50+ others? Capankajsmilyo (talk) 03:44, 13 April 2019 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Latest addition to method documentation

[edit]

Hi Yurik You have written that Template/Shared needs to be created. It has to be created on mediawiki or sawiki? Also you have asked about bot approval. How to apply for approval on hiwiki and sawiki? I guess, steps to follow are needed in documentation. Capankajsmilyo (talk) 05:36, 25 April 2019 (UTC)Reply

I added a quick start section to the docs. Hope that answers your question. As for the bot approval - that differs between different wikis. Usually it is posted on some community page and gets discussed by the local community. Yurik (talk) 06:31, 25 April 2019 (UTC)Reply
Thanks, that looks great. What about modules? Capankajsmilyo (talk) 08:06, 25 April 2019 (UTC)Reply
Template:Shared/Infobox has been deleted as "out of scope". Capankajsmilyo (talk) 08:25, 25 April 2019 (UTC)Reply
The templates have been restored - could the person(s) responsible for this project leave a public message about this? Thank you. Mainframe98 talk 08:32, 25 April 2019 (UTC)Reply
Modules are exactly the same way. I looked at Template:Shared/Infobox -- you are using tons of other modules and templates in it, so that wouldn't work. You have to start from the most basic template or a module -- something that doesn't rely on anything else (as I wrote in docs -- Shared templates and modules should not use any template/module that is not already shared) Yurik (talk) 08:34, 25 April 2019 (UTC)Reply
My recommendation - try creating a warning message for the templates themselves -- something that will say "stop, don't edit this template, go to page XXX to edit it there, and it will get copied" (this text needs some improvements). We could create a "Template:Shared/Shared Template Warning" -- and all shared templates would include this warning at the top. The warning will only show up on the template page, not when it is included.
Steps: create a template and create a tabular data page for the text of the message. See docs. Yurik (talk) 08:36, 25 April 2019 (UTC)Reply
So Module:Shared/Name right? Capankajsmilyo (talk) 08:37, 25 April 2019 (UTC)Reply
yes, i think that would be good. But see my prev comment - i think a warning box like that is needed before we start on migrating other templates, and it will be a good starting point. Yurik (talk) 08:39, 25 April 2019 (UTC)Reply
@Mainframe98 I'm not sure what you mean. Which specific place do you think would be best to announce this project? (it was already announced in several large WP facebook groups and several wikipedias) Yurik (talk) 08:43, 25 April 2019 (UTC)Reply
I have created the shared message template. Capankajsmilyo (talk) 08:45, 25 April 2019 (UTC)Reply
I'm not a frequenter of either of these places - maybe I just missed it. It does appear there isn't a central place here for announcements. Using MediaWiki:sitenotice seems like overkill, and Project:Current issues isn't really the right place either. Mainframe98 talk 08:48, 25 April 2019 (UTC)Reply
@Mainframe98I posted to the Project:Current issues -- I guess its a current issue in a broader sense :) Yurik (talk) 08:50, 25 April 2019 (UTC)Reply
@Capankajsmilyo I think you misunderstood. The Template:Shared/Shared Template Warning page should not be simple text. It should be a nice warning box, properly formatted, with the actual message text being stored in the tabular data page on Commons, and it must not use any non-shared templates or modules inside of it. Please don't copy all the infobox templates (I would recommend those get deleted for now) - instead they have to be carefully redesigned from bottom up - making all internal components shared first. This is a much bigger task than a simple copy paste from enwiki. Yurik (talk) 09:01, 25 April 2019 (UTC)Reply
Ok how about Module:No globals, its a simple basic module being used in most of modules. And I have added the warning box. But commons table is not that clear. Capankajsmilyo (talk) 09:18, 25 April 2019 (UTC)Reply
There's a slight issue. Module:No globals already exist on mediawiki Capankajsmilyo (talk) 09:20, 25 April 2019 (UTC)Reply
@Capankajsmilyo, no, this is not what i wrote. In your Shared Template Warning, you use {{warning|...}} -- in other words, you are using the template called Warning -- which is NOT shared. You cannot do that. As I said before, EVERY template and module you use inside the shared template must ALSO be shared.
The Module:No globals is a good example -- while many wikis have it, it is NOT a shared module. It is simply a copy/paste, and you don't know how well it has been copy/pasted, or if any wikis have modified it (some wikis might have added functions, or translated it, or ...). See wikipedia:es:Módulo:No_globals. I think the No globals is a good candidate to make into a shared module in the future, but lets do one step at a time - first we need to build a simple foundation and examples of how this system will work.
I would recommend you delete all the Template:Shared/... pages and modules you created except for the warning, and make the warning into a proper shareable template. Once you understand how it works, it will become easier to convert other ones.
Commons table -- see the Translating Content section of my documentation. You already edited one commons table. It would probably be named commons:Data:i18n/Shared Template Warning.tab and you will have to see other example that you edited of how it should be structured. But first, start from creating a proper warning box that does not depend on non-shared content. Yurik (talk) 09:35, 25 April 2019 (UTC)Reply
shall we start with warning template then? I dont have the authorisation to delete. I would like to keep them and avoid any further creation till warning message thing and no globals is done Capankajsmilyo (talk) 09:57, 25 April 2019 (UTC)Reply
you should add a {{speedy| reason for deletion}} at the top of those pages. There is no point in having them at this stage -- you copied very complex templates that require a lot of work -- lets start from the simple ones first, and not clutter the Shared/ prefix with stuff that doesn't work.
Warning template is a very complex template itself. The header of every template and module should be as simple as possible, and should be built just for this task -- it shouldn't use anything else. That's why i proposed you try building a very simple warning box with just the text we want, not a generic message box. Yurik (talk) 10:09, 25 April 2019 (UTC)Reply
I have added speedy deletions and converted shared warning template to use commons data. I also created wikidata item and enwiki template. But enwiki template was not updated Capankajsmilyo (talk) 10:31, 25 April 2019 (UTC)Reply
I currently run my bot by hand to make sure all changes are correct. Hard to do it when I'm asleep :) Yurik (talk) 15:56, 25 April 2019 (UTC)Reply
Ok. I hope it soon gets automated (y). Shared template is working now. Thanks to you. What next? Capankajsmilyo (talk) 02:42, 26 April 2019 (UTC)Reply
Well, first we should probably get Template:Shared/Shared Template Warning copied to all wikis that already have Module:TNT, and linked to its wikidata item. (the name probably should not have the "shared/" prefix, and it would be good if the community would translate the name). Also, it would be good to create doc pages for the shared warning with a single line: {{#invoke:TNT|doc|Shared Template Warning}} ... btw, I wonder if we should call it "Shared Template Warning" or "Shared Page Warning" ? Yurik (talk) 04:37, 26 April 2019 (UTC)Reply
Since its a template, I doubt it would be usable in modules. If it can be used only in templates, word "template" is good enough. Capankajsmilyo (talk) 12:49, 26 April 2019 (UTC)Reply
I have added it to some wikis, now how to test it? Capankajsmilyo (talk) 13:30, 26 April 2019 (UTC)Reply
It can be used in both -- in a template it will be inside the section, and in modules it will be at the top of the /doc page. Also, when you copied it to tons of wikis, please be mindful of the communities - we should engage with the local community so they know what is going on. And also, make sure the module:TNT exists there -- this system does not work without it.
Also, when you copy the template, make sure not to change anything in it. If you modify a single letter, the bot will think you have local changes. Yurik (talk) 15:19, 26 April 2019 (UTC)Reply
So is your bot active on all wikis now? Capankajsmilyo (talk) 16:40, 26 April 2019 (UTC)Reply
Bot is running in a manual mode - it makes changes that i manually look over. Bot has no "bot flag" in any of the wikis, and it would be great if you can engage with each wiki community, proposing the bot to get its flag. Something like:

I would like to grant bot [[user:DiBabelYurikBot|DiBabelYurikBot]] written by [[user:Yurik|Yurik]] a bot flag. The bot makes it possible for many wikis to share templates and modules, and helps with the translations. See [[mw:WP:TNT|project page]].

Yurik (talk) 16:54, 26 April 2019 (UTC)Reply
TNT is now available across multiple wikis Capankajsmilyo (talk) 02:11, 27 April 2019 (UTC)Reply
awesome, thanks! I have applied for a bot flag on enwiki -- the same process needs to happen on all wikis (most wikis will be far easier, but some large ones might be even harder). Would love your help on that.
P.S. take a look at the interwiki links on that page -- it shows direct links to other language pages that request bot flags. Yurik (talk) 02:13, 27 April 2019 (UTC)Reply
@CapankajsmilyoI have applied for a bot flag on en, ca, de, fr, it, ru. Please take a look at them, and help apply to other languages in a similar way. Thanks for your support! Yurik (talk) 03:17, 27 April 2019 (UTC)Reply
It might take long time for that. That's a humongous task especially in non-responsive or less tech wikis like hi, sa, etc. Is it possible to start integration one by one? For example, starting with integrating fr and en. It's easier to make the templates and modules stable that way. Otherwise we might have to wait forever to convince communities of hundreds of Wikipedia's for the initiative. Capankajsmilyo (talk) 12:30, 27 April 2019 (UTC)Reply
@Capankajsmilyo sure, we don't have to get a bot flag for all wikis at once -- many wikis allow a bot to edit just a few pages, so this might be ok. The bigger question is the actual content - we need to start building a shared template/module library, possibly based on existing ones. To make this possible:
  • decide which template(s) we want to make shareable
  • find all dependent templates and modules (you can see that list at the bottom in the page edit mode)
  • start converting them one by one, starting with the "bottom one" -- template or module that does not rely on any other template/module. Yurik (talk) 14:51, 27 April 2019 (UTC)Reply
Great
How to handle no globals. It already exist on mediawiki at Module:No globals Capankajsmilyo (talk) 17:25, 27 April 2019 (UTC)Reply
Module:Shared/No globals also exist now Capankajsmilyo (talk) 17:27, 27 April 2019 (UTC)Reply
We would need a new data table for its messages -- "err-read" = "Tried to read nil global $1" and "err-write" = "Tried to write global $1", and I might need to make some changed to TNT module to make it easier. Yurik (talk) 17:57, 27 April 2019 (UTC)Reply
That would be a better approach. But my query was how to handle modules which already exist on mediawiki as Module:Name. If we create Module:Shared/Name, it would be duplicacy and we won't be able to link on wikidata. Capankajsmilyo (talk) 23:29, 27 April 2019 (UTC)Reply
Good question. Well, technically we don't really have to call it "shared/..." -- this might be a convention, but not a requirement. As long as there is a warning at the top, it's fine. Another thing is that the original does not use translation strings - this is something we have to add before making it sharable.
The bigger question is political: if Module:No globals already exists in many wikis, is it OK for a bot to update them if someone adds a "multilingual page" instance-of to wikidata. If we start from scratch (in the shared/*), each community has to actively copy content to it. With simple case like noglobals, most likely it won't be an issue, but with bigger templates, someone might object. I think the process should be like this: if we are migrating existing template, and a wiki has identical copy, we may want to place a warning in its docs, and possibly leave a comment on its talk page (by hand, not by bot). Yurik (talk) 23:44, 27 April 2019 (UTC)Reply
In short term wikis will object for some or the other reason. But is it ok to have duplicates on mediawiki? Capankajsmilyo (talk) 23:56, 27 April 2019 (UTC)Reply
probably better not - if we are keeping the functionality exactly the same as before, e.g. if we add internationalization to something, but otherwise it works exactly as before. So maybe it might make sense to delete the Shared/no globals? Yurik (talk) 00:12, 28 April 2019 (UTC)Reply
In that case we will need to document when to use shared and when not to. Capankajsmilyo (talk) 00:17, 28 April 2019 (UTC)Reply
@Mainframe98 would you please delete shared no globals module Capankajsmilyo (talk) 00:20, 28 April 2019 (UTC)Reply
Yes Done Mainframe98 talk 07:20, 28 April 2019 (UTC)Reply
@Mainframe98 Please also delete shared wikidata module. Thanks. Capankajsmilyo (talk) 05:57, 29 April 2019 (UTC)Reply
Yes Done Mainframe98 talk 12:48, 29 April 2019 (UTC)Reply

Bot approval status

[edit]

Please provide a list of wikis on which bot is approved, so that others can be approached. Also please share the status of bot on such wikis. Whether automatic or manual or semi-automatic. Capankajsmilyo (talk) 03:16, 1 May 2019 (UTC)Reply

@Yurik: Capankajsmilyo (talk) 17:43, 6 May 2019 (UTC)Reply
@Capankajsmilyo see Special:CentralAuth/DiBabelYurikBot (sort by the last column) Yurik (talk) 18:25, 6 May 2019 (UTC)Reply

Be careful with existing templates

[edit]

Existing, especially popular templates should not be blindly marked to be auto-copied. For example, Module:Yesno is very popular, but if the bot auto-copies it, it will override manual fixes like the one in akwiki, because in that case copied a version from another wiki, but later it was reverted probably due to language differences. CC: @Capankajsmilyo Yurik (talk) 03:23, 1 May 2019 (UTC)Reply

Ok. Sure. Capankajsmilyo (talk) 03:31, 1 May 2019 (UTC)Reply

Next module

[edit]

Now that TNT and warning is globalised, when can we move on to the next one? And which one would it be? Capankajsmilyo (talk) 17:44, 6 May 2019 (UTC)Reply

The next step is to actually try to convert existing (low level) module and templates to use TNT, similar to what I did with No globals module (diff). What wiki do you participate the most in the most?
P.S. Some modules like Module:Yesno should not be synced automatically, but they should be ok to rely on, because they are designed to actually hold the differences between languages. So if a module uses Yesno, it is ok to start translating it. Yurik (talk) 19:28, 6 May 2019 (UTC)Reply
I mostly participate in enwiki and sometimes in hiwiki. I also know little bit of sanskrit and French. Capankajsmilyo (talk) 00:52, 7 May 2019 (UTC)Reply
Well, enwiki is less likely to buy into this system just yet, simply because it is the largest site, and as such, doesn't have too many reasons to use it for the existing templates. If a good new template is developed, enwiki could copy it and keep it in sync. hiwki and other smaller wikis might be much more interested in collaborating -- because the new system could offer well known templates (like the ones you listed), and they can use them with very little cost - simply translate the strings and copy/paste the actual code without modifications. Yurik (talk) 01:16, 7 May 2019 (UTC)Reply
Fully agree. Module:No globals however might take longer than expected. As admins on mediawiki have not responded yet. How about Module:I18n ? It does not have much text, is not locked on mediawiki, and is a basic module with no real dependencies. Can your bot start updating this in other wikis? Capankajsmilyo (talk) 01:25, 7 May 2019 (UTC)Reply
While that one is easier, the question is - why would that module be of any use? If I understand it correctly, that module is very similar to TNT in what it tries to do, but it doesn't use shared pages from Commons. So I don't think other shared templates and modules we create will need it - therefor, why bother? Besides, it has no translatable content anyway, so very little value tbh. Yurik (talk) 01:50, 7 May 2019 (UTC)Reply
It's a dependency for some important modules, that's why. Otherwise we can go for any other which is not locked. Capankajsmilyo (talk) 01:54, 7 May 2019 (UTC)Reply
It is, but if we start adapting those other modules, I suspect we won't need it any more, and it will be removed as a dependency :) The Module:Wikidata looks interesting, but might be complicated. I would actually try to implement the most used ones first because most likely any smaller wiki would need them before all others...What do you think? Yurik (talk) 02:00, 7 May 2019 (UTC)Reply
How about Module:TableTools then? It's required for Module:Infobox. Capankajsmilyo (talk) 02:02, 7 May 2019 (UTC)Reply
That is a good target, and not much to do because it also has no translatable stuff, so it is mostly organizational, not coding:
1) we need to get testcases over to mediawiki from enwiki (need to check if other sites have as good of a quality on this one)
2) need to create Module:TableTools/doc page on MW.org similar to Module:TNT/doc to show:
  • the result of running those testcases
  • all the documentation (copied from enwiki?)
  • add shared warning template
3) Create a Module:TableTools/sandbox (either from enwiki, or just copy the latest code itself)
4) Adjust testcases to be able to run on both the main version and the sandbox version (see Module:TNT/testcases)
This way this module will look like a professional, ready to be copied, quality tested code. Yurik (talk) 02:41, 7 May 2019 (UTC)Reply
Yes Done what next? Capankajsmilyo (talk) 02:59, 7 May 2019 (UTC)Reply
You didn't adapt testcase code -- it always uses Module:TableTools/sandbox. See tnt test cases - beginning of the module Yurik (talk) 03:08, 7 May 2019 (UTC)Reply
I added a section on what is expected from a shared module - Multilingual Templates and Modules#Requirements for the Shared Modules Yurik (talk) 20:42, 7 May 2019 (UTC)Reply
P.S. I did the testcase adaption for the TableTools, should be good to go, please check against the above checklist. Yurik (talk) 20:44, 7 May 2019 (UTC)Reply
The checklist seems completed. When will the bot start updating Module:TableTools in various languages? Capankajsmilyo (talk) 07:21, 9 May 2019 (UTC)Reply
Ping @yurik Capankajsmilyo (talk) 13:14, 16 May 2019 (UTC)Reply

Sites without Module:TNT

[edit]

These are sites that use Module:No global (i.e. those that would benefit would multilingual translation), but have no Module:TNT & the warning template.

wikipeia

ace, arz, as, ay, azb, bcl, bi, bjn, cbk-zam, cdo, ch, ckb, din, diq, dty, dv, ee, ext, ff, fo, frp, frr, fy, gd, gn, gom, gor, hak, hif, ia, io, jv, kbp, kg, km, ku, ky, lad, lb, lij, lmo, ln, lo, lrc, ltg, lv, mk, mn, mwl, mzn, nah, nap, nds, nov, pag, pam, pfl, pih, pnb, ps, rn, sc, scn, sd, shn, sn, sq, ss, tcy, tet, tg, tl, tt, wuu, xal, yo, zh-classical, zh-yue

wikibooks

bn, fa, fr, hr, hu, ia, it, ja, ko, th, zh

wikinews

ar, fr

wikiquote

ar, el, en, fr, hu, ja, ko, th, zh

wikisource

ar, bn, el, en, es, fa, gl, hu, ja, ko, lt, ml, no, pt, th, uk, vi, zh

wikiversity

en, fr, ja, ko, zh

wikivoyage

bn, en, fi, hi, it, pt, uk, zh

wiktionary

ar, en, hu, it, simple

other

[wikispecies]

CC: @Capankajsmilyo: Yurik (talk) 18:03, 10 May 2019 (UTC)Reply

Added to all Capankajsmilyo (talk) 12:04, 13 May 2019 (UTC)Reply

No more "Shared/" prefix

[edit]

The "Shared/" prefix turned out to be too confusing, so I removed the only time we actually used it - in the Template:Shared Template Warning. Yurik (talk) 21:54, 10 May 2019 (UTC)Reply

Categorisation of templates and modules

[edit]

How is this handled? Bdijkstra (talk) 09:15, 11 May 2019 (UTC)Reply

Templates with /doc subpages

[edit]

Some wikis don't have a user group "template editors" and don't normally use /doc subpages for templates and consequently don't have local guidelines for this. I think there should be section on the project page dealing with this. Bdijkstra (talk) 09:23, 11 May 2019 (UTC)Reply

We can simply include shared template warning on all docs via bot (if this is technically possible). @Yurik: Capankajsmilyo (talk) 17:25, 17 May 2019 (UTC)Reply
I could automatically create the "/doc" page if it is missing (accounting for localization). The content of that page will be the warning template plus the TNT:doc invocation for template params (if available) Yurik (talk) 18:26, 17 May 2019 (UTC)Reply
My point is that the current approach is creating problems for communities who are not used to working with (frankly convoluted) /doc pages. Many wikis don't even have a Category:Template documentation pages. This needs to be addressed first, before pushing this approach to these wikis. Bdijkstra (talk) 18:37, 17 May 2019 (UTC)Reply
Good point. BTW, such template might also be a good target for this project - they will be copied only to the wikis that don't have a custom doc template Yurik (talk) 21:35, 17 May 2019 (UTC)Reply

Template word

[edit]

I suggest universalizing the word Template for all languages JOANNA02 09:56, 11 May 2019 (UTC)

For the namespace? "Template:" works on all the wikis, regardless of the local language. For example, at the Portuguese Wikipedia, "Predefinição:Citar web" and "Template:Citar web" are the same page.
Or did you mean in the documentation here? We could use the codes for "Template" (MediaWiki:Nstab-template) or Template ({{ns:10}}) to swap in the reader's language. WhatamIdoing (talk) 02:43, 14 May 2019 (UTC)Reply
Acho desnecessário o uso da palavra predefinição em português. JOANNA02 04:10, 14 May 2019 (UTC)
Do you mean that you think every language should use "Template", instead of Vorlage/Plantilla/Modèle/Predefinição/Шаблон/etc.? I don't think that will be popular in languages such as Russian, Chinese, and Arabic. WhatamIdoing (talk) 04:19, 14 May 2019 (UTC)Reply

Help in converting Module:Arguments

[edit]

I tried converting Module:Arguments/sandbox to new system. Seems like a bit more difficult than Module:No globals. Any help would be appreciated. Thanks! Capankajsmilyo (talk) 04:08, 18 May 2019 (UTC)Reply

@Mainframe98: , Yurik has completed conversion of Module:Arguments/sandbox. Can you please help in making it to Module:Arguments? Capankajsmilyo (talk) 02:46, 19 May 2019 (UTC)Reply
I think we should make a few changes to the testcases first - they should work transparently with both the primary and the sandbox versions of the code, and we need to add a testing summary to the doc page -- same as I did for all other multi-wiki modules Yurik (talk) 03:38, 19 May 2019 (UTC)Reply
Added testing summary. Capankajsmilyo (talk) 05:15, 19 May 2019 (UTC)Reply
The test summary shows the results of running test on the sandbox version of the code, but this is incorrect - even if the sandbox code is completely broken, it will still show that everything is ok because it actually runs both times on the production code. testcases needed to be changed a bit to support running on both, similar to how it was done to no globals and others. Yurik (talk) 18:07, 19 May 2019 (UTC)Reply
@Yurik Seems like you have done that in this edit. Capankajsmilyo (talk) 10:36, 22 May 2019 (UTC)Reply
@Capankajsmilyo yes, i did it for the Module:TableTools, but not for Module:Arguments. Yurik (talk) 12:29, 24 May 2019 (UTC)Reply

Summary for our discussion

[edit]

Web UI for manual synchronization of upstream (at mediawiki.org) changes with local wikis that can:

  • Lists modules/templates that potentially can be synchronized with copies in selected wikiproject alongside with status (up-to-date, ready for update, update blocked, etc)
  • Shows diff (for "read for update" item)
  • Applies changes on behalf of logged in (via OAuth) user

@Yurik did I miss anything important? Ghuron (talk) 08:58, 27 May 2019 (UTC)Reply

Sounds about right! I think there should be a single page with these options (essentially - a tree-like structure with expandable sub-sections, where a section might be generated on the fly via some XHR work):
  • List of all pages that have wikidata flag, each with a summary status (e.g. 20 up to date, 4 protected, 5 can be updated, 3 have local modifications, 10 have missing dependencies, etc)
  • Each page can be extended to show status groups with the list of wikis in that group (e.g. up to date: enwiki, frwiki, ...; Need updating: ...)
  • Be able to see a page diff for any page, even if no update is needed (expand inline, better than a separate diff page)
  • Be able to expand more than one page, eg expand a whole subgroup
  • For bonus points, would be good to be able to see groups by revision, e.g. these wikis are 5 revisions behind.
  • When a wiki is given (some global setting), show summary for that wiki only, eg list of pages up to date, pages that can be updated, etc
  • Clicking on any page should expand into a diff
  • Ideally all this should be a single page with dynamic content (Gmail style), rather than multiple pages.
Thanks!!! Yurik (talk) 10:15, 27 May 2019 (UTC)Reply
@Ghuron finally had a chance to re-review everything above, and update it. thx! Yurik (talk) 20:55, 27 May 2019 (UTC)Reply

Change the behavior of the languages provided

[edit]

I think it would be useful for the module to deduce the language from the user's settings instead of the local language. What do you think of it? Iniquity (talk) 19:37, 22 June 2019 (UTC)Reply

I don’t think it would be good for a default. MediaWiki.org works everywhere the way Module:TNT does currently, and monolingual wikis should never work differently. An option would be OK that would be used e.g. by Commons, but it needs development at the extension side first of all, as there is no reliable way to determine the UI language using wikitext or Lua. Tacsipacsi (talk) 21:21, 21 July 2019 (UTC)Reply
Since this service, as I understand it, will be used for the main modules and templates, I don’t see a problem if the controls will be displayed in the user's language. Iniquity (talk) 21:27, 21 July 2019 (UTC)Reply
What’s the difference between main and non-main templates that makes using UI language acceptable in the former? What is the distinction anyway? I think on monolingual wikis everything in the content area should use the content language as much as possible, and I can’t imagine these templates outside of the content area. Tacsipacsi (talk) 21:53, 21 July 2019 (UTC)Reply
>What’s the difference between main and non-main templates that makes using UI language acceptable in the former?
Main templates are templates which are used in all Wikimedia projects. Multilingual Templates and Modules#Candidate modules to use this approach.
>I think on monolingual wikis everything in the content area should use the content language as much as possible, and I can’t imagine these templates outside of the content area.
Now for many people, the interface may differ from the content if you globally set the language in the settings. Iniquity (talk) 21:57, 21 July 2019 (UTC)Reply

Main templates are templates which are used in all Wikimedia projects. Multilingual Templates and Modules#Candidate modules to use this approach.

This is a pretty arbitrary criterion. It contains, however, several directly reader-facing templates like navbar or location map, which provide content, not controls.

Now for many people, the interface may differ from the content if you globally set the language in the settings.

And what? I’m speaking about the content area, not other interface elements. Tacsipacsi (talk) 22:17, 21 July 2019 (UTC)Reply
>This is a pretty arbitrary criterion. It contains, however, several directly reader-facing templates like navbar or location map, which provide content, not controls.
Examples?
>And what? I’m speaking about the content area, not other interface elements.
I am talking about content area too, change your user language and at this post, or try to find another article and look at edit link, for example. Iniquity (talk) 22:21, 21 July 2019 (UTC)Reply
Hmm, this topic has already been discussed: https://www.mediawiki.org/wiki/Module%20talk%3ATNT#h-Provide_language_for_doc_function-2018-05-02T17%3A32%3A00.000Z Iniquity (talk) 22:41, 21 July 2019 (UTC)Reply

Examples?

These are examples. Or do you want them linked? Module:Navbar, Module:Location map.

I am talking about content area too, change your user language and at this post, or try to find another article and look at edit link, for example.

It’s sad, but it doesn’t imply we should do even more of that; edit links and tables of contents are a bit less the “heart” of the text anyway, and are designed carefully not to break output even in foreign-language environment, while a navbox, for example, may be designed taking the width of the navbar into account, and look bad with shorter or longer text. And template input translation like in case of Module:yesno should never, ever use interface language (not even on Commons), as that would potentially completely break the page when viewed with different UI language. Tacsipacsi (talk) 22:58, 21 July 2019 (UTC)Reply
>These are examples. Or do you want them linked? Module:Navbar, Module:Location map.
Um, navbar is a control panel, the second module is partially.
>It’s sad, but it doesn’t imply we should do even more of that; edit links and tables of contents are a bit less the “heart” of the text anyway, and are designed carefully not to break output even in foreign-language environment, while a navbox, for example, may be designed taking the width of the navbar into account, and look bad with shorter or longer text.
Excuse me, how do you imagine the same modules/templates but with a different design? All modules and templates, we are talking about, are meant to be multilingual.
>And template input translation like in case of Module:yesno should never, ever use interface language (not even on Commons), as that would potentially completely break the page when viewed with different UI language.
There are no controls in this module, there are only settings (config). Iniquity (talk) 23:08, 21 July 2019 (UTC)Reply
Only to be honest, I'm already a little confused. If a person does not want to receive an interface translation in a user language, then he simply does not set a globally user language. It’s very inconvenient for me as a user when some of the template controls are in a foreign language, and when errors suddenly pop up it is awful. Iniquity (talk) 23:13, 21 July 2019 (UTC)Reply

Status of project

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello all, I just pinged in to check what is the current status of the project. Has anything progressed since I last checked a couple of months ago? Just curious. Capankajsmilyo (talk) 12:57, 21 July 2019 (UTC)Reply

A bit slow :) Ideally we may want to create a tool that users can use to distribute the module/template to all wikis under their own user account. The biggest issue is how much time the project takes -- that's why its progressing a bit slower than I would hope. Yurik (talk) 19:23, 23 July 2019 (UTC)Reply
Hi @Yurik Any new conversion or bot acceptance since our last discussion? Capankajsmilyo (talk) 04:21, 24 March 2020 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Ability for local override of Data:I18n/*

[edit]

Already we don't just have one project for each language. Suppose there is a wiki-specific link within the message, there is currently no way to modify it on a wiki* to wiki* basis. Perhaps variable for different projects? What do you think? Like enwiki for enwiki and default to en when unnecessary. Viztor (talk) 23:43, 4 August 2019 (UTC)Reply

@Viztor I'm not exactly sure what you mean, could you give an example? If you are saying that the default English message could be different from a message specifically for Wiktionary (for example), than there are two ways around that:
1) without TNT modification:
  • use wiki markup in the message for conditional display, e.g. "en": "{{#ifeq: {{{site|}}} | wiktionary | message1 | message2 }}" (might need to fix that syntax a bit)
  • make the message take some sort of a parameter, and pass that parameter from the target wiki
2) allow TNT to understand additional columns, e.g. "wiktionary", in addition to the default id and message. That column could override a specific value for a given site. I really don't like this approach because the whole table will now have to have additional values, plus it will not be very straightforward if the value is missing - e.g. if there is "en" in wiktionary column, but no "fr" -- should the "fr" be shown from the default column, or it should use "en" from wikitionary column? The logic is not straightforward, and thus will cause a lot of confusion without much benefit. Yurik (talk) 00:32, 5 August 2019 (UTC)Reply
I'm thinking for TNT to take a local config table in addition to the multi-language table on commons where it could define some sort of localized variable. This could be useful for links, for example, if there is a standard message to report vandalism, we may need additional variable to set the link which is likely different for different wikis, and to ensure we can just synchronize across wiki, it should be able to automatically check for the existence of such variable table instead of us manually passing it. Viztor (talk) 00:37, 5 August 2019 (UTC)Reply
If I understood you correctly -- and that's a big if -- you are thinking of a module, e.g. Module:A shared between wikis, and it would use a common table, e.g. Data:A, from which it would take a message mymsg using TNT. But, before calling TNT, your Module:A will check if there exists a non-shared data-only module like Module:A/localData, and if it does, Module:A will use that config instead of calling TNT? In which case why should TNT handle this? Or maybe you would like TNT to parse that local data directly, in which case Module:A has to tell TNT to use Module:A/localData for overrides in every TNT.msg() call, and we would have to standardize on the structure of the localData pages. On top of all this, it will become a nightmare to update Module:A centrally - because now you never know if some wiki somewhere has customized localData in such a way that your change would break that wiki. That's why I am trying to come up with a centrally-managed solution (if possible).
Would be awesome if you can give a very specific example of where and how you would want this, e.g. a message, and what it would look like in different wiki languages / projects. Yurik (talk) 01:50, 5 August 2019 (UTC)Reply
Not just that. I expect something works like .css, where the LocalData can override, but not necessarily replace GlobalData(let's just call it that) on commons. The local config is essentially providing an interface. For example, if one can find a variable in LocalData, it will use that variable instead of the one on GlobalData, for example, a template message look like this "Here is our [[$helppage|help page]]", and the $helppage could be read from local variable which could be different from wiki to wiki, and fallback to the default $helppage, this doesn't necessarily need to be translated on GlobalData. I don't think it would be a nightmare to update Module because of local config. These modules would rely on local-specific config regardless of us providing such an interface or not, it should only help us cover more use cases. Viztor (talk) 01:59, 5 August 2019 (UTC)Reply
the LocalData doesn't have to be in as complex a model as GlobalData on commons, a simple template based config could be read like {{config|a=b|d=c}} Viztor (talk) 02:05, 5 August 2019 (UTC)Reply
The documentation module now uses a similar scheme, all translated messages are stored in a Commons, and the configuration is in a separate file - Module:Documentation/config. Iniquity (talk) 13:59, 5 August 2019 (UTC)Reply

Translations only in JSON?

[edit]

As far as I can see, the .tab pages in which translations are stored are JSON.

Is raw JSON the only way to edit them at the moment? Or is there perhaps a tool that can edit them in a manner similar to the Translate extension, to which all the localizers are accustomed?

In addition, this JSON format is quite different from the format of the core and extension JSON localization files (called "banana" by some people). Does it have to be different? If it's good for extensions, can't it also be good for templates and modules? Amir E. Aharoni {{🌎🌍🌏}} 20:15, 13 September 2019 (UTC)Reply

It’s always nice to show an example of what you’re speaking about, e.g. c:Data:I18n/Documentation.tab.
  • Currently I don’t know about other means of editing them, but anyone is free to create it. (I don’t think there’s any other issue than no one created a such tool.)
  • The formats can’t be exactly the same: extension JSON files are one language per file (core has even more files, but basically works the same), .tab pages contain all languages on one page/file. I don’t know JSON schema well, but I assume it cannot be made much simpler if we still want to describe it using JSON schema. Tacsipacsi (talk) 20:29, 13 September 2019 (UTC)Reply
There is also a gadget written by TheDJ to help with its editing, but not sure of its status. Yurik (talk) 20:30, 13 September 2019 (UTC)Reply
Is there a strong reason to have all the languages in the same file? Amir E. Aharoni {{🌎🌍🌏}} 20:35, 13 September 2019 (UTC)Reply
@Amire80 makes it far easier to store/manage. 99% of the .tab files have just a few translations. They frequently change, and sometimes need to be reworked completely. Separating translations into multiple files is too complex. Using a dedicated database might be good in the long term, but having too many unrelated keys is also a cost - i.e. if you put together all translations keys into a single database, but split it per language, you end up with millions of keys. If you split it by template, you have smaller chunks of translations, which is esp useful when you are processing fallbacks. Yurik (talk) 20:42, 13 September 2019 (UTC)Reply
Would separating the translations into multiple files still be too complex if it worked the same way it works in core and extensions?
Namely:
  • The maintainer only has to manage en.json and qqq.json.
  • The translators submit new and updated translations not through raw JSON, but through a dedicated interface (is there a reason not to use the Translate extensions, other than the fact that no-one has bothered to adapt it to for this task yet? ;)
  • All the translation files, other than en.json and qqq.json are usually managed by software and not edited directly.
  • Translations that need updating ("fuzzy") are marked as such by the software.
And what do you mean by "unrelated keys"? Amir E. Aharoni {{🌎🌍🌏}} 21:01, 13 September 2019 (UTC)Reply
The issue here is that this is not code files, but wiki pages. Thus, it is far harder to maintain multiple wiki pages in sync. I do agree that ideally this should use translatewiki approach, but it may require code support -- i.e. you would need an easy way for editors to create tiny namespaces (per template/gadget/bot/...) that would only have a handful of messages each, and possibly have a dedicated Lua API to get those messages, e.g. mw.i18n.get('templatename', 'messageid', 'optional-language-id')
Also as a stretch goal, might need a way to override it per project too - i.e. have different translations for fr-wikipedia and fr-wiktionary. Yurik (talk) 05:17, 14 September 2019 (UTC)Reply

"Translating Content"

[edit]

There is a section here that says "Translating Content".

Templates and modules are not quite content. They are more like software. I guess that this section refers to the human-readable strings in the templates. Can the section be renamed accordingly? For example "Translating human-readable frontend strings" or "Translating user-readable strings"? Amir E. Aharoni {{🌎🌍🌏}} 10:14, 21 September 2019 (UTC)Reply

sure thing, thanks :) Yurik (talk) 14:59, 21 September 2019 (UTC)Reply
Done, thanks. Amir E. Aharoni {{🌎🌍🌏}} 10:34, 25 September 2019 (UTC)Reply

Pages OK to use without synchronization

[edit]

I'm not sure that I understand this logic:

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.

One of the main eventual purposes of such a system is that a new wiki will not have to copy and modify templates that should be shared.

If everyone or almost everyone needs it, then it should be global. The current examples of Documentation and Yesno should be global, too. The local adaptations must be local adaptations, and the common code must be common. Amir E. Aharoni {{🌎🌍🌏}} 06:43, 26 September 2019 (UTC)Reply

True global templates draft spec

[edit]

Hi,

This page says:

Is this the best approach? No, but it is the best approach with the current technology. A very significant MediaWiki rewrite is required to make this possible on the system level. This functionality has been requested from the start 18 years ago, but not much was done simply because this is a very hard problem to solve.

I agree with all of this.

Let's imagine that this rewrite is done. How should it look like?

Over the last year or so I wrote this: User:Amire80/Global templates draft spec. The people who participate in the discussion on this page should be interested in this. If you just read the introduction and the "proposed solution summary" it's already good, but if you can read the whole thing, it's even better.

I'd really love to hear your opinions about this. (And if anyone can translate to French, Spanish, German, Russian, or other languages, it will be even nicer. Just use the "Translate this page" link at the top.)

Thanks! Amir E. Aharoni {{🌎🌍🌏}} 07:28, 3 October 2019 (UTC)Reply

People against multilingual activities ?

[edit]

@Amire80@Yurik Hi, friends.

Yesterday, @Jmarchn, who is working with me in the preparation of multilingual infoboxes, copied to enwiki several modules and templates related with TNT module and its use.

The response have been :en:Wikipedia:Templates for discussion/Log/2019 October 25. In my opinion, the language used to forbid these modules in the enwiki space is inadmissible, and could create future conflicts with this project.

As it is a topic directly related with cross WP modules and, specifically, with tools related with TNT, I appreciate your help in explain this user (Admin?) what are their competences.

Thanks Amadalvarez (talk) 22:20, 29 October 2019 (UTC)Reply

Thanks. I commented there. I hope it helps.
The older discussion at Wikipedia:Templates_for_discussion/Log/2018_April_8#Module:TNT also sums it up well: no-one seems to think that TNT is perfect, but it's valid as a step in the right direction and it shouldn't be just killed. Amir E. Aharoni {{🌎🌍🌏}} 08:33, 30 October 2019 (UTC)Reply

Moving some very internal modules into Scribunto

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


A naïve question: Can some very internal, technical modules that are used in a lot of pages and wikis, such No globals, String, or Arguments be moved into the standard library in Scribunto itself? Amir E. Aharoni {{🌎🌍🌏}} 15:43, 15 November 2019 (UTC)Reply

I see that this was also proposed here: https://phabricator.wikimedia.org/T209310 Amir E. Aharoni {{🌎🌍🌏}} 15:46, 15 November 2019 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Add vec.wikipedia to the mediawiki templates

[edit]

I tried in several ways to combine the templates of vec.wikipedia to those of mediawiki, but I can't. I do not understand anything and there is an absolute need to connect them! Can you help me please? ꜰɪᴇʀᴏᴅᴇʟᴠᴇɴᴇᴛᴏ (Talk)-(Contributions) 15:21, 2 February 2020 (UTC)Reply

@Fierodelveneto please give a bit more details. What templates are you trying to use in vec.wikipedia? There is currently very few templates that support the new system, so its a work in progress. See the "done" section. Yurik (talk) 15:38, 2 February 2020 (UTC)Reply
https://vec.wikipedia.org/wiki/Mod%C3%A8l:Divixion_aministrativa
I wanted to connect this!
I'm not an expert! I tried to read, but I don't understand anything! Too many things written, but nothing that really says what should be done!
Sorry if I ask here, but I have no alternative!
Thank you very much for your answer !! ꜰɪᴇʀᴏᴅᴇʟᴠᴇɴᴇᴛᴏ (Talk)-(Contributions) 15:42, 2 February 2020 (UTC)Reply
@Fierodelveneto it would be great to support something like, but I am affraid it won't be simple. The template you mentioned uses -- Modèl:Avixo , Modèl:Divixion aministrativa/TemplateData, Modèl:Divixion aministrativa/man, Modèl:Exoteric, Modèl:Icona del titoło, Modèl:Man, Modèl:Modeło conpleso, Modèl:Parametro, Modèl:Proteta, Modèl:TabełaModełi, Modèl:TemplateData, Modèl:Tl, and all of them also need to be modified to be used with the new system. So the short answer is that it won't be possible right away unless you are willing to learn Lua and in-depth templates, translate them, etc. No "magic bullet" yet. Yurik (talk) 15:47, 2 February 2020 (UTC)Reply
Isn't there anyone who can help us by putting our main templates up to standard?
Of course we will translate them into our language, but the real problem is that we are unable to use the codes!
Thanks again for your reply ꜰɪᴇʀᴏᴅᴇʟᴠᴇɴᴇᴛᴏ (Talk)-(Contributions) 16:10, 2 February 2020 (UTC)Reply
I am willing to help with limited knowledge I have. @Fierodelveneto first of all you need to get the bot activated in your language wiki. Then we can work on modules one by one. Capankajsmilyo (talk) 03:15, 17 March 2020 (UTC)Reply
@Capankajsmilyo: hello thank you for your offer, however, after a month, we have already managed to do it and we have successfully connected various templates to Wikidata. Thank'u ꜰɪᴇʀᴏᴅᴇʟᴠᴇɴᴇᴛᴏ (Talk)-(Contributions) 08:11, 17 March 2020 (UTC)Reply

Globalization of Module:Excerpt

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi! I'm so happy this project exists! The problem this project aims to solve is so important and fundamental to efficient and effective collaboration that you can count with my long term support. In the short term, I'll try to "globalize" the Excerpt module I've been working for some time and currently developing as part of this grant. I just started the process by creating Module:Excerpt here at MediaWiki.org and will follow the instructions on this page until I complete the process or get stuck with some issue. In any case, I'll let you know through here. Thanks, thanks thanks! Sophivorus (talk) 22:41, 7 June 2020 (UTC)Reply

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Language showcase about module translation

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi!

I'm pinging a few pages about this, and this one is perhaps the most relevant, because you are already doing something similar, and I'm trying to see how can it become even better.

This Wednesday, August 26 at 12:00 UTC (noon) there will be an online meeting on the topic of localizing Scribunto Lua modules.

More about this event: mw:Wikimedia Language engineering/Showcase.

All editors are invited, especially all those who:

  • Develop modules and templates in any wiki, particularly the multilingual ones such as Wikidata, Commons, Meta, and mediawiki.org.
  • Translate software and pages using the Translate extension on translatewiki.net, Meta, mediawiki.org, etc., and manage translatable pages.

A little intro can be found at Phabricator task T238417, and much more information will be given at the meeting.

Thanks! Amir E. Aharoni (WMF) (talk) 20:04, 24 August 2020 (UTC)Reply

Time change
I've been feeling very unwell today, and since I'm the main host and presenter in this meeting, I have to postpone this meeting to next week.
New time: Sep 2, 2020 02:00 PM UTC. Zoom link: https://wikimedia.zoom.us/j/95167235390
I am terribly sorry about the late notice and about the spam, but these circumstances are out of my control. Thanks for understanding, and I hope to see you at the new scheduled time! :) Amir E. Aharoni (WMF) (talk) 08:45, 26 August 2020 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is DiBabel alive?

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


https://dibabel.toolforge.org/ says "502 Bad Gateway". In early 2021, it looked quite broken and couldn't perform some actions that it used to perform well.

Is it ever coming back?

I don't think I'll have the bandwidth to learn its code and bring it back, but perhaps @Yurik can find some time for it?.. Amir E. Aharoni {{🌎🌍🌏}} 11:22, 30 May 2021 (UTC)Reply

@Iniquity @Yurik Amir E. Aharoni {{🌎🌍🌏}} 10:15, 7 June 2021 (UTC)Reply
It's bad that DiBabel stopped working. If Yurik doesn't return it soon, I'll try to do something with it in a month or two. — putnik 09:12, 14 June 2021 (UTC)Reply
Any news?.. Amir E. Aharoni {{🌎🌍🌏}} 07:01, 21 July 2021 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Module:Citation/CS1

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I recently discovered this project. I deal a lot with https://en.wikipedia.org/wiki/Module:Citation/CS1 and its subpages in my homewiki (SqWiki) and have to update every 3 months or so to keep it up to date with EnWiki. So do 90% of the other wikis which rely on it for their citations renderings. Would it be possible somehow that this project helps with that aspect? Klein Muçi (talk) 17:55, 28 September 2021 (UTC)Reply

Currently, DiBabel, the tool this project focuses on and could help you copy the template, is down. So until that is back up, nothing else can help you unfortunately. Lectrician1 (talk) 19:27, 28 September 2021 (UTC)Reply
Ah... Sad. If that is back up, I'd really appreciate some help in regard to the CS1 module given that I'm new to the whole concept and wouldn't know how to properly work with it. But thanks for your quick answer anyway! :)) Klein Muçi (talk) 19:35, 28 September 2021 (UTC)Reply
Hi! Are you or User:Trappist the monk still interested in this? DiBabel is down but I recently created Synchronizer and just added Module:Citations/CS1 to the Dashboard, see Multilingual Templates and Modules#Module:Citation/CS1. Notice I also set "enwiki" as the master wiki, which means that the status of all other wikis is determined by comparison to the enwiki version (I presume the enwiki version is the closest to a "master" branch). Anyway, I hope you find it useful, and let me know if you notice any bugs or if you'd like to request any features! Sophivorus (talk) 21:10, 29 January 2023 (UTC)Reply
Hello, @Sophivorus! Thank you a lot for the message. I am. Some reports, requests and replies (and a lot of questions!)
On a quick glance, I noticed that there aren't any tooltips. I personally rely heavily on them. I wasn't sure about the symbols beside the modules name in the list and I tried many times hovering over them or refreshing the page until I finally understood that those are actually clickable buttons. I understood that the lock symbol is used for different kinds of protections (which are shown when clicked) but I'm still not sure about what the exclamation mark symbol is trying to tell me, even after clicking on it.
I also tried hovering over the update/outdated/forked terms to understand more about what each of them exactly meant but nothing happened.
I tried the demo and was greatly surprised to see that it actually did real changes which were saved immediately after pressing the confirmation button which came after pressing "Update" on a random wiki. I really think you should preview the changes in the local wiki before saving anything and only save them from there. Or at least to have this made into a toggle preference.
What is the general premise here? We'll use Mediawiki as a central place to update everything? Wouldn't Meta be a better place for that?
Sorry for asking this but how exactly does it work? I read the template's documentation but wasn't able to fully understand it.
The CS1 module is made up of a suite of ~10 (sub)modules which more or less need to be updated simultaneously for the module to work correctly. Can Synchronizer be enhanced to understand this? It also requires a lot of categories. Again the same question.
Can Synchronizer be enhanced to understand translatable strings/forkable parts and act accordingly with them? Many submodules of CS1 are supposed to have 99% of the same content with EnWiki except for the occasional strings which are to be localized or some small modifications. I'm guessing this is what forked means more or less. It would be nice to have such strings highlighted and not touched while the other part of the content gets updated. Brainstorming: Maybe we can be asked individually (maybe with a form with text fields) for such strings to put them down how we want them. Maybe they can be marked as translatable/forkable parts in the master branch and in the local version?
Walking the extra mile: Can we get notifications in any way possible when certain versions start getting +X% outdated? Klein Muçi (talk) 10:03, 30 January 2023 (UTC)Reply
Hi!
  1. Tooltips added, both for the icons and for the status messages. Let me know if they are clear enough now or how would you phrase them.
  2. I'm currently working on those diffs! In the meantime, I added a word of caution to Synchronizer#Demo to hopefully prevent others from having the surprises you had.
  3. Yes, I guess the general premise is using MediaWiki.org as a central place to update everything. That being said, Synchronizer is (almost) ready to work from any other Wikimedia wiki, as long as MediaWiki:Synchronizer.js is copied to said wiki. However I'm not sure the effort of spreading it would be worth the trouble.
  4. The tool works thanks to MediaWiki:Synchronizer.js, which basically does a bunch of API calls. There's also Template:Synchronize which is implemented by Module:Synchronizer and basically outputs the button you click to load the tool and some other crucial markup.
  5. Yes, Synchronizer can be used for submodules too, see for example what I did here and feel free to add the other submodules. Will this do?
  6. Translatable strings are an old problem. See Multilingual Templates and Modules#Localized user-readable strings (the text needs some work but the ideas are there).
  7. Notifications when versions are getting too outdated (or forked) sound like a good idea but I can't think of an good way to do it yet. We'd need to somehow store a list of interested users for each module, as well as who has been notified and who has not, which would require a database (which Synchronizer doesn't have) or using a wiki page as the database (which sounds ugly but doable). I'll give it some thought.
Cheers! Sophivorus (talk) 02:07, 31 January 2023 (UTC)Reply
Hello back! Thank you for the applied changes and the reply! :)
1. Now it's pretty good. Maybe the "Update" button should also have a tooltip, felt like it was missing one. But then again you get a confirmation after clicking it so I'm not sure.
5. That's good but I was hoping for a way to have everything in one place. That said I suppose that from a "front-end POV", you can achieve that by creating a page dedicated to the CS1 suite that utilizes the same template many times without having the need to do any changes to the actual template's functionality. As for the categories, this exists. I'm not sure if the Synchronizer can make use of such a thing in any way. I understand that what I'm proposing above seems more like a special version of Synchronizer dedicated to CS1 than a generic tool that helps keep track of different modules, which is the current main aim. Just for your curiosity, some years ago, I proposed this but failed to get any replies. You'll see that most of the ideas I've put there are actually doable by Synchronizer so I just mentioned some of the remaining ones. Maybe they serve as food for thought. Klein Muçi (talk) 17:05, 31 January 2023 (UTC)Reply
Well, it wasn't easy, but I managed to add some diffs. Notice that diffs will only show for Outdated modules, not for Forked modules. Still I hope they'll be useful. Let me know of any bugs!
I haven't been able to look into your links yet. Next time! Sophivorus (talk) 03:52, 2 February 2023 (UTC)Reply
Tried a couple of cases in RTL and LTR languages and everything was okay. I just feel that the warning should be stronger in forked occasions. Maybe some bold text or some red highlight somewhere should be introduced. At least, until you decide to include diffs for forked versions too.
Also, tangentially related but what do you think the general "ethics" would be about doing changes globally? How acceptable would it be if I had no prior contributions as a user in a certain wiki and went on and updated one of the modules there? Maybe I should only act if I see that the said module has been greatly outdated for a long time? Maybe only if I check the page history and notice that there haven't been any active contributors to it? Maybe certain users can set up themselves somewhere as "Maintainers" so we know who to contact and when to act? Depending on these factors, maybe some new features can be introduced such as an out-of-date percentage and/or anything else related to page history and active maintainers? Klein Muçi (talk) 09:15, 2 February 2023 (UTC)Reply
Hi! I read your post and checked the other link and I understand now that CS1 also involves several categories and help pages. I agree that Synchronizer, as a general-purpose tool, may not be perfect for the CS1 case, but I trust it'll still be helpful. Also, notice that I coded the tool general enough to not be limited to Lua modules. It can be used to synchronize any kind of page. See for example what I did here. Of course that the text of category and help pages will inevitably vary per wiki, so they all show as Forked, so I don't see much value on using Synchronizer with them (yet). However, one feature I could add to Synchronizer is some option to list all wikis, including those where a module (or category or whatever) doesn't exist yet, and have a Create rather than Update button for those. I'll give it some thought.
Good news! I was able to add the diff feature for Forked modules too. Furthermore, the tool now shows how many revisions behind outdated modules are.
Regarding ethics, I think that good-faith and reasonably careful updates are generally ok. After all, it's you and Trapist that have been developing the module! Furthermore, most wikis are in dire need of technical contributors and updates, and there's no rule saying you can't edit a wiki in another language, even if there's another user doing so. If there were such a rule, the wiki or module would be protected. Now, if a module is protected, or you get a warning or revert from a local user after an update, then sure, take that into account for future updates to that wiki. But until then, I'd go ahead without wasting a second. Be bold! Sophivorus (talk) 14:57, 2 February 2023 (UTC)Reply
Thank you for taking the time to read through my links.
Things are looking nice. If you wish, I'd be interested in knowing about any other future updates.
Good luck! :) Klein Muçi (talk) 20:37, 2 February 2023 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

English is not fallback in some cases

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi! I was trying this feature when just by chance found that Spanish (instead of English) is the default language when the Avañe'ẽ (gn) language is set (I'm a Spanish speaker myself; could this be interfering somehow?). You can check this here:

https://commons.wikimedia.org/wiki/Data:I18n/Web2Cit.tab

Switch the interface language to Avañe'ẽ:

  • results-header is available both in English and Spanish, but shows in Spanish to me.
  • Same thing with fieldname.itemType.
  • fieldname.language is available in English and Italian (not in Spanish), and successfully fall backs to English.
  • last-check is only available in Italian, and that's what it fall backs to (as expected). Diegodlh (talk) 02:35, 9 September 2022 (UTC)Reply
The fallback languages for "gn" are "es" and "en", in that order. This seems intended. Dexxor (talk) 06:56, 9 September 2022 (UTC)Reply
Oh!! Because that's Guaraní!! I didn't realize that when I checked this late at night yesterday. It is a language spoken in some regions around Paraguay in South America. It makes total sense that Spanish is the fallback language. It sounds great! Would you please tell me where it is that this is defined? I mean, where (a config file?) it says that "es" and "en" are fallback languages of "gn" in that order? Thanks! Diegodlh (talk) 15:34, 9 September 2022 (UTC)Reply
Some ways to check fallback languages are listed at Manual:Language#Fallback_languages. In Lua modules, mw.language.getFallbacksFor('gn') is available. All languages seem to implicitly fallback to English as a last resort. Dexxor (talk) 15:53, 9 September 2022 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

New tool for synchronizing modules and templates

[edit]

Hi all! I wanted to share with you Synchronizer, a new tool I'm developing to replace the fallen DiBabel. Synchronizer is heavily inspired in DiBabel but is also much simpler and made completely in-wiki. It's currently on MVP stage, but I already find it invaluable. I hope you too! Let me know of any issues or requests, cheers! Sophivorus (talk) 12:41, 25 January 2023 (UTC)Reply

Hi again! I spent much of my day boldly updating and rewriting this page to account for Synchronizer (see especially the Dashboard section). I hope some of all this turns out useful, cheers! Sophivorus (talk) 19:49, 27 January 2023 (UTC)Reply
Hi, great news! I just improved Synchronizer so that it's now possible to change the "local" or "master" wiki to any wiki, not just MediaWiki.org, see for example this Sophivorus (talk) 21:17, 29 January 2023 (UTC)Reply
Hi! Synchronizer now shows a diff before updating Outdated modules. Diffs don't work for Forked modules though. I also fixed a few issues that may have caused the tool not to work for you. Next I want to add an "Update all" button. Cheers! Sophivorus (talk) 03:57, 2 February 2023 (UTC)Reply
More updates! Now diffs are available for both outdated and forked modules, and for outdated modules, the number of revisions behind are shown. Sophivorus (talk) 15:05, 2 February 2023 (UTC)Reply
Many more updates! The tool has evolved rapidly thanks to the feedback and support from Uzume (thanks!). Here are some of the new features:
  • Button to update all non-forked modules (only visible to autoconfirmed users)
  • Button to analyze forked modules
  • Detection of Unrelated modules (modules with no common history to master)
Ping to Klein Muçi who was interested in knowing about updates. Sophivorus (talk) 15:05, 24 March 2023 (UTC)Reply

Lack of interest

[edit]

Hi! I'm rather surprised about the lack of interest and use of the Synchronizer tool and the new approach documented at Multilingual Templates and Modules. Is there something wrong about it? I personally find it invaluable when updating the modules I develop (Transcluder and Excerpt) across wikis. But besides me and User:Uzume, no one seems to be using it. What's up? Sophivorus (talk) 13:04, 20 July 2023 (UTC)Reply

You need to publicize it more! You should get it on the Signpost and Tech News! Post it on the telegrams, mailing lists, discord, etc. Lectrician1 (talk) 02:29, 25 July 2023 (UTC)Reply
Hi, good point! I just added it to the next issue of Tech news (improvements welcome), wrote an email on wikitech-l, registered the tool at ToolHub and shared it at the Wikimedia Tool Sustainability group at Telegram. Lets see what happens! Sophivorus (talk) 13:22, 26 July 2023 (UTC)Reply
Hi, thanks for the suggested Tech News entry!
I'm wondering if either the entry there, and/or the documentation page, should mention something about the cautions around using such a powerful tool on wikis that a person may not be familiar with?
I.e. I'm not sure if there are ways it could be accidentally misused by someone who is more confident/eager than they are an expert with Lua... I imagine something like "warning: only use this tool if you understand Lua and the repercussions of the changes you are making at each wiki." might be a helpful warning to some people looking at the page? I'm not sure how to contextualize that in the Tech News entry though. Quiddity (WMF) (talk) 17:17, 26 July 2023 (UTC)Reply
Hi, good point! I just added a clear warning at Synchronizer, and also added a check to the code to require that the user be logged in at least. As to the warning in the Tech News entry, I think it's not necessary because anyone interested that follows the link, will find the warning anyway. That being said, if you still want to add a warning to the Tech News entry, please go ahead! Sophivorus (talk) 19:19, 26 July 2023 (UTC)Reply
That makes sense, and thanks for the page-edit and logged-in check. I'm glad I could help! This is a really great tool, and I wish I knew enough Lua to be confident in using it! Thanks again, for everything :) Quiddity (WMF) (talk) 19:33, 28 July 2023 (UTC)Reply