As mentioned in #4598:
as part of the Standard Child Health messaging we are setting up 60 months worth of monthly messages.
We are setting separate translation keys for each to allow independent changes to each month's message. For now there are three different messages that are repeated 8, 20, and 32 times. To avoid bloating the translations we should allow specifying a translation key within a translation.
For instance, we may want to do something like this:
month_01 = This is a monthly message
month_02 = ${month_01}
According to @dianabarsan:
[...]
propertieslibrary (which parses the translation files) supports this, but the option isn't used when our app calls it.
Another use case that may be covered by this is when we receive an App report (eg by a supervisor/nurse) and want to send an SMS to a different person (eg a CHW). In this case we would want to specify which translation key to send from within the form. We want to specify the translation key from within the form is because the logic for which message to send is already in the form, yet we want to send the SMS in the default language for outgoing messages -- not that of the user that submitted the report. This has been asked about for Standard, where outgoing messages to CHW are in Bengali, but the app is being used in English at the facility.
cc @jillrshah
For https://github.com/medic/medic-webapp/issues/4599#issuecomment-417164974 it would be nice to also show the SMS message content in the XForm. To do that efficiently it would be ideal to use the label for the translation_key directly in XForms. I thought we had a separate issue about that already but couldn't find it.
I would just like to echo that this is a feature request that would really help us in Standard because a lot of CHWs we support in last mile settings require a different dialect and our facility-based workflows are currently useless to those partners.
cc @diannakane
I think this issue is causing a crash. More details here.
To reproduce, add a new key with missing translations. The app will crash with the following errors in the console. Did you want to have a look at this @vimemo and advise?

There are two behaviours in translations that need some further fix :
a. It is possible to create a completely blank entry, which adds an empty row to the translations table:

with undefined as the key. I think we need to do this validation.

b. if one just creates a key (with no translations), that also will show a an empty row in the translations table (second empty row in the screenshot above).

Since this behaviour does not seem to show in v3.2, I am tempted to think that it might be a regression from the recent work around translations @garethbowen ?
What happens in 3.2?
What happens in 3.2?
In 3.2 (testing on gamma-b.dev) @garethbowen , when an empty key or an empty translations are submitted the app shows as if it is saving the translations, but nothing happens in the UI.
I think these are two separate issues:
Can you please raise those two bugs?
Adding search terms: translate translation angular nested contains