Page MenuHomePhabricator

Language selector entry point to Section Translation needs adjustment
Closed, ResolvedPublic

Description

On mobile, when an article is missing in a given language, it is now surfaced when searching for it as an entry point to Section Translation (T286645). This is available for languages where the tool is enabled such as Bengali or Thai. However, there are still some aspects that need adjustment from the current behaviour:

  • The entry point should be visible even if the Content Translation beta feature is disabled
  • The navigation to Section Translation should happen in the same window (not a new window/tab)
  • The mobile version should not be lost when navigating from the mobile version of an article to the tool on desktop

More detail about each aspect below.

The entry point should be visible even if the Content Translation beta feature is disabled

Currently, if the Content Translation beta feature is not enabled, the entry point to translate is not shown when searching for a language such as Thai.

Screenshot 2021-10-08 at 12.22.56 2.png (637×1 px, 167 KB)

The expected behaviour would be for the invite to translate an article to be visible when the beta feature is disabled and when it is enabled:

en.m.wikipedia.org_wiki_Tenderloin,_San_Francisco(iPhone 6_7_8).png (667×375 px, 34 KB)

On mobile there is no clear path to adjust beta features. Given that we show the invite when searching for a specific language, I think that additional restrictions would only add confusion.

The navigation to Section Translation should happen in the same window (not a new window/tab)

Currently, when users access Section Translation, it is opened on a new window.
The expected result would be to just support it as a standard navigation (opening Section Translation in the same tab/window). Since it is a natural continuation and the user is not expected to frequently return back to the previous point (i.e., there is no need to keep the previous context).

The mobile version should not be lost when navigating from the mobile version of an article to the tool on desktop.

Opening this link on desktop shows the mobile version of the article. Currently, opening the language switcher and searching for Thai provides the option to translate which uses this link: https://th.wikipedia.org/wiki/Special:ContentTranslation?from=en&to=th&campaign=mflanguagesearcher&sx=true&page=Tenderloin%2C+San+Francisco
Notice that the domain changed from "en.m.wikipedia.org" to "en.wikipedia.org" (i.e., the ".m" part was lost). This results in the user navigating to Content Translation instead of Section Translation.

The expected behaviour would be for the domain to remain the same ("en.m.wikipedia.org") and the user to reach to the mobile version of Section Translation.

This issue does not happen when using a mobile device, it only happens when accessing the mobile version with a desktop device.

Event Timeline

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

[mediawiki/extensions/ContentTranslation@master] SX: Enable language selector entry point even if CX beta is disabled

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

Change 729233 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Enable language selector entry point even if CX beta is disabled

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

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

[mediawiki/extensions/ContentTranslation@master] SX language selector entry point: Navigate to SX within the same tab

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

Change 729902 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX language selector entry point: Navigate to SX within the same tab

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

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

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211011

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

Change 729973 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211011

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

The 2 first issues has been solved. Pending: The mobile version should not be lost when navigating from the mobile version of an article to the tool on desktop. @santhosh from what I have checked there is no existing method that constructs a wiki URL and respects the .m part of the URL (only for production of course). Is there any such function known to you or we should add some extra logic to SiteMapper to support this? (probably by checking location.hostname and adding a new template inside ContentTranslationSiteTemplates configuration parameter)

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

[mediawiki/extensions/ContentTranslation@master] mw.cx.SiteMapper: Add isMobile method and use it inside getPageUrl

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

Change 736487 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX SiteMapper: Add isMobileDomain method and use it inside getPageUrl

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

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

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211108

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

Change 737354 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211108

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

Pginer-WMF updated the task description. (Show Details)