Page MenuHomePhabricator

Named references content is not modified when doing content translation
Closed, DuplicatePublic

Description

Steps:

  1. Find an article with at least one reference used twice.
  2. Create article translation (tested on articles from en -> pl).
  3. Modify the named reference (e.g. re-generate the reference from url).
  4. Save translation as an article.

Result: only the 1st occurrence of the ref is modified. The 2nd occurrence (and 3rd etc) is left as-was.

This happened for me when translating:
https://en.wikipedia.org/wiki/Anna_Sharyhina
Example after translation:
https://pl.wikipedia.org/w/index.php?title=Anna_Sharyhina&oldid=59162417

Event Timeline

Nux created this task.Mar 22 2020, 11:27 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptMar 22 2020, 11:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JTannerWMF added a subscriber: JTannerWMF.

We believe this is for the Language team.

FAR added a subscriber: FAR.Apr 16 2020, 6:10 PM

As an addition to the task, the Autotranslation seems to convert multiple calls for a same reference to multiple identical references under the same name. That is properly handled by Mediawiki but is error prone, since any change will break the reference.

Example: <ref name="Abc">{{cite web|[..]}}</ref> with a subsecuente <ref name="Abc"/> in the source article will be traslated to two <ref name="Abc">{{cite web|[..]}}</ref>That is well handled by Mediawiki by grouping them under the same number. However, changing any of the two translated references will bring a reference error (Two references with the same name and different content)

The task here seems to be a specific case in which the change was done in the translator tool, so it seems the problem happens when importing the source article or getting it back from the machine translator. In any case before the final publishing.

Nux added a comment.Apr 19 2020, 11:31 AM

Yes, your assumption is correct -- I changed the refs in the translation tool.

The translation tools doesn't handle translating ref-templets (cite). And then prompts users to fix them manually. So when user fixes them the article brakes.

JTannerWMF moved this task from To Triage to Triaged on the VisualEditor board.Apr 21 2020, 3:41 PM

If I understood the issue correctly, it was already captured in T203772: CX2: Improve support for references that are reused in multiple places.
Content translation let's users add paragraphs in any order so some additional checking and manipulation is needed when adding this kind of references.
I'll combine the ticket but feel free to add any additional details that may be missing in the original ticket.