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