diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index 22967bb6fbd..4a1bc1de907 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -40,7 +40,7 @@ class UserNotifications < ActionMailer::Base @site_name = SiteSetting.title - @last_seen_at = (@user.last_seen_at || @user.created_at).strftime("%m-%d-%Y") + @last_seen_at = I18n.l(@user.last_seen_at || @user.created_at, format: :short) # A list of new topics to show the user @new_topics = Topic.new_topics(min_date) @@ -54,7 +54,7 @@ class UserNotifications < ActionMailer::Base from: "#{I18n.t('user_notifications.digest.from', site_name: SiteSetting.title)} <#{SiteSetting.notification_email}>", subject: I18n.t('user_notifications.digest.subject_template', :site_name => @site_name, - :date => Time.now.strftime("%m-%d-%Y")) + :date => I18n.l(Time.now, format: :short)) end end diff --git a/config/locales/server.cs.yml b/config/locales/server.cs.yml index 48992245be8..5709ce9caca 100644 --- a/config/locales/server.cs.yml +++ b/config/locales/server.cs.yml @@ -1,4 +1,8 @@ cs: + time: + formats: + short: "%d.%m.%Y" + title: "Discourse" topics: "Témata" loading: "Nahrávám" diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 7bf4b0edbe2..0f6c9df231c 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1,4 +1,8 @@ en: + time: + formats: + short: "%m-%d-%Y" + title: "Discourse" topics: "Topics" loading: "Loading"