From b61df09b943b09ff79d37655968aa3f64c84422c Mon Sep 17 00:00:00 2001 From: Henning Date: Tue, 8 Jun 2021 00:32:18 +0200 Subject: [PATCH] Internationalize date format (#2685) * Changed view_date helper to use datetime format from i18n * Removed German translation for date format, should be added via transifex Co-authored-by: Henning Schumann Co-authored-by: Ahmad Farhat --- app/helpers/application_helper.rb | 2 +- config/locales/en.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 238cddf3..b0f8625d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -135,6 +135,6 @@ module ApplicationHelper # Returns a more friendly/readable date time object def view_date(date) return "" if date.nil? # Handle invalid dates - local_time(date, "%b %d, %Y %-I:%M%P") + local_time(date, :default) end end diff --git a/config/locales/en.yml b/config/locales/en.yml index f305cb0e..b6fb72af 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -645,6 +645,9 @@ en: test_install: > This deployment is using a pre-configured testing server, you should replace this with your own. For details, see the %{href}. + time: + formats: + default: "%b %d, %Y %-I:%M%P" update: Update verify: accept: Verify