Page MenuHomePhabricator

Ensure translations are continued or restarted when expected
Closed, ResolvedPublic

Description

A user can start a translation for an article/section X by either (a) searching for the article, and (b) selecting a suggestion.

In both cases, the loaded contents will depend on the following:

  • If there is an in-progress translation for X, the in-progress translation is continued. That, the user selects the article/section X from the suggestions or searching for it, and the stored contents are loaded (this is the same behaviour as if the user opened the item from the in-progress list).
  • If there is not an in-progress translation for X (because it is the first time or because the user had explicitly deleted it from the in-progress list), then a new translation is started from scratch without contents from previous translations.

In this way users can decide to restart a translation when needed, but continuing one is supported when the user has previously worked on it (without overwriting contents accidentally).

Scenarios to test

Scenario A

  1. Go to Section Translation application (test wiki)
  2. Select a page or section to translate and move forward to the "Pick a sentence" step
  3. Translate some sentences.
  4. Click on the back arrow on the top left of the page
  5. Inside the dashboard (where you should be redirected from the previous step) select the same article/section to translate and move forward again to the "Pick a sentence" step
  6. Observe how the previous translation contents are restored and the above changes made are present.

Scenario B

  1. Go to Section Translation application (test wiki)
  2. Select a page or section to translate and move forward to the "Pick a sentence" step
  3. Translate some sentences.
  4. Click on the back arrow on the top left of the page
  5. Observe that the translation is showing in the in-progress list
  6. Delete the in-progress translation using the trash icon.
  7. Inside the dashboard select the same article/section to translate and move forward again to the "Pick a sentence" step
  8. Observe how a new translation is created and the previous changes are NOT appearing.

Related: T333849: SX: Translation is not reset after discarding it and going back to dashboard

Event Timeline

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

[mediawiki/extensions/ContentTranslation@master] SX: Restore draft translation for the selected page/section if it exists

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

Change 922567 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Restore draft translation for the selected page/section if it exists

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

Change 923921 had a related patch set uploaded (by Santhosh; author: Santhosh):

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

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

Change 923921 merged by jenkins-bot:

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

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

When I started a translation for an article that had an in-progress translation, the in-progress translation was continued. This is expected. However, the transition to the mobile editor took place immediately, without showing the Confirmation step (i.e., not allowing the user to chose the target language).

This is captured below:

After selecting "Avocado toast" in the search step, the Confirmation step should appear (ideally adjusting the call to action to "Continue translation", but that can be part of a separate ticket).

Standard Confirmation step for new articlesProposed Confirmation step for new articles when there is a translation for them
bn.m.wikipedia.org_w_index.php_title=%E0%A6%AC%E0%A6%BF%E0%A6%B6%E0%A7%87%E0%A6%B7_%E0%A6%AC%E0%A6%BF%E0%A6%B7%E0%A6%AF%E0%A6%BC%E0%A6%AC%E0%A6%B8%E0%A7%8D%E0%A6%A4%E0%A7%81_%E0%A6%85%E0%A6%A8%E0%A7%81%E0%A6%AC%E0%A6%BE%E0%A6%A6&from=en&pag.png (568×320 px, 186 KB)
bn.m.wikipedia.org_w_index.php_title=%E0%A6%AC%E0%A6%BF%E0%A6%B6%E0%A7%87%E0%A6%B7_%E0%A6%AC%E0%A6%BF%E0%A6%B7%E0%A6%AF%E0%A6%BC%E0%A6%AC%E0%A6%B8%E0%A7%8D%E0%A6%A4%E0%A7%81_%E0%A6%85%E0%A6%A8%E0%A7%81%E0%A6%AC%E0%A6%BE%E0%A6%A6&from=en (1).png (568×320 px, 186 KB)

@Pginer-WMF could we consider this task completed and capture the pending task in a new ticket?

Scenario A and scenario B can be properly validated on production. Additionally, the issue mentioned by @Pginer-WMF in the comment above has been captured in T345332, so this task can be closed.

Scenario A - Screencast from greek (el) production wiki:

Scenario B - Screencast from greek (el) production wiki:

Pginer-WMF added a subscriber: EChukwukere-WMF.

@EChukwukere-WMF this would be a good candidate to include in the automated tests in order to avoid regressions. I added it as a sub-task of T296719: Test automation for key Section Translation workflows to keep track of this.

@Pginer-WMF thanks for keeping track of the items to automate. I am back on track to learning the new automation suite to be used. Will let you know when I am ready to implement it to our project