Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Generate production locales using 'compare-locales' #367

Merged
merged 3 commits into from
Aug 2, 2017

Conversation

pdehaan
Copy link
Contributor

@pdehaan pdehaan commented Jul 31, 2017

You can get the latest production locales (100% translations, zero errors) with npm run get-prod-locales or you can overwrite the package.json availableLanguages array with npm run get-prod-locales -- --write. We could make that a bit prettier by wrapping in another npm script, but hey...

Fixes #357
Fixes #364

@dannycoates
Copy link
Contributor

awesome! Should we add this to the circle build?

@pdehaan
Copy link
Contributor Author

pdehaan commented Jul 31, 2017

I have no idea when/if we want this. It almost feels weird to do this "arbitrary" decision in CI. I'm still trying to understand the implications, so I'd lean more towards managing these somewhat manually, so we have a hand-crafted, organic, artisanal selection of available locales.

I think the problem is that if one of us adds a new string, then commits it to en-US, all locales would fall to 99% and then be excluded from stage/prod until the localizers added that one missing string.

@pdehaan
Copy link
Contributor Author

pdehaan commented Jul 31, 2017

Plus, this step requires compare-locales Python tool, so we'd need to make sure we could add Python to Circle-CI, just to run this one script. Meh.

@@ -46,40 +46,38 @@
"license": "MPL-2.0",
"repository": "mozilla/send",
"availableLanguages": [
"en-US",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dannycoates Are these available languages in a "specific" order? I think my script just blindly A-z the locales, but wasn't sure if having "en-US" at the front is important, or if it serves as a fallback locale.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really, they're in the order the pontoon ui puts them. a-z is fine

Copy link
Contributor

@dannycoates dannycoates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, why not!

@dannycoates dannycoates merged commit d2dd9f4 into mozilla:master Aug 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants