Skip to content

Commit

Permalink
Define available_locales_set to not pollute the global one
Browse files Browse the repository at this point in the history
In multi-threaded servers when Mission Control is requested before other
pages in the host app.

Fixes #229
  • Loading branch information
rosa committed Jan 2, 2025
1 parent 66f829f commit ca09138
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/mission_control/jobs/i18n_config.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
class MissionControl::Jobs::I18nConfig < ::I18n::Config
AVAILABLE_LOCALES = [ :en ]
AVAILABLE_LOCALES_SET = [ :en, "en" ]
DEFAULT_LOCALE = :en

def available_locales
[ :en ]
AVAILABLE_LOCALES
end

def available_locales_set
AVAILABLE_LOCALES_SET
end

def default_locale
:en
DEFAULT_LOCALE
end
end

0 comments on commit ca09138

Please sign in to comment.