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

Clarify i18n load paths gotcha #34241

Merged
merged 2 commits into from
Oct 22, 2018

Conversation

gmcgibbon
Copy link
Member

Closes #29365.

Remove unnecessary #to_s in directory glob example code and adds a note about overriding translations from external gems.

r? @rafaelfranca

@@ -135,6 +135,8 @@ I18n.available_locales = [:en, :pt]
I18n.default_locale = :pt
```

Note that appending directly to `I18n.load_paths` instead of the application configured i18n will _not_ override translations from external gems.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm Spanish and I don't speak English natively, but I would say this reads better to me:

Suggested change
Note that appending directly to `I18n.load_paths` instead of the application configured i18n will _not_ override translations from external gems.
Note that appending directly to `I18n.load_paths` instead of to the application's configured i18n will _not_ override translations from external gems.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I'll use that. I don't want this change to be multiple commits, so I'll just give you credit in the commit message for the contributors app to pick up on instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @gmcgibbon !

Sadly credit went to the wrong place, it went here -> Alberto Almagro Sotelo but my commits are really here -> Alberto Almagro.

How can we fix that?

Clarify `I18n.load_paths` vs `Rails.application.config.i18n.load_paths`
behaviour.

[Gannon McGibbon + Alberto Almagro Sotelo]
@gmcgibbon gmcgibbon force-pushed the clarify_i18n_load_paths_gotcha branch from 650a9cb to 5c62bd5 Compare October 22, 2018 15:51
@rafaelfranca rafaelfranca merged commit 64385bd into rails:master Oct 22, 2018
@gmcgibbon gmcgibbon deleted the clarify_i18n_load_paths_gotcha branch October 23, 2018 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants