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
| santhosh | |
| Oct 10 2024, 6:14 AM |
| 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 |
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
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T341196 MinT for Wiki Readers (machine translation of wiki contents) | |||
| Open | None | T359072 MinT for Wiki Readers MVP | |||
| Open | None | T381406 MinT for Wiki Readers MVP: Complete key issues before continuing with experimentation | |||
| Resolved | BUG REPORT | hueitan | T376866 MinT for Wikipedia Readers: No error handling when a translation fails |
Solution:
(1) Shows the error indicator with error message
(2) shows a retry button, user can click and load the translation section again.
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
Screenshot
Note that:
The message shown on the screenshot are from server response message, meaning it may not always be understandable for non technical users.
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
Change #1127943 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] AX: Refactor section-by-section translation
@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:
My suggestion is based on the layout consistency it offers and its alignment with the existing loading indicator banner:
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.
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}
Thanks for all your input, the final ui looks like this, includes loading and error state
Change #1127934 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] AX: Improve error handling for "translate" api requests
Change #1127943 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] AX: Refactor section-by-section translation
This change can now be tested on https://language-cx.wmcloud.org/index.php/Special:AutomaticTranslation?page=Tokyo&from=en&to=hi&step=translation