Page MenuHomePhabricator

Redirect to the target wiki when accessing the editor
Closed, ResolvedPublic

Description

Content Translation works across different language-specific Wikipedias. Although it is presented as a global tool, when translating into a given language the user needs to be in that Wikipedia. This is supported by redirecting the user to the target Wikipedia. For example, if a user in English Wikipedia selects to translate from Japanese to Korean, at some point the user will be redirected to Korean Wikipedia to be able to publish contents in such wiki.

The current desktop dashboard, performs this redirect when users reach the translation editor. However, the new unified dashboard does the redirect much earlier: at any point where the language pairs are adjusted. The approach followed by the unified dashboard results in unexpected page reloads and UI language changes (even the UI changing radically when switching between RTL and LTR languages).

This ticket proposes to delay the wiki redirect to the point where the user starts the translation. That is, like in the classic desktop dashboard, when the user is redirected to the editor. The video below illustrates how the redirects occur after language changes:

The expected behaviour would be for redirects only to happen when the user transitions to the translation editor. In this way, unexpected page refreshes are avoided.

Derived Requirement

Ensure that users are redirected to the target Wikipedia only when they start the translation in the editor, preventing unexpected page reloads and UI language changes when adjusting language pairs.

  • Users should remain on the unified dashboard when selecting or adjusting language pairs.
  • The redirect to the target Wikipedia should only occur when the user starts the translation.
  • The UI should remain stable without unexpected reloads or language changes until the translation editor is accessed.
Test Steps

Test Case 1: Verify No Redirect When Adjusting Language Pairs

  1. Navigate to the unified translation dashboard.
  2. Select a source and target language for translation.
  3. Adjust the language pairs by selecting a different source or target language.
  4. ✅❓❌⬜ AC1: The page should not refresh or redirect when adjusting language pairs.

Test Case 2: Verify Redirect Occurs Only When Entering the Editor

  1. Navigate to the unified translation dashboard.
  2. Select a source and target language for translation.
  3. Click "Start Translation" to open the editor.
  4. ✅❓❌⬜ AC2: The user should be redirected to the target Wikipedia only when entering the translation editor.

Test Case 3: Verify UI Stability When Switching Between RTL and LTR Languages

  1. Navigate to the unified translation dashboard.
  2. Select an LTR language (e.g., English) as the source and an RTL language (e.g., Arabic) as the target.
  3. Adjust the language pairs multiple times.
  4. ✅❓❌⬜ AC3: The UI should not change unexpectedly or switch between RTL and LTR layouts until the user enters the translation editor.

QA Results - Test Wiki

ACStatusDetails
1T386344#10701306
2T386344#10701306
3T386344#10701306

Event Timeline

ngkountas moved this task from Backlog to Prioritized on the LPL Hypothesis board.

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

[mediawiki/extensions/ContentTranslation@master] useTranslationUnitTranslate: Use source/target languages from URL params

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

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

[mediawiki/extensions/ContentTranslation@master] useMTProvidersInitialize: Use source/target languages from URL params

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

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

[mediawiki/extensions/ContentTranslation@master] SXTranslationSelector: Use source/target languages from URL params

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

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

[mediawiki/extensions/ContentTranslation@master] ProposedTranslationCard: Use source/target languages from URL params

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

Change #1119658 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] useTranslationUnitTranslate: Use source/target languages from URL params

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

Change #1119665 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] ProposedTranslationCard: Use source/target languages from URL params

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

Change #1119659 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] useMTProvidersInitialize: Use source/target languages from URL params

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

Change #1119660 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SXTranslationSelector: Use source/target languages from URL params

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

ngkountas moved this task from In-progress to Prioritized on the LPL Hypothesis board.
ngkountas subscribed.

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

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

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

Change #1120157 merged by jenkins-bot:

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

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

SBisson lowered the priority of this task from High to Medium.Feb 18 2025, 2:21 PM

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

[mediawiki/extensions/ContentTranslation@master] Preserve URL hash when replacing URL

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

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

[mediawiki/extensions/ContentTranslation@master] SX: Introduce `useTranslationConfirm` composable

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

Change #1120931 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Preserve URL hash when replacing URL

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

Change #1120936 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Introduce `useTranslationConfirm` composable

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

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

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

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

Change #1122111 merged by jenkins-bot:

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

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

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

[mediawiki/extensions/ContentTranslation@master] Redirect user to target wiki only when accessing the editor

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

Change #1122909 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Redirect user to target wiki only when accessing the editor

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

Change #1130692 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250324

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

Change #1130692 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250324

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

@ngkountas Confirmed Redirect to the target wiki when accessing the editor as seen in the gifs below. I will move this to sign-off. Thanks for all your work!

Test Result - Test Wiki/PROD

Status: ✅ PASS
Environment: Test Wiki/PROD
OS: macOS Sequoia 15.4
Browser: Chrome 134
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=es&unified-dashboard=true#/
https://ig.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&filter-id=previous-edits&filter-type=automatic&from=en&to=ary#/

Test Steps

Test Case 1: Verify No Redirect When Adjusting Language Pairs

  1. Navigate to the unified translation dashboard.
  2. Select a source and target language for translation.
  3. Adjust the language pairs by selecting a different source or target language.
  4. AC1: The page should not refresh or redirect when adjusting language pairs.

TEST

DesktopMobileTablet
2025-04-01_11-01-54.mp4.gif (842×1 px, 2 MB)
2025-04-01_11-13-07.mp4.gif (830×806 px, 2 MB)
2025-04-01_11-15-17.mp4.gif (806×848 px, 2 MB)
PROD
2025-04-01_11-23-45.mp4.gif (902×1 px, 2 MB)

Test Case 2: Verify Redirect Occurs Only When Entering the Editor

  1. Navigate to the unified translation dashboard.
  2. Select a source and target language for translation.
  3. Click "Start Translation" to open the editor.
  4. AC2: The user should be redirected to the target Wikipedia only when entering the translation editor.

For PROD- See AC3

PageSection
2025-04-01_11-06-08.mp4.gif (840×982 px, 2 MB)
2025-04-01_11-09-28.mp4.gif (844×1 px, 3 MB)

Test Case 3: Verify UI Stability When Switching Between RTL and LTR Languages

  1. Navigate to the unified translation dashboard.
  2. Select an LTR language (e.g., English) as the source and an RTL language (e.g., Arabic) as the target.
  3. Adjust the language pairs multiple times.
  4. AC3: The UI should not change unexpectedly or switch between RTL and LTR layouts until the user enters the translation editor.
TestPROD-DesktopPROD- Mobile
2025-04-01_11-17-24.mp4.gif (808×1 px, 3 MB)
2025-04-01_11-23-45.mp4.gif (902×1 px, 2 MB)
2025-04-01_11-27-53.mp4.gif (834×936 px, 1 MB)
Restricted Application added a subscriber: alaa. · View Herald TranscriptApr 1 2025, 8:43 PM
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.

Tested and works as expected.