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

Use a supported locale for localization #156

Closed
wants to merge 1 commit into from

Conversation

sundling
Copy link

The changes in #137 causes the exception I18n::InvalidLocale: :en is not a valid locale to be raised if the application doesn't support the en locale.
It could be that the application uses en-US instead or maybe an English locale isn't available at all.

This change fixes the exception by looking for English based locales and will fallback to I18n.default_locale if none is found.
Sorting the locales ensure that en is used if it is available.

Look for English based locales and fallback to I18n.default_locale if none is found.
Uses :en if available.
@rosa
Copy link
Member

rosa commented Oct 30, 2024

Thanks a lot @sundling, and sorry for the delay! I've been busy with other stuff and haven't dedicated time to Mission Control lately, but I'm finally focused on it. In the end, I think I'm going to go with #184 so that we don't need to set the locale, and it's also simpler.

@rosa rosa closed this Oct 31, 2024
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

Successfully merging this pull request may close these issues.

2 participants