UX: Use localized time format in embedded comments (#28014)
Previously, the time format for embedded comments was hardcoded. This commit changes it to the time format defined in I18n. Related meta topic: https://meta.discourse.org/t/embed-dates-are-not-localized/27997/
This commit is contained in:
parent
0eeebeb6b1
commit
dfd4da9656
|
@ -8,9 +8,9 @@ module EmbedHelper
|
|||
distance_of_time_in_words(dt, current)
|
||||
else
|
||||
if dt.year == current.year
|
||||
dt.strftime("%e %b")
|
||||
dt.strftime I18n.t("datetime_formats.formats.short_no_year")
|
||||
else
|
||||
dt.strftime("%b '%y")
|
||||
dt.strftime I18n.t("datetime_formats.formats.no_day")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue