Skip to content
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

Set translation fallback to use English (so UI does not show i18n keys) #487

Closed
bklang opened this issue Oct 12, 2021 · 3 comments · Fixed by #489
Closed

Set translation fallback to use English (so UI does not show i18n keys) #487

bklang opened this issue Oct 12, 2021 · 3 comments · Fixed by #489

Comments

@bklang
Copy link
Collaborator

bklang commented Oct 12, 2021

Doc: https://github.com/jamesarosen/ember-i18n/wiki/Doc:-Missing-Translations
Code: https://github.com/rubyforgood/Flaredown/blob/master/frontend/app/utils/i18n/missing-message.js

Here is an old issue that appears relevant: jamesarosen/ember-i18n#256

@bklang
Copy link
Collaborator Author

bklang commented Oct 12, 2021

Screen Shot 2021-10-12 at 3 37 08 PM

@bklang
Copy link
Collaborator Author

bklang commented Oct 12, 2021

On further investigation, the translations actually occur in the backend, and not in the frontend (Ember). The translation only took effect when I changed my country, and seems to ignore any locale hint provided by the browser/device.

@bklang
Copy link
Collaborator Author

bklang commented Oct 12, 2021

Found the source of the problem: the frontend requests a list of sexes via API, and the API is returning these malformed strings. This likely affects multiple endpoints. I'm working on a PR which will handle this more gracefully.

bklang added a commit that referenced this issue Oct 12, 2021
This avoids strings in the UI like "translation missing: pt.sex.male"

Fixes #487
benlangfeld pushed a commit that referenced this issue Oct 12, 2021
This avoids strings in the UI like "translation missing: pt.sex.male"

Fixes #487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant