]> source.dussan.org Git - redmine.git/commitdiff
Fixed that #l_hours_short shows 2 h (#21069).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 30 Oct 2015 08:56:19 +0000 (08:56 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 30 Oct 2015 08:56:19 +0000 (08:56 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14766 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/i18n.rb
test/unit/lib/redmine/i18n_test.rb

index e88e407b9b9cf31ce4cb399192644ea81e32231b..9523f2313ae6e68994d220b3e589233c7eb8b494 100644 (file)
@@ -49,7 +49,7 @@ module Redmine
     end
 
     def l_hours_short(hours)
-      l(:label_f_hour_short, :value => ("%.2f h" % hours.to_f))
+      l(:label_f_hour_short, :value => ("%.2f" % hours.to_f))
     end
 
     def ll(lang, str, arg=nil)
index 67823977db862c855e168f6035dad8399cfbd313..4e3d8fcb7b539a83aadda009679ccb0973738758 100644 (file)
@@ -154,6 +154,11 @@ class Redmine::I18nTest < ActiveSupport::TestCase
     end
   end
 
+  def test_l_hours_short
+    set_language_if_valid 'en'
+    assert_equal '2.00 h', l_hours_short(2.0)
+  end
+
   def test_number_to_currency_default
     set_language_if_valid 'bs'
     assert_equal "KM -1000,20", number_to_currency(-1000.2)