-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔖 Re-design of Modes/Purpose Multilabel Translations #1007
Comments
Ok, so if It should not be hard to support both of these usage patterns using the same mechanism. The |
By default, we should check the dynamic label-options file, that way programs can use the "wordage" they prefer. For example, the en.json file might say "rickshaw", but the Lao translation might be more accurate to use "tuk tuk" which is more region-specific |
I am finding myself stuck on using const { t } = useTranslation(); in @JGreenlee do you have any advice for this? |
Like it says, you can't use a hook there. You can only use hooks in React code: at the top of a component, or at the top of another hook. To perform translation in non-React code: import i18next from "i18next";
...
...
const value = i18next.t('key'); |
Thanks @JGreenlee , that worked! Closed my old PR and created a new one with the changes described in this issue: PR e-mission/e-mission-phone#1065 |
The only other thing I could think to add to this issue, is to go through the other language files in e-mission-translate and add default translations for multilabel options |
Created multilabel translations for en.json and lo.json: e-mission/e-mission-translate#47 |
What's the issue with the current modes/purpose multilabel translations?
Regarding (1), I put my thoughts on how this implementation could work, along with some pros/cons in e-mission/e-mission-phone#1055 (comment). The issue with my proposed implementation is that some programs want to change the modes often, meaning that because "Every time a new mode/purpose is added for any given program, the phone code will need to be updated to reflect that because "en.json" is by default located within the e-mission-phone code" Which is not realistic to update the phone code for the frequency of changes that programs such as Lao require
The text was updated successfully, but these errors were encountered: