cht-core icon indicating copy to clipboard operation
cht-core copied to clipboard

Changing application and outgoing message languages does not seem to work properly

Open ngaruko opened this issue 2 years ago • 4 comments

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:

  1. Go to '/admin/#/display/languages'

  2. Change application language to French and submit

  3. Change outgoing language to French and submit image

  4. Change application language to Spanish and submit

  5. Change outgoing language to Spanish and submit

  6. See that application language is still in French image

  7. Go to outgoing messages: /admin/#/message-queue/scheduled?page=1

  8. see errors image

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?

ngaruko avatar Aug 07 '22 23:08 ngaruko

For the outgoing messages errors, do you have the message keys translated in the language that you switched to?

dianabarsan avatar Aug 08 '22 07:08 dianabarsan

Scheduled messages texts are generated on the fly, by the admin app, depending on the selected outgoing language.

dianabarsan avatar Aug 08 '22 08:08 dianabarsan

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:

image

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?

mrjones-plip avatar Aug 08 '22 17:08 mrjones-plip

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 avatar Aug 09 '22 07:08 ngaruko

@ngaruko Can you please try and reproduce this, or close it if you're happy with the responses above?

garethbowen avatar Sep 13 '23 00:09 garethbowen

@garethbowen Seems to work as expected. Closing this . 👍

ngaruko avatar Sep 18 '23 05:09 ngaruko