diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb index e88e407..9523f23 100644 --- a/lib/redmine/i18n.rb +++ b/lib/redmine/i18n.rb @@ -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) diff --git a/test/unit/lib/redmine/i18n_test.rb b/test/unit/lib/redmine/i18n_test.rb index 6782397..4e3d8fc 100644 --- a/test/unit/lib/redmine/i18n_test.rb +++ b/test/unit/lib/redmine/i18n_test.rb @@ -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)