Page MenuHomePhabricator

MinT for Wikipedia Readers: No error handling when a translation fails
Closed, ResolvedPublic4 Estimated Story PointsBUG REPORT

Assigned To
Authored By
santhosh
Oct 10 2024, 6:14 AM
Referenced Files
F58907990: image.png
Mar 24 2025, 9:00 AM
F58859238: image.png
Mar 18 2025, 7:53 AM
F58827151: Screenshot 2025-03-14 at 19.22.23.png
Mar 14 2025, 5:36 PM
F58827125: Screenshot 2025-03-14 at 19.21.43.png
Mar 14 2025, 5:36 PM
F58743654: image.png
Mar 10 2025, 7:36 AM
F58743552: image.png
Mar 10 2025, 7:33 AM
F58617214: image.png
Mar 6 2025, 6:17 AM

Description

Due to timeout, network issues or backend failures translation can fail(which often happens), the section is showing loading indicator.

There is no error handling currently and users are seeing loading indicator forever

image.png (490×2 px, 47 KB)

Event Timeline

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

Triage meeting notes: Does not seem a big implementation effort.

Solution:
(1) Shows the error indicator with error message
(2) shows a retry button, user can click and load the translation section again.

Nikerabbit set the point value for this task to 4.Mar 6 2025, 11:55 AM

Change #1125803 had a related patch set uploaded (by Huei Tan; author: Huei Tan):

[mediawiki/extensions/ContentTranslation@master] AX: Error handling when translate section fails

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

Screenshot

image.png (238×874 px, 25 KB)

image.png (238×864 px, 22 KB)

Note that:
The message shown on the screenshot are from server response message, meaning it may not always be understandable for non technical users.

abi_ changed the task status from Open to In Progress.Mar 11 2025, 11:33 AM

Change #1127934 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] AX: Improve error handling for "translate" api requests

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

Change #1127943 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] AX: Refactor section-by-section translation

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

@Pginer-WMF I have submitted a patch where I'm proposing a different design than in Huei's comment above. More specifically, I'm proposing the following banner for failed translations:

Screenshot 2025-03-14 at 19.21.43.png (204×806 px, 19 KB)

My suggestion is based on the layout consistency it offers and its alignment with the existing loading indicator banner:

Screenshot 2025-03-14 at 19.22.23.png (98×806 px, 6 KB)

I think it would be good to show some technical information about the error to the user such as Failed to translate en>hi 503 or 413 request is too large etc. It would make the bug reports more actionable for us.

@Pginer-WMF I have submitted a patch where I'm proposing a different design than in Huei's comment above. More specifically, I'm proposing the following banner for failed translations:

Screenshot 2025-03-14 at 19.21.43.png (204×806 px, 19 KB)

My suggestion is based on the layout consistency it offers and its alignment with the existing loading indicator banner:

Screenshot 2025-03-14 at 19.22.23.png (98×806 px, 6 KB)

Those look good, @ngkountas.

As @abi_ proposed, we can consider a secondary line of text providing more detail. But, preferably with something meaningful for the user. From the above examples, indicating that the error is related to the requested contents being too large seems meaningful, but "Failed to translate en>hi" is not adding much to the more brief "Translation failed" message (since the language pair is already visible in the UI).

Change #1125803 abandoned by Huei Tan:

[mediawiki/extensions/ContentTranslation@master] AX: Error handling when translate section fails

Reason:

see {1127943}

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

Thanks for all your input, the final ui looks like this, includes loading and error state

image.png (1×1 px, 365 KB)

Change #1127934 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX: Improve error handling for "translate" api requests

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

Change #1127943 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX: Refactor section-by-section translation

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

Thanks for all your input, the final ui looks like this, includes loading and error state

image.png (1×1 px, 365 KB)

This change can now be tested on https://language-cx.wmcloud.org/index.php/Special:AutomaticTranslation?page=Tokyo&from=en&to=hi&step=translation

image.png (1×674 px, 354 KB)