Skip to content

Does not work in environments where :en is not allowed as a locale #244

@wout

Description

@wout

Our app only supports :fr and :nl, and enforces those two locales. Mission control will crash in that case:

 I18n::InvalidLocale: :en is not a valid locale raise I18n::InvalidLocale.new(locale) if !locale_available?(locale) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    def enforce_available_locales!(locale)
      if locale != false && config.enforce_available_locales
        raise I18n::InvalidLocale.new(locale) if !locale_available?(locale)
      end
    end

I've now worked around it by adding :en and creating a fallback to :nl:

    config.i18n.available_locales = %i[nl fr en]
    config.i18n.fallbacks[:en] = :nl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions