You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flow in which we should be calculating the language to use in the app is generally as follows:
If you explicitly selected a language in the app using the language settings, use that
Use the the language preference based on the system preferences
Use English
Assuming (1) is has not been done, switching the system language to a choice that the app does support does not update the the language in the app. This is the case the app is already opened and even after restarting the app.
To Reproduce
Steps to reproduce the behavior:
Do a fresh install
Open your Settings app (do not close CoMapeo)
Go to System -> Languages
Change the primary (or preferred, depending on Android version) language to something other than the current choice that is supported by the app
Go back to the app. You'll notice that the app does not update to make use of the newly selected system language
Restart the app. Upon re-opening, you'll notice that the app does not make use of the newly selected system language.
Expected behavior
In the case that the user has NEVER explicitly selected a language within the app's settings UI, the chosen language based on the user's system preferences should be reflected in the app.
Screenshots
system-language-issue.mp4
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Smartphone (please complete the following information):
Device: Pixel 6
OS: Android 15
Version: 1.2.0
Additional context
I think I already identified the issue in the code. It's related to our usage of persisted state for initializing and determining the active language that the app uses
Part of the issue here is that we don't have a way of understanding why the active language is being used. For example, I see that English is my selected language, but I have no idea if that's because my system preferences are being used, or if it's because at some point, I pressed the English option and our app persisted that in storage.
Most apps I use have an option in their language selection UIs along the lines of Follow system preferences and usually that's the default. Would be great to have something similar for ours or update the UI to communicate that somehow.
Describe the bug
The flow in which we should be calculating the language to use in the app is generally as follows:
Assuming (1) is has not been done, switching the system language to a choice that the app does support does not update the the language in the app. This is the case the app is already opened and even after restarting the app.
To Reproduce
Steps to reproduce the behavior:
System -> Languages
Expected behavior
In the case that the user has NEVER explicitly selected a language within the app's settings UI, the chosen language based on the user's system preferences should be reflected in the app.
Screenshots
system-language-issue.mp4
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
I think I already identified the issue in the code. It's related to our usage of persisted state for initializing and determining the active language that the app uses
https://github.com/digidem/comapeo-mobile/blob/309c374022d1bc46bfade1376761fd80113bb351/src/frontend/hooks/persistedState/usePersistedLocale.ts
The text was updated successfully, but these errors were encountered: