fixed displays of the days based on locale

This commit is contained in:
maxwell 2011-04-18 18:29:55 -07:00
parent 14bfdbd4a9
commit 62c164e1a4
2 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -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|