diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index b60e9a0b0..a49f1578c 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -58,4 +58,12 @@ module NotificationsHelper def peoples_names(note) note.actors.map{|p| p.name}.join(", ") end + + def the_day(i18n) + i18n[0].match(/\d/) ? i18n[0].gsub('.', '') : i18n[1].gsub('.', '') + end + + def the_month(i18n) + i18n[0].match(/\d/) ? i18n[1] : i18n[0] + end end diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 8876264ca..9d5faf6cb 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -14,8 +14,8 @@ .day_group.span-24.last .span-3 .date - .day= day.split(' ').first.chop - .month= day.split(' ').last + .day= the_day(day.split(' ')).gsub('.', '') + .month= the_month(day.split(' ')) .span-8.notifications_for_day - notes.each do |note|