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

Help Center: I18n::InvalidLocale ("nb" is not a valid locale) #9271

Open
KonstantinReido opened this issue Apr 22, 2024 · 1 comment
Open
Labels

Comments

@KonstantinReido
Copy link

Describe the bug

I18n::InvalidLocale ("nb" is not a valid locale):
app/controllers/public/api/v1/portals/base_controller.rb:53:in `switch_locale_with_article'
app/controllers/public/api/v1/portals/base_controller.rb:24:in `set_locale'

On the UI (Help Center > Settings > Locales > Add locale), you provide the option to select several dialects of the Norwegian language, but your code doesn't recognize them.

Screenshot 2024-04-22 at 13 08 03

You set available locales here. And as result
I18n.available_locales returns the next list: [:en, :ar, :nl, :fr, :de, :it, :ja, :ko, :pt, :ru, :es, :ml, :ca, :el, :pt_BR, :ro, :ta, :fa, :zh_TW, :vi, :da, :tr, :cs, :fi, :id, :sv, :hu, :no, :zh_CN, :pl, :sk, :uk, :th, :lv, :is, :he, :lt, :sr], so Rails do not accept codes from the screenshot.

To Reproduce

  1. Set the locale for a portal to nb
  2. Create an article
  3. Try to preview it

Expected behavior

No response

Environment

Heroku

Cloud Provider

None

Platform

Browser

Operating system

No response

Browser and version

No response

Docker (if applicable)

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant