summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/i18n.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
index 4422bbe13..0091186f4 100644
--- a/lib/redmine/i18n.rb
+++ b/lib/redmine/i18n.rb
@@ -48,6 +48,10 @@ module Redmine
l((hours < 2.0 ? :label_f_hour : :label_f_hour_plural), :value => ("%.2f" % hours.to_f))
end
+ def l_hours_short(hours)
+ "%.2f h" % hours.to_f
+ end
+
def ll(lang, str, value=nil)
::I18n.t(str.to_s, :value => value, :locale => lang.to_s.gsub(%r{(.+)\-(.+)$}) { "#{$1}-#{$2.upcase}" })
end