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

Rewrite locale generator, update translations, and add new languages #43

Merged
merged 2 commits into from
Aug 31, 2016
Merged

Rewrite locale generator, update translations, and add new languages #43

merged 2 commits into from
Aug 31, 2016

Conversation

brunofacca
Copy link
Contributor

Summary

The locale generator was copying outdated locale dictionaries from the locales directory into the app. I have rewritten it to download the locale dicts from the devise-i18n repository. That way, generated dicts will always be up to date. The README was updated to reflect this new behavior.

The locale dicts in the locales directory were updated (copied from the devise-i18n repo), and new languages were added.

Issues for further discussion

Those changes introduced an inconsistency: locale dicts downloaded by the generator will always be up to date, whereas the dictionaries in the locales directory are not updated automatically and will soon be outdated.

I've noticed an initializer in the devise-bootstrap-views.rb file which loads locale dicts from the locales directory corresponding to the application's available_locales. If I understood that correctly, it is supposed to provide locale dicts without the need for manually downloading them or running the generator. Is that correct?

That initializer seems to be the only piece of code using the files in the locales directory. If that's correct and you agree to eliminate the initializer, we could probably remove the locales directory altogether and prevent the translations from being outdated. That will force the user to download the locale dict manually or run the generator, which may be inconvenient but will ensure the dicts are always up to date. What do you think?

This is my first contribution to an open source project, so please let me know if I'm breaking any "pull request etiquette" rules.

@hisea
Copy link
Owner

hisea commented Aug 31, 2016

Thanks you so much for the contribution 👍

@hisea hisea merged commit d96eb0c into hisea:master Aug 31, 2016
@brunofacca brunofacca deleted the new-locale-generator branch August 31, 2016 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants