l10/moneyfmt does not work correctly when int_frac_digits == 0 (ex. JPY )

Issue #740 resolved
Former user created an issue

l10/utils.py implements format() for pre-2.5 compatibility. However, its implementation does not work correctly for JPY (locale.int_frac_digits == 0).

It works correctly when the line : s = format('%%.%if' % places, abs(val), conv, grouping, monetary=True) is replaced with : s = locale.format('%%.%if' % conv['int_frac_digits'], val, grouping, monetary=True) . Should it call the original locale when python_version >= 2.5 ? I believe a currency without fractional part has the same problem.

Reported by hnak

Comments (1)

  1. Log in to comment