Page MenuHomePhabricator

ContentTranslation should auto-adapt templates that don't have parameters and have a directly corresponding template in the target language
Closed, InvalidPublic

Description

(Rewritten somewhat for CX2.)

In CX1 block templates were skipped unless they were whitelisted and parameter-mapped. This made sense for infoboxes that have a lot of hard-to-adapt parameters. But navboxes and other templates that don't have parameters can usually be auto-adapted, and shouldn't be skipped.

In CX2 this still appears to be the case for some templates. Navboxes for example, are still not auto-adapted even when a corresponding template is available, even though they are usually simple and have no parameters.

Event Timeline

Amire80 raised the priority of this task from to Needs Triage.
Amire80 updated the task description. (Show Details)
Amire80 added a project: ContentTranslation.
Amire80 subscribed.
Amire80 triaged this task as Medium priority.Jun 26 2015, 6:40 PM
Amire80 set Security to None.

A particular case for this is infobox templates that are adapted to Wikidata, such {{Infobox Telescope}}.

This should be working now in CX2. @Amire80, can you confirm?

I just tested this in production with a navbox.

This is how I did it:

  • The template Buffalo Springfield is available in English and Czech Wikipedias.
  • The article Jim Messina (musician) is available in English, but not in Czech. On the bottom of that article, the template {{Buffalo Springfield}} is transcluded without parameters: {{Buffalo Springfield}}.
  • When I translate the article Jim_Messina_(musician) from English into Czech, I don't see this template even in the source article column:

Screenshot_2019-06-26 Přeložit stránku – Wikipedie.png (1×1 px, 202 KB)

You can see that immediately after "Myspace page" the page ends, and the navbox doesn't appear.

The Infobox at the top of the page does appear in the beginning of the source column. So I don't know why is the navbox hidden: it's simple and doesn't use any parameters, and it is available in Czech, and linked through Wikidata.

To sum up, this bug is still relevant for CX2.

In CX1 there is https://gerrit.wikimedia.org/g/mediawiki/extensions/ContentTranslation/+/57d688eddb8408639c424c56b7116315897dea58/modules/source/conf/common.json#5 – I'm pretty sure we have something similar in CX2/CXServer, but I can't find any. Maybe it is using the same config in a way that is not visible in code search.

UPDATE: For CX2 the equivalent config is in in CXServer config/MWPageLoader.yaml

@Pginer-WMF this is still happening, where should this ticket go?

@Pginer-WMF this is still happening, where should this ticket go?

Thanks for checking. Moving to enhancements, to improve support for these kind of templates in the future.

Pginer-WMF raised the priority of this task from Medium to High.Oct 1 2021, 12:48 PM

Sections with navbox classes are skipped from translation as per our configuration. This was intentional.

image.png (288×709 px, 55 KB)

Sections that are not part of article content but meta information about article are excluded from translation. We can revisit this decision, but it is not a matter of just removing .navbox from the configuration, but making sure we are not re-introducing the bugs we avoided with this configuration.

@Amire80 if this ticket can be narrowed down to re-introducing this kind of templates to translatation interface, and not about general block level templates, can you please edit the ticket description accodingly?

@Pginer-WMF Depending ont that can you please adjust priority of ticket? currently this is high priority for on-going sprint.

Sections with navbox classes are skipped from translation as per our configuration. This was intentional.

@santhosh leaving the .navbox example aside which you referred to in your comment above (and can be a separate discussion), can you confirm the adaptation works as expected for other cases we are not skipping such as {{Infobox Telescope}} ? Amir mentioned it in this comment:

A particular case for this is infobox templates that are adapted to Wikidata, such {{Infobox Telescope}}.

If this kind of template is not well adapted, I'd propose to keep the ticket focused on that.

If this kind of template is not well adapted, I'd propose to keep the ticket focused on that.

Block templates without params are also found to be working.

https://cxdebugger.toolforge.org/templates.html can be used for such testing.

image.png (2×1 px, 321 KB)

Pginer-WMF closed this task as Invalid.EditedNov 17 2021, 9:21 AM

Great. Thanks for checking, Santhosh!

Amir, if you have a proposal to adjust the section the tool skips (as per T104005#7505903), feel free to create a separate ticket.

Tanks!