Closed sundling closed 3 weeks ago
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 https://github.com/rails/mission_control-jobs/pull/184 so that we don't need to set the locale, and it's also simpler.
The changes in #137 causes the exception
I18n::InvalidLocale: :en is not a valid locale
to be raised if the application doesn't support theen
locale. It could be that the application usesen-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.