Jump to content

Topic on Project:Village Pump/Flow

Module documentation translation

19
Summary by Shirayuki
Shirayuki (talkcontribs)

Can we mark module documentation pages (Module:*/doc) for translation? (They have never been marked.)

Sophivorus wants to prepare Module:Transcluder/doc for translation.

Shirayuki (talkcontribs)

Page names will be inconsistent with template documentation pages:

source pagetranslation pages
Template documentation (without Translate) Template:(name)/doc Template:(name)/(language)/doc
Template documentation (with Translate) Template:(name) Template:(name)/(language)
Module documentation Module:(name)/doc Module:(name)/doc/(language)
Pppery (talkcontribs)

I don't see why module documentation pages shouldn't be translatable.

Sophivorus (talkcontribs)

So, can we give it a try?

Pppery (talkcontribs)

My only other comment is that they have to be treated as templates (given the #switch:<translate></translate> wrapper), because they are implicitly transcluded by the module they are documenting.

Sophivorus (talkcontribs)

Hi! I just did another attempt to mark the module documentation for translation. Unlike my first attempts, I think I did quite a detailed markup this time. However, I couldn't quite understand the #switch:<translate></translate> wrapper and I couldn't find documentation about it either, so I would really appreciate if someone more familiar with it could tweak my markup to comply with that, or give me some hint so I can do it myself. Thanks!!!

Shirayuki (talkcontribs)
Pppery (talkcontribs)

Hence my previous comment about treating it as a template, doing something like Special:Diff/3976778 (see the edit summary of that edit, I'm aware that Module:Transcluder is currently erroring with a template loop).

Shirayuki (talkcontribs)
Pppery (talkcontribs)

And FuzzyBot failed to create Module:Transcluder/doc/en as well. I think you've run into a software bug that should be reported on phabricator.

You might be able to work around the problem (if my hunch as to what caused it is correct) by unmarking the page for translation, creating Module:Transcluder/doc/en and Module:Transcluder/doc/ja with the wikitext content model using Special:ChangeContentModel, and then marking the page for translation again (but of course that dance will need to be repeated the first time the page is translated into a new language, which kind of defeats the point)

Sophivorus (talkcontribs)

Maybe we can move the documentation to Help:Module:Transcluder and then transclude it at Module:Transcluder/doc using: {{#invoke:Template translation|renderTranslatedTemplate|template=Help:Module:Transcluder|noshift=1|uselang={{int:lang}}}}? Thanks for all the help and sorry for the trouble!

Pppery (talkcontribs)

In any case, Shirayuki did my dance and made things work.

Sophivorus (talkcontribs)

Thanks guys! I just did a full translation of the documentation to Spanish and also a minor tweak to the source text. This may help to fully test the translation process.

Pppery (talkcontribs)
Sophivorus (talkcontribs)

Awesome, thanks! I'm a bit concerned that the dance may slow the translation process, so I went ahead and created Module:Test to try out the strategy I outlined above. Module:Template translation wouldn't transclude the languages header, so I added Template:Languages to compensate. Other than that, I think this approach is simpler and more reliable, unless I'm missing something. What do you think? (If you agree, could you move Module:Transcluder/doc and subpages to Help:Module:Transcluder?) Cheers!

Pppery (talkcontribs)

Be careful of moving things to the help namespace, due to Project:PD help. Otherwise, I like neither the current situation nor your proposed solution, but of course one of them will have to do.

Sophivorus (talkcontribs)

I agree neither is perfect, but I think I prefer using Help:Module:Transcluder to avoid issues like this one that are bound to happen again and again. Noted Project:PD help, but I think for now moving to Help namespace should be fine since so many extensions have their user documentation under a similar format (like Help:Extension:Translate). That being said, I cannot move the module documentation myself since I need to be a translator admin to do so. What do you think, Shirayuki? If you agree, would you do the move? Thanks!

This post was hidden by Pppery (history)
Wladek92 (talkcontribs)