messagerie: better format message dates

This commit is contained in:
Pierre de La Morinerie 2018-09-06 13:04:43 +00:00 committed by gregoirenovel
parent fe13871380
commit 211674435e
5 changed files with 57 additions and 1 deletions

View file

@ -0,0 +1,10 @@
{
:en => {
:time => {
:formats => {
:message_date => lambda { |time, _| "%B #{time.day.ordinalize} at %H:%M" },
:message_date_with_year => lambda { |time, _| "%B #{time.day.ordinalize} %Y at %H:%M" }
}
}
}
}

View file

@ -0,0 +1,10 @@
{
:fr => {
:time => {
:formats => {
:message_date => lambda { |time, _| "le #{time.day == 1 ? '1er' : time.day} %B à %H h %M" },
:message_date_with_year => lambda { |time, _| "le #{time.day == 1 ? '1er' : time.day} %B %Y à %H h %M" }
}
}
}
}