mekomsolutions / openmrs-module-initializer

The OpenMRS Initializer module is an API-only module that processes the content of the configuration folder when it is found inside OpenMRS' application data directory.
MIT License
23 stars 79 forks source link

Message Source should interpret messages.properties with no suffix as English #212

Closed mogoodrich closed 1 year ago

mogoodrich commented 1 year ago

In OpenMRS, the convention is for the "default" messages properties files (ie messages.properties) to be in English.

However, the Message Source service in Initializer is set to interpret these files as being in the system default locale.
This is problematic. For example, on a server where the OS default is set to Spanish, the "messages.properties" will be added as Spanish keys, potentially overriding any actual translations provided in "messages_es.properties".

Additionally, since English is, by convention generally the only language there is guaranteed to be a translation for, and because generally we prefer display text in some language rather than raw message code, we should provide English as the final fallback when translating.

mogoodrich commented 1 year ago

PR here: https://github.com/mekomsolutions/openmrs-module-initializer/pull/213

mogoodrich commented 1 year ago

fyi @mseaton @mks-d

mks-d commented 1 year ago

This was merged at https://github.com/mekomsolutions/openmrs-module-initializer/commit/e29810df73f800510f0d602e270051f0765f2126

Thanks so much @mogoodrich!