medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
441 stars 211 forks source link

Translations not loaded properly #9573

Closed 1yuv closed 1 hour ago

1yuv commented 2 hours ago

Describe the bug On 4.12.0, we added Nepali translations for missing keys and it was expected those keys to be translated to Nepali language after upgrade. However, even after upgrading an instance to 4.12.0, there are many translation keys that are not showing the translated text.

To Reproduce Steps to reproduce the behavior:

  1. Start any instance or upgrade to 4.12.
  2. Ensure your CHT language is set to Nepali.
  3. Go to admin section and go to SMS configuration (configuration.sms)
  4. Go to the third tab (configuration.sms.test.title). You'll see translations missing as shown on screenshot below.

Expected behavior All translation keys, that have the translation available should display the label on the properly translated text.

Screenshots Image

Environment

Additional context

1yuv commented 2 hours ago

Update:

This could be not an issue with CHT itself. Looks like the instance with issue has translations like this, where a translation was explicitely specified previoulsy when we had missing translation keys.

configuration.sms.settings = configuration.sms.settings
configuration.sms.test.description = configuration.sms.test.description
configuration.sms.test.message.description = configuration.sms.test.message.description
configuration.sms.test.number.validation.description = configuration.sms.test.number.validation.description
1yuv commented 1 hour ago

Confirming that translations are loaded and the original issue was caused by this.