Patch #14740 » RM_14740_display_hours_decimals_only_if_fractional_alternative.diff
i18n.rb (revision 1907) | ||
---|---|---|
28 | 28 |
|
29 | 29 |
def l_hours(hours) |
30 | 30 |
hours = hours.to_f |
31 |
l((hours < 2.0 ? :label_f_hour : :label_f_hour_plural), :value => ("%.2f" % hours.to_f)) |
|
31 |
# Smile specific : do not display decimals if zero |
|
32 |
hours = (hours == hours.to_i) ? hours.to_i : ("%.2f" % hours) |
|
33 |
l((hours < 2.0 ? :label_f_hour : :label_f_hour_plural), :value => hours) |
|
32 | 34 |
end |
33 | 35 |
|
34 | 36 |
def ll(lang, str, value=nil) |