in Angola, we wanted to change some of the translations on the UI provided by core. That includes i.e. app title, home screen text and some other messages. Moreover, we wanted to add our own messages, i.e. for the Contact Support link.
It seems that there is no support currently for this functionality. Malawi does not have this problem, because they could override messages_en.json files in the malawi-ui codebase.
In our case, there is no support for messages_pt.json files in codebase itself so we could not use this solution. We’ve added some of the missing and changed some of the existing translations in core transifex project which helped, but we cannot rely on this because this would mean that we would need to wait for next core release to see those translations as they are stored in released images for each component. There is no mechanism currently to refresh translations in already released UI components or in reference-ui so it indicates we need to wait for next release to get changed translations.
We didn’t have much time to do the research for using the separate transifex project for Angola so we went with a simpler solution.
Basically, as a temporary solution, we disabled language selection by overriding its markup and hiding it. Then we’ve added a single messages_en.json with all Portuguese translations so those would be considered as default instead of English messages from the core. It’s easy to get a single translated file with messages for any language from build reference-ui image.
This allows us to also add our own new messages i.e. for the Contact Support link and change any Portuguese translation but for the cost of disabling language selection.
The proposed solution by the core team is to use Transifex to provide custom translations for Angola. The problem is that we cannot refresh translations in separate UI components when they are released. That indicates we need to have a single TX project for angola-ui which will contain all custom translations for the Angola project which is currently implemented. This solution requires to have the source file in angola-ui with all messages that we want to change (or all messages from all components). Then we can translate those selected messages on Transifex as it is done in the core.
Firstly I was thinking about adding support for defining messages_.json files in UI code to override translations from transifex. This would require a lot of changes and it seems that the core team would advise against this solution and would like to focus on using Transifex.
We could also consider doing another language specific for Angola, i.e. Portuguese (Angola). I’m not sure how this solution could work exactly, one of the problems that I see is that we would have the fifth language to select on language dropdown. This would require a way to parametrized which languages we want to retrieve from Transifex as it is not configurable for now.
I was also thinking about uploading every source message on the UI and all translations to a single project for implementation so stakeholders can change translations by themselves without any need to udpate the codebase but I’m not sure if it would be possible without overriding already changed translations.
Another outstanding issue is that currently there is no way to change translations for backend and from what I’ve understood there is a desire to modify them, i.e. email notifications.
What do you think about this topic? Do you have any ideas on how to solve this issue differently?
PS. Sorry for posting this just before Tech Committee call