From 21cd0f04cfc97d8037c150ed85617d14bd8b78b0 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Tue, 13 Feb 2007 05:48:47 +0000 Subject: [PATCH] Fix pluralization of due dates. (No more "Due in 1 days") git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@438 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/helpers/application_helper.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tracks/app/helpers/application_helper.rb b/tracks/app/helpers/application_helper.rb index 2e29fcfa..83fe7258 100644 --- a/tracks/app/helpers/application_helper.rb +++ b/tracks/app/helpers/application_helper.rb @@ -63,21 +63,21 @@ module ApplicationHelper case days # overdue or due very soon! sound the alarm! when -1000..-1 - "Overdue by " + (days * -1).to_s + " days " + "Overdue by #{pluralize(days * -1, 'day')} " when 0 - "Due Today " + "Due Today " when 1 - "Due Tomorrow " + "Due Tomorrow " # due 2-7 days away when 2..7 if @user.prefs.due_style == "1" - "Due on " + due.strftime("%A") + " " + "Due on #{due.strftime("%A")} " else - "Due in " + days.to_s + " days " + "Due in #{pluralize(days, 'day')} " end # more than a week away - relax else - "Due in " + days.to_s + " days " + "Due in #{pluralize(days, 'day')} " end end