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

Locale Fallback Fix #1284

Closed
wants to merge 1 commit into from
Closed

Locale Fallback Fix #1284

wants to merge 1 commit into from

Conversation

samirmansour
Copy link
Contributor

Changes location of locale settings to config/application.rb and adds more explicit settings for fallback to behave properly.

@samirmansour samirmansour linked an issue Jul 12, 2021 that may be closed by this pull request
@@ -35,6 +35,12 @@ class Application < Rails::Application
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.i18n.default_locale = :en
config.i18n.available_locales = %i(en zh-CN)
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 not sure if we can specify available locales given some folks may have provided their own at their site without pushing it back to us.

@johrstrom johrstrom self-requested a review July 12, 2021 14:57
Copy link
Contributor

@johrstrom johrstrom left a comment

Choose a reason for hiding this comment

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

I don't think this actually works. I mean, it doesn't actually fallback. I think we need to change the set_locale functionality described in the issue ticket (along with maybe the initializer?)

@johrstrom
Copy link
Contributor

This doesn't actually fallback like you'd expect. I think we need to remove some bits out of the controller and that initializer.

In any case, there's a replacement in #1314, so I'm closing this.

@johrstrom johrstrom closed this Aug 4, 2021
@johrstrom johrstrom deleted the locale-fallback-fix branch August 4, 2021 14:45
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.

locale fallbacks not working
3 participants