Page MenuHomePhabricator

Allow app language to always match device language
Closed, ResolvedPublic

Description

Problem

By default, the Wikipedia app language is set to match the device language when the app is first installed/launched. However, if the user changes the language on the phone after installing and using the app, the app language does not change to match the new choice.

Request

The app will default to the device’s language when the device’s language changes

Event Timeline

A possible user workflow

  1. User install the app, device language en
  2. Open the app, it's on device language en
  3. User changes the app language to de
  4. Close the app
  5. Open again the app, it's still on de
  6. Close the app
  7. User changes the device language to fr
  8. Open the app, it's on device language fr

To clarify what is "Close the app", it has two scenarios

  1. app running in the background after closing
  2. exit the app completely

TBD whether we apply the device language change in both scenerios, here's my option of the dev implementation

  1. for 1st scenario, detect the device language changes when the event listener visiblitychange is not hidden, that also means require language state for every page and listen to the device language change. (more complex in some page, for example in the search page when we have the query Cat, when the device language change we need to update app language and both search language)
  2. for the 2nd, only detect the device language changes when the app is "freshly" open (term freshly - new session)

The decision is covering only the 2nd scenario.

@hueitan this is working fine on Jio devices. I needed to install the app couple of times on Banana phone to get it right as the app was displaying like below-attached images. This case was mostly happening when before installing the app device language was set to other than English. I am not sure if this is related to this ticket or not, but I thought of putting it here as I didn't notice this earlier.

20200420_231205.jpg (4×1 px, 257 KB)
20200420_231214.jpg (4×1 px, 414 KB)

@SGautam_WMF this is pretty bad (but pretty good that you found it). Are you able to reproduce this issue? And if so, could you share what you are doing in details?

EDIT: I saw it too just now!

I saw it too! while trying in the different browser (chrome in my case), I can see it.

The hotfix (or other naming?) is here https://github.com/wikimedia/wikipedia-kaios/pull/211

Once this PR is merged, please test it again.

Thanks for finding the edge case here @SGautam_WMF

Ok, @hueitan I will wait for the PR to be merged.

Weird, I tried with the phone in spanish and portuguese and was working fine.
what language did you use?

I tried a couple of Indian languages including Hindi.

ok, must be a language that the app is not translated to.
missed that case, sorry team

It seems to be working fine now, moving it for product signoff.

I changed the language of the phone to a RTL language on Jio 2 knowing that we do not support that in the app yet.

Expected behaviour:

  1. App defaults to English
  2. I can interact with content in English in the app
  3. I can change the article language to the languages supported by the app

Errors:

  • Default seems to be English when l launched the app, but then I cannot search for content or search for language in the app menu

Moving this back for @Jpita to confirm.

@AMuigai can you tell me the RTL language you chose?

I chose Kashmiri, and it didn't work; the app worked with Urdu. Filing two bugs.

I chose Kashmiri, and it didn't work; the app worked with Urdu. Filing two bugs.

oh, you want to create new tickets and this one should go to sign off?

New tickets for RTL issues (related to not being supported on v1) filed to handle the pending issue here.