From e51036fd8f9263b45697680b4d6f6986144507d9 Mon Sep 17 00:00:00 2001 From: Carlo Beltrame Date: Wed, 27 Sep 2023 15:53:51 +0200 Subject: [PATCH] Improve process step date display Refs #404 --- .../participatory_processes/participatory_process_helper.rb | 2 +- config/locales/de.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/helpers/decidim_zuerich/participatory_processes/participatory_process_helper.rb b/app/helpers/decidim_zuerich/participatory_processes/participatory_process_helper.rb index 5de2067b..0e465deb 100644 --- a/app/helpers/decidim_zuerich/participatory_processes/participatory_process_helper.rb +++ b/app/helpers/decidim_zuerich/participatory_processes/participatory_process_helper.rb @@ -6,7 +6,7 @@ def step_dates(participatory_process_step) dates = [participatory_process_step.start_date, participatory_process_step.end_date].compact case dates.count - when 0 then "Kein Datum angegeben" + when 0 then I18n.t('decidim_zuerich.participatory_processes.participatory_process_helper.step_dates.no_dates') when 1 then localize(dates.first.to_date, format: :default) when 2 then "#{localize(dates.first.to_date, format: :default)} - #{localize(dates.second.to_date, format: :default)}" else "" diff --git a/config/locales/de.yml b/config/locales/de.yml index eeed36fe..3617ecd9 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1077,6 +1077,10 @@ de: didn_t_receive_confirmation_instructions: Haben Sie keine Bestätigungsmail erhalten? didn_t_receive_unlock_instructions: Haben Sie keine Entsperrungsanweisungen erhalten? decidim_zuerich: + participatory_processes: + participatory_process_helper: + step_dates: + no_dates: 'Kein Datum angegeben' devise: mitwirken: devise: