mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 22:36:18 +08:00
Merge pull request #437 from kubabrecka/i18n_serverside_date_2
2nd try: localize date formats on server side
This commit is contained in:
commit
dff9d65cc9
|
@ -40,7 +40,7 @@ class UserNotifications < ActionMailer::Base
|
||||||
|
|
||||||
@site_name = SiteSetting.title
|
@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
|
# A list of new topics to show the user
|
||||||
@new_topics = Topic.new_topics(min_date)
|
@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}>",
|
from: "#{I18n.t('user_notifications.digest.from', site_name: SiteSetting.title)} <#{SiteSetting.notification_email}>",
|
||||||
subject: I18n.t('user_notifications.digest.subject_template',
|
subject: I18n.t('user_notifications.digest.subject_template',
|
||||||
:site_name => @site_name,
|
:site_name => @site_name,
|
||||||
:date => Time.now.strftime("%m-%d-%Y"))
|
:date => I18n.l(Time.now, format: :short))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
cs:
|
cs:
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
short: "%d.%m.%Y"
|
||||||
|
|
||||||
title: "Discourse"
|
title: "Discourse"
|
||||||
topics: "Témata"
|
topics: "Témata"
|
||||||
loading: "Nahrávám"
|
loading: "Nahrávám"
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
en:
|
en:
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
short: "%m-%d-%Y"
|
||||||
|
|
||||||
title: "Discourse"
|
title: "Discourse"
|
||||||
topics: "Topics"
|
topics: "Topics"
|
||||||
loading: "Loading"
|
loading: "Loading"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user