Defect #21069

Hard-coded label for hour

Added by Fabrice ROBIN about 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:3.2.0
Resolution:Fixed Affected version:3.1.1

Description

The commit r14273, which has been merged into the 3.1 branch, introduced an error as a "h" label is hard-coded in the function l_hours_short:

"%.2f h" % hours.to_f

This label should be translated through i18n. Asian users will surely report this anomaly.

Associated revisions

Revision 14759
Added by Jean-Philippe Lang about 2 years ago

Adds translation string for hours with symbol (#21069).

Revision 14766
Added by Jean-Philippe Lang about 2 years ago

Fixed that #l_hours_short shows 2 h (#21069).

History

#1 Updated by Fabrice ROBIN about 2 years ago

see Defect #17550

#2 Updated by Toshi MARUYAMA about 2 years ago

  • Description updated (diff)

#3 Updated by Toshi MARUYAMA about 2 years ago

  • Target version set to 3.2.0

#4 Updated by Jean-Philippe Lang about 2 years ago

  • Subject changed from hard-coded label for hour to Hard-coded label for hour
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Translation string added in r14759.

#5 Updated by Daniel Ritz about 2 years ago

Errm...it's now showing stuff like "2.5 h h":

     def l_hours_short(hours)
-      "%.2f h" % hours.to_f
+      l(:label_f_hour_short, :value => ("%.2f h" % hours.to_f))
     end

i.e. the format string still contains the " h"...

#6 Updated by Toshi MARUYAMA about 2 years ago

  • Status changed from Closed to Reopened

#7 Updated by Jean-Philippe Lang about 2 years ago

  • Status changed from Reopened to Closed

Fixed.

Also available in: Atom PDF