Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Make it easy for future translator to identify what phrases are needed to translate #862

Closed
mqchau opened this issue Dec 13, 2016 · 1 comment

Comments

@mqchau
Copy link
Contributor

mqchau commented Dec 13, 2016

Expected behavior:
A developer adds new modal and use i18n to translate the modal title. He forgot to put that new phrase into the translation files. A unit test runs to rearrange the keys in the language JSON files in alphabetical order and record the missing translations on other languages in a separate file. This way translators can look at that file and knows exactly what was missing.

Actual behavior:
A developer adds new modal and use i18n to translate the modal title. He put the English phrase into the translation files. No unit tests error and eventually the English version is ahead of others. Translators for spanish, turkish... don't know which phrases are left to translate from English to their language.

@jkleinsc , I can do this unit test. I think it is necessary for to internationalize the program. What do you think?

@jkleinsc
Copy link
Member

@mqchau I think that is a great idea! I have a couple of thoughts

  1. The acceptance tests already test to see if there are missing English translations. We could adapt to test for every translation. The downside of this is that it would take much longer to run the tests because you would be running them for multiple languages.
  2. I am wondering if any tests we run on translations should throw errors or just throw warnings? We may want to go with warnings instead of test failures, because if the translations fail, developers may be tempted to put English text into the translated files just to get tests to pass. I guess that is better than not having values, but I am wondering if warnings would be better than errors.
  3. Instead of checking in a unit test, maybe there is a separate build type tool that could be run ad hoc for translators to find missing translations? This would be the least intrusive and I'm actually surprised there isn't something like this for ember-i18n already.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants