cht-core
cht-core copied to clipboard
Changing application and outgoing message languages does not seem to work properly
Important: This is a public repository. Anyone in the world can see what's posted here. If you are posting screenshots or log files, please carefully examine them for the presence of any kind of protected health information (PHI). Images or logs containing PHI must be posted in fully-redacted form, with no visible PHI.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
-
Go to '/admin/#/display/languages'
-
Change application language to French and submit
-
Change outgoing language to French and submit
-
Change application language to Spanish and submit
-
Change outgoing language to Spanish and submit
-
See that application language is still in French
-
Go to
outgoing messages
:/admin/#/message-queue/scheduled?page=1
-
see errors
Expected behavior User should be able to switch languages and changes should apply immediately Logs None
Screenshots https://www.loom.com/share/80cc0f03fc1048158a8b4234e41e755e Environment
- Instance: (eg: alpha-cht.dev.medicmobile.org, etc)
- Browser: (eg: Firefox, Chrome, incognito mode, etc, which worked, which didn't)
- Client platform: (eg: Windows, MacOS, Linux)
- App: (eg: webapp, admin, sentinel, api, couch2pg, cht-conf, etc)
- Version: (eg: 3.16.0-beta.2.)
Additional context Add any other context about the problem here. What have you tried? Is there a workaround?
For the outgoing messages errors, do you have the message keys translated in the language that you switched to?
Scheduled messages texts are generated on the fly, by the admin app, depending on the selected outgoing language.
User should be able to switch languages and changes should apply immediately
In my testing, a users language takes precedence over the default settings in the admin UI. So when I set my user's language in cht core via hamburger -> user settings -> Edit user profile:
This overrules what the App Admin -> Display -> Languages -> default app language.
I believe messages are always sent in default message language, regardless of the user preference that you're sending it to.
Maybe this has changed such that before 3.16 it worked differently?
Thanks @mrjones-plip . It seems to behave the same on master, so I won't be an issue for this release in any case. I will look deeper into this.
@ngaruko Can you please try and reproduce this, or close it if you're happy with the responses above?
@garethbowen Seems to work as expected. Closing this . 👍