summaryrefslogtreecommitdiffstats
path: root/lib/redmine/i18n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/i18n.rb')
-rw-r--r--lib/redmine/i18n.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
index 0488fa289..a9cd1dd0d 100644
--- a/lib/redmine/i18n.rb
+++ b/lib/redmine/i18n.rb
@@ -50,12 +50,12 @@ module Redmine
end
def l_hours(hours)
- hours = hours.to_f
+ hours = hours.to_f unless hours.is_a?(Numeric)
l((hours < 2.0 ? :label_f_hour : :label_f_hour_plural), :value => format_hours(hours))
end
def l_hours_short(hours)
- l(:label_f_hour_short, :value => format_hours(hours.to_f))
+ l(:label_f_hour_short, :value => format_hours(hours.is_a?(Numeric) ? hours : hours.to_f))
end
def ll(lang, str, arg=nil)