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

"enable: false" does not works. #6

Open
kyohsuke opened this issue Mar 13, 2018 · 1 comment
Open

"enable: false" does not works. #6

kyohsuke opened this issue Mar 13, 2018 · 1 comment

Comments

@kyohsuke
Copy link

Hi, aderyabin.

I'm trying to disable some locales with .localer.yml.
BR, TR and AR are fine but zh-CN, zh-TW and de-CH does not works.

It seems that XX-YY locales does not works.
how do I disable it?

Thanks.

@leoshaw
Copy link
Contributor

leoshaw commented Mar 29, 2019

I'm having the same issue and think it's due to the Locale keys in .localer.yml being down-cased before being compared to the locales in the app, e.g. even if you put

Locale:
  zh-CN:
    Enabled: false

in your config, it'll be converted to zh-cn before being compared. I'll submit a PR later, but in the meantime if you vendor the gem then change this line

next unless config.locale[locale].enabled
to read

          next unless config.locale[locale.downcase].enabled

then it should do what you need.

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

2 participants