Rewrite locale generator, update translations, and add new languages #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.