messagerie: better format message dates
This commit is contained in:
parent
fe13871380
commit
211674435e
5 changed files with 57 additions and 1 deletions
10
config/locales/time_format.en.rb
Normal file
10
config/locales/time_format.en.rb
Normal 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" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
config/locales/time_format.fr.rb
Normal file
10
config/locales/time_format.fr.rb
Normal 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" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue