Page MenuHomePhabricator

MinT for Wikipedia Readers: All references are missing
Closed, ResolvedPublic4 Estimated Story Points

Assigned To
Authored By
santhosh
Oct 10 2024, 5:39 AM
Referenced Files
F59000967: Myrmarachne Linguiensis Translation (2).png
Apr 7 2025, 6:26 AM
F58935436: image.png
Mar 28 2025, 12:58 PM
F58935462: image.png
Mar 28 2025, 12:58 PM
F58914291: Screenshot 2025-03-25 at 09.25.39.png
Mar 25 2025, 8:01 AM
F58914292: Screenshot 2025-03-25 at 09.21.37.png
Mar 25 2025, 8:01 AM
F58517081: image.png
Feb 28 2025, 6:02 AM

Description

Visit https://en.m.wikipedia.org/wiki/Special:AutomaticTranslation?page=Tokyo&from=en&to=ig&step=translation and click on any reference. Nothing happens.

References are an integral part of Wikipedia articles.

This was also noted when testing T376865: MinT for Wikipedia Readers: Large sections fails to translate

Screenshot 2025-03-25 at 09.21.37.png (1×3 px, 449 KB)

Screenshot 2025-03-25 at 09.25.39.png (1×3 px, 438 KB)

Event Timeline

Following js error is noted from console:

jquery.js:3783 jQuery.Deferred exception: Cannot read properties of undefined (reading '$el') TypeError: Cannot read properties of undefined (reading '$el')
    at Object.displayDrawer (https://en.m.wikipedia.org/w/load.php?lang=en&modules=skins.minerva.scripts&skin=minerva&version=emw6f:13:428)
    at eval (https://en.m.wikipedia.org/w/load.php?lang=en&modules=skins.minerva.scripts&skin=minerva&version=emw6f:46:886)
    at mightThrow (https://en.m.wikipedia.org/w/load.php?lang=en&modules=%40wikimedia%2Fcodex%…-styles%2Cjquery%2Cvue%7Cmobile.startup&skin=minerva&version=1evph:193:648)
    at process (https://en.m.wikipedia.org/w/load.php?lang=en&modules=%40wikimedia%2Fcodex%…-styles%2Cjquery%2Cvue%7Cmobile.startup&skin=minerva&version=1evph:194:309) undefined


Pginer-WMF triaged this task as Medium priority.Oct 31 2024, 9:12 AM
Pginer-WMF moved this task from Backlog to Product integration on the MinT board.
Pginer-WMF subscribed.

Triage meeting notes: This may need some investigation, does not seem a trivial issue.

What do we expect on this reference? hover and click

hover:
show the popup

image.png (340×958 px, 99 KB)

click on it:
scroll to reference section, load the content then expand it, then scroll to the reference number?

One problem is that the reference section does not load especially if we are translating a long article. Eg: https://language-cx.wmcloud.org/index.php/Special:AutomaticTranslation?page=Tokyo&from=en&to=hi&step=translation, try expanding the संदर्भ section

One problem is that the reference section does not load especially if we are translating a long article. Eg: https://language-cx.wmcloud.org/index.php/Special:AutomaticTranslation?page=Tokyo&from=en&to=hi&step=translation, try expanding the संदर्भ section

If I recall correctly, the request size limits to machine translation were inherited form the external services such as google Translate that we were using in Content Translation. For services running in Wikimedia infrastructure such as MinT and Apertium we can also consider increasing those limits. It may be easier to split the list of references at the server side for their translation than doing it on each tool that consumes the machine translation.

Change #1131337 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] AX: Fix references

https://gerrit.wikimedia.org/r/1131337

abi_ set the point value for this task to 4.

Change #1131337 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX: Fix references

https://gerrit.wikimedia.org/r/1131337

abi_ changed the task status from Open to In Progress.Mar 28 2025, 10:03 AM

Change #1131943 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] AX: Improve reference handling

https://gerrit.wikimedia.org/r/1131943

We've decided to skip translating references for the time being for the following reasons:

  1. They are loaded at page load, and clicking on citations will not work until these are loaded. Translating a large number of references can take a while.
  2. MinT is sometimes changing the id associated with the references and remove trailing numbers like -2 etc. This breaks linking between citations and references.
  3. For large sections we are translating sections by breaking them up in paragraphs. References are not broken down into paragraphs but rather list item. This would require additional special handling.
  4. Added by @hueitan: If the reference is from book "A" in English, but then we translate it, it becomes "B" in the target language; the reference may become wrong, although the link still the same.

When the page is loaded, we are also expanding the reference section. Clicking on a citation takes you to the associated reference.

Change #1131943 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX: Improve reference handling

https://gerrit.wikimedia.org/r/1131943