Page MenuHomePhabricator

Back navigation from the translation editor needs adjustment
Closed, ResolvedPublicBUG REPORT

Description

Currently in section Translation leaving the translation editor by going back (back arrow in the UI) leads to unexpected destinations:

  • When translating a new article with Section Translation that does not exist in the target wiki (T260144), leaving the translation editor leads to a blank screen. I tried this when translating the Plants in space article from English to Bengali (link on test wiki). See more details below.
  • When expanding an article, leaving the editor leads to the "Compare the contents" step. This does not seem very helpful since the options available are to either get into the translation again (where the use came from) or keep moving back (select different section from the list or article from the dashboard).

This ticket proposes to adjust the destination for both cases to be the confirmation step. In this way, users have the option to readjust their action at hand (bookmark for later, change language, select different section, discard, etc.) without losing the previous selection. Note for the future: once persistence is supported, navigation can go directly to the dashboard for cases where an in-progress translation (T260165) was created (i.e., when the user made changes in the editor).

More details on the blank page issue

A video below illustrates the issue:

Errors in the Javascript console show the following:

GET https://cxserver.wikimedia.org/v2/page/bn/en/undefined 404
Uncaught (in promise) SyntaxError: Unexpected token P in JSON at position 0

Note that the issue does not happen when the article exists in the target wiki (expand with a section). However, in that case the destination of the navigation (currently the "Compare the contents" step) could be adjusted too. So it may make sense to navigate to the translation dashboard in both cases.

Event Timeline

This seems particularly relevant now that translations can be stored. As mentioned in the description, leaving the editor leads to the leaving the editor leads to the "Compare the contents" step. For the particular case of a translation restored from the "In progress list" this step is shown with an empty page and unresponsive preventing users to continue going back to reach the dashboard:

Screenshot_20230120-132444.png (2×1 px, 52 KB)

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

[mediawiki/extensions/ContentTranslation@master] Fix navigation from "Pick a sentence" step to dashboard

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

Change 900627 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Fix navigation from "Pick a sentence" step to dashboard

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

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

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230321

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

Change 901328 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230321

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

@ngkountas

clicking the back button when translating a new article with Section Translation takes me back to the starting point of new translation page. Is that what is expecting from this fix?

@EChukwukere-WMF quoting from the task description (last sentence): So it may make sense to navigate to the translation dashboard in both cases., so yes the expectation following this fix is to navigate back to the dashboard.