Skip to content

Commit

Permalink
Set default_locale for custom I18n config
Browse files Browse the repository at this point in the history
Otherwise, the `with_locale` block will try to set back any locale set
by the host app, which might or might not be :en, leading to an
`I18n::InvalidLocale` error.

Addresses #219.
  • Loading branch information
rosa committed Dec 4, 2024
1 parent b248534 commit cb81c47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mission_control/jobs/i18n_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ class MissionControl::Jobs::I18nConfig < ::I18n::Config
def available_locales
[ :en ]
end

def default_locale
:en
end
end

0 comments on commit cb81c47

Please sign in to comment.