From 7cc57968bc8f6596869b80f3dff531bd03528ebe Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 25 Dec 2022 00:29:24 +0100 Subject: [PATCH] Localize Sidekiq dashboard panel --- app/views/admin/dashboard/_sidekiq.html.haml | 16 ++++++---------- config/locales/views.en.yml | 13 +++++++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/views/admin/dashboard/_sidekiq.html.haml b/app/views/admin/dashboard/_sidekiq.html.haml index c937154d..6ce7fa7f 100644 --- a/app/views/admin/dashboard/_sidekiq.html.haml +++ b/app/views/admin/dashboard/_sidekiq.html.haml @@ -1,26 +1,22 @@ .card .card-header %a.d-flex{ href: sidekiq_web_path } - %strong Sidekiq + %strong= t(".title") %i.fa.fa-chevron-right.ml-auto.align-self-center - unless @sidekiq[:processes].count.positive? .card-body.bg-danger.text-light - %strong There are no Sidekiq processes running. - Background jobs will not be processed. - %br - To fix this, run - %tt RAILS_ENV=#{Rails.env} bundle exec sidekiq + = t(".error_html", env: Rails.env) .list-group .list-group-item.d-flex - %span Processes + %span= t(".processes") %span.ml-auto= @sidekiq[:processes].count .list-group-item.d-flex - %span Enqueued + %span= t(".enqueued") %span.ml-auto= @sidekiq[:stats].enqueued .list-group-item.d-flex - %span Retries + %span= t(".retries") %span.ml-auto= @sidekiq[:stats].retry_size .list-group-item.d-flex - %span Dead + %span= t(".dead") %span.ml-auto= @sidekiq[:stats].dead_size diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index f419a71a..02f0f2ad 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -88,6 +88,19 @@ en: title: "Create Announcement" edit: title: "Edit Announcement" + dashboard: + sidekiq: + title: "Sidekiq" + error_html: | + There are no Sidekiq processes running. + Background jobs will not be processed. +
+ To fix this, run + RAILS_ENV=%{env} bundle exec sidekiq + processes: "Processes" + enqueued: "Enqueued" + retries: "Retries" + dead: "Dead" answerbox: header: anon_hint: :inbox.entry.anon_hint