Page MenuHomePhabricator

Translate extension fails to create translations of module documentation pages
Closed, ResolvedPublicBUG REPORT


Steps to Reproduce:

Mark the documentation of a module for translation (this happened on with Module:Transcluder/doc).

Try to translate the page into another language.

Actual Results:

When the page is marked for translation the "translation" into the source language (Module:Transcluder/doc/en) was not created.

When the page is translated into a new language, the translation page (Module:Transcluder/doc/<language code>) was not created

Expected Results:

Translations of module documentation pages are automatically created in the same manner as translations of all other pages.

Event Timeline

Pppery created this task.Jul 23 2020, 10:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 23 2020, 10:13 PM
Sophivorus added a comment.EditedJul 23 2020, 11:31 PM

I suspect the issue may be due to the fact that when creating subpages of a module or the /doc subpage, the Translate extension (or MediaWiki core) defaults to the content model of the module.

Tacsipacsi added a subscriber: Tacsipacsi.

It’s set by Scribunto at rELUA includes/common/Hooks.php:256-273 (at 3b2d40f28de5), not by core or Translate. This code already exempts TemplateStyles (T200914), so probably documentation translations can be exempted, too.

Pppery claimed this task.Jul 25 2020, 5:50 PM

Change 616281 had a related patch set uploaded (by Pppery; owner: Pppery):
[mediawiki/extensions/Translate@master] Force translation pages to have same content model as source page

The patch seems fine to me. One other idea I had was if we made Scribunto::isDocPage true for /doc and any of its subpages, which would include translation pages. Is there any use case for having Lua pages under Module:Foo/doc/... ? Or any reason we shouldn't do that and only do it for i18n pages?

My patch to the translate extension would be a good idea regardless, as it fixes the case where a non-doc page is manually given the wikitext content model (through an explicit content model change or a move), and then marked for translation.

Change 616281 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Force translation pages to have same content model as source page

Pppery closed this task as Resolved.EditedAug 11 2020, 4:26 PM

Confirmed fixed (the linked edit was caused by a null edit to a Translations namespace page)