Page MenuHomePhabricator

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



  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:
Example after translation:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

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.

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.

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.