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

i18n fallbacks should not be overridden #904

Open
kreba opened this issue Nov 24, 2021 · 0 comments
Open

i18n fallbacks should not be overridden #904

kreba opened this issue Nov 24, 2021 · 0 comments

Comments

@kreba
Copy link

kreba commented Nov 24, 2021

Thank you for your work on this valuable gem 🙏

We are translating our application to many locales and we want our default_locale to be :de-CH, but we still want to ultimately fall back to :en because this is Spree's master locale.

So we want to configure app.config.i18n.fallbacks = [:de, :en]

However, the initializer spree_i18n.environment sets app.config.i18n.fallbacks = true, thus replacing any previous fallback configuration.

app.config.i18n.fallbacks = true

Please change this to app.config.i18n.fallbacks ||= true (note the ||=) so our application can configure its own fallbacks.

Possible workaround for now: Our application can configure the fallbacks in a config.after_initialize do ... end block. That seems to do the trick. But we can't be sure that spree_i18n's initialization works as intended if we do this.

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

No branches or pull requests

1 participant