From 31bffaa053fc4f3d96224a4d93b465d4eab92395 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 25 May 2015 12:06:38 +0000 Subject: Display time spent on the issue and the total time spent like estimated hours (#17550). git-svn-id: http://svn.redmine.org/redmine/trunk@14273 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/i18n.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/redmine/i18n.rb') 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 -- cgit v1.2.3