Page MenuHomePhabricator

mobile-html: localize UI strings
Closed, ResolvedPublic

Description

Background information

The apps currently send localized strings across the JS bridge to mobile-html. Initially (T205550) this was a convenient tradeoff, but it's becoming more of a burden as more functionality is added to the page. For example, if we wanted to start showing reference types (book, website, etc) as show in the designs for T244615, the clients would have to be updated to pass all of those strings across the bridge.

What

Localize mobile-html

How

  • Utilize banana-i18n and the strings from the iOS app to read localizations from the server-side and client-side JS (patch open)
  • Expose new endpoint for /data/i18n/pcs endpoint via RESTBase T247096
  • Add the project to translatewiki (tracked by T246659)

Acceptance criteria

  • mobile-html is localized based on the language of the page regardless of user Accept-Language since it's part of the article content - de.wikipedia.org shows German strings, es.wikipedia.org shows Spanish strings
  • Accept-Language is used to detect variant for wikis that support variants (zh, sr, etc)
  • If a string is missing for a given language, english is used as a fallback

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 29 2020, 11:36 AM
JoeWalsh triaged this task as Medium priority.
JoeWalsh moved this task from Needs triage to Kanban on the Product-Infrastructure-Team-Backlog board.

Change 575323 had a related patch set uploaded (by Joewalsh; owner: Joewalsh):
[mediawiki/services/mobileapps@master] i18n for mobile-html

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

JoeWalsh updated the task description. (Show Details)Mar 2 2020, 1:37 PM
bearND updated the task description. (Show Details)Mar 2 2020, 7:44 PM
bearND updated the task description. (Show Details)Mar 4 2020, 5:19 PM

Change 575323 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] i18n for mobile-html

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

bearND added a subscriber: bearND.Mar 6 2020, 5:53 PM

Change 581558 had a related patch set uploaded (by Joewalsh; owner: Joewalsh):
[mediawiki/services/mobileapps@master] Update i18n

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

Change 581558 abandoned by Joewalsh:
Update i18n

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

Change 581606 had a related patch set uploaded (by Joewalsh; owner: Joewalsh):
[mediawiki/services/mobileapps@master] Update i18n

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

Change 581606 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Update i18n

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

bearND closed this task as Resolved.Apr 2 2020, 6:15 PM
bearND closed subtask T247096: Expose new PCS i18n endpoint as Resolved.