Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to switch back-and-forth between two user language settings #6302

Open
derickl opened this issue Mar 17, 2020 · 2 comments
Open
Labels
Priority: 2 - Medium Normal priority Type: Bug Fix something that isn't working as intended

Comments

@derickl
Copy link
Member

derickl commented Mar 17, 2020

Describe the bug plus reproduction steps
Say the currently logged in user's default language is English.
When you change the current user's language to Swahili and immediately want to change to another language (say, English), you will notice the following:

  • the UI language change reflects immediately.
  • the language options will have English marked as the currently selected language
  • subsequent language changes will continue reflecting on the UI unless you are just switching between two languages (which will not work)

Expected behavior
One should be able to switch to any language (and back) without jumping through hoops

Logs
No errors are dumped on the console log.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • Instance: (local)
  • Browser: (Firefox 74, Chrome 80)
  • Client platform: (Linux/Mac)
  • App: webapp
  • Version: 3.8.x

Additional context
Add any other context about the problem here. What have you tried? Is there a workaround?

@derickl derickl added the Type: Bug Fix something that isn't working as intended label Mar 17, 2020
@garethbowen
Copy link
Member

The workaround is to do a full sync after selecting the language. I think this is because submitting the dialogue hits an API (http://localhost:5988/api/v1/users/<username>) which updates the user settings doc but you need to replicate this doc down in order to update the selected language in the dropdown.

This highlights a more serious issue which is the submission will fail if you're offline which is unexpected in an offline-first app.

One solution would be to update the user-settings in pouch so the locale on the device works properly, and then let it replicate to the server when you have a connection. We would then need some listener on the server to run the code the API call does. This may also require changes to allow users to update and replicate up their own user settings doc.

@garethbowen garethbowen added the Priority: 2 - Medium Normal priority label Mar 17, 2020
@garethbowen garethbowen added this to To do in 3.11.0 via automation Mar 17, 2020
@garethbowen
Copy link
Member

Moved to 3.12.0 to free up engineers to work on 3.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 - Medium Normal priority Type: Bug Fix something that isn't working as intended
Projects
Status: Todo
Development

No branches or pull requests

2 participants