Topic on Talk:Multilingual Templates and Modules

Latest addition to method documentation

45
Capankajsmilyo (talkcontribs)

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.

Yurik (talkcontribs)

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.

Capankajsmilyo (talkcontribs)

Thanks, that looks great. What about modules?

Capankajsmilyo (talkcontribs)

Template:Shared/Infobox has been deleted as "out of scope".

Mainframe98 (talkcontribs)

The templates have been restored - could the person(s) responsible for this project leave a public message about this? Thank you.

Yurik (talkcontribs)

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 (talkcontribs)

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.

Capankajsmilyo (talkcontribs)

So Module:Shared/Name right?

Yurik (talkcontribs)

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 (talkcontribs)

@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)

Capankajsmilyo (talkcontribs)

I have created the shared message template.

Mainframe98 (talkcontribs)

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.

Yurik (talkcontribs)

@Mainframe98I posted to the Project:Current issues -- I guess its a current issue in a broader sense :)

Yurik (talkcontribs)

@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.

Capankajsmilyo (talkcontribs)

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 (talkcontribs)
Yurik (talkcontribs)

@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.

Capankajsmilyo (talkcontribs)

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

Yurik (talkcontribs)

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.

Capankajsmilyo (talkcontribs)

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

Yurik (talkcontribs)

I currently run my bot by hand to make sure all changes are correct. Hard to do it when I'm asleep :)

Capankajsmilyo (talkcontribs)

Ok. I hope it soon gets automated (y). Shared template is working now. Thanks to you. What next?

Yurik (talkcontribs)

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" ?

Capankajsmilyo (talkcontribs)

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 (talkcontribs)

I have added it to some wikis, now how to test it?

Yurik (talkcontribs)

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.

Capankajsmilyo (talkcontribs)

So is your bot active on all wikis now?

Yurik (talkcontribs)

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]].

Capankajsmilyo (talkcontribs)

TNT is now available across multiple wikis

Yurik (talkcontribs)

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 (talkcontribs)

@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!

Capankajsmilyo (talkcontribs)

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.

Yurik (talkcontribs)

@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.
Capankajsmilyo (talkcontribs)
Capankajsmilyo (talkcontribs)
Yurik (talkcontribs)

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.

Capankajsmilyo (talkcontribs)

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.

Yurik (talkcontribs)

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).

Capankajsmilyo (talkcontribs)

In short term wikis will object for some or the other reason. But is it ok to have duplicates on mediawiki?

Yurik (talkcontribs)

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?

Capankajsmilyo (talkcontribs)

In that case we will need to document when to use shared and when not to.

Capankajsmilyo (talkcontribs)

@Mainframe98 would you please delete shared no globals module

Mainframe98 (talkcontribs)

Yes Done

Capankajsmilyo (talkcontribs)

@Mainframe98 Please also delete shared wikidata module. Thanks.

Mainframe98 (talkcontribs)

Yes Done

Reply to "Latest addition to method documentation"