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.
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
Describe the bug
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.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 itExpected 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