diff --git a/lib/sidecloq/web.rb b/lib/sidecloq/web.rb index 7481751..7d6acdb 100644 --- a/lib/sidecloq/web.rb +++ b/lib/sidecloq/web.rb @@ -2,6 +2,7 @@ module Sidecloq # Plugin for sidekiq-web module Web VIEW_PATH = File.expand_path('../../../web/views', __FILE__) + LOCALES = File.expand_path('../../../web/locales', __FILE__) def self.registered(app) app.get '/recurring' do @@ -24,5 +25,7 @@ def self.registered(app) end end +Sidekiq::Web.locales << Sidecloq::Web::LOCALES + Sidekiq::Web.register(Sidecloq::Web) Sidekiq::Web.tabs['Recurring'] = 'recurring' diff --git a/web/locales/en.yml b/web/locales/en.yml new file mode 100644 index 0000000..f8b6e6c --- /dev/null +++ b/web/locales/en.yml @@ -0,0 +1,6 @@ +en: + RecurringJobs: Recurring Jobs + Recurring: Recurring + Name: Name + Cron: Cron + EnqueueNow: Enqueue Now diff --git a/web/locales/es.yml b/web/locales/es.yml new file mode 100644 index 0000000..8ac79ce --- /dev/null +++ b/web/locales/es.yml @@ -0,0 +1,6 @@ +es: + RecurringJobs: Trabajos recurrentes + Recurring: Recurrentes + Name: Nombre + Cron: Cron + EnqueueNow: Poner en la cola ahora diff --git a/web/views/recurring.erb b/web/views/recurring.erb index c34ca8a..f61c46f 100644 --- a/web/views/recurring.erb +++ b/web/views/recurring.erb @@ -1,15 +1,15 @@ -

Recurring Jobs

+

<%= t('RecurringJobs') %>

- - - - - - + + + + + + @@ -26,7 +26,7 @@
NameCronClassQueueArgumentsActions<%= t('Name') %><%= t('Cron') %><%= t('Job') %><%= t('Queue') %><%= t('Arguments') %><%= t('Actions') %>
<%= csrf_tag if respond_to?(:csrf_tag) %> - +