1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-04 15:24:23 +01:00
fab-manager/lib/sidekiq/server_locale.rb
2022-07-25 15:13:28 +02:00

12 lines
266 B
Ruby

module FabManager
module Middleware
class ServerLocale
def call(worker_class, job, queue)
locale = job['locale'] || Rails.application.secrets.rails_locale
I18n.with_locale(locale) do
yield
end
end
end
end
end