refactor(money in words): translatable currency Name (#21672)

This commit is contained in:
Abdo 2023-07-27 14:51:57 +03:00 committed by GitHub
parent c40faddac7
commit 35c929afdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1353,12 +1353,12 @@ def money_in_words(
# 0.00
if main == "0" and fraction in ["00", "000"]:
out = "{} {}".format(main_currency, _("Zero"))
out = _(main_currency, context="Currency") + " " + _("Zero")
# 0.XX
elif main == "0":
out = _(in_words(fraction, in_million).title()) + " " + fraction_currency
else:
out = main_currency + " " + _(in_words(main, in_million).title())
out = _(main_currency, context="Currency") + " " + _(in_words(main, in_million).title())
if cint(fraction):
out = (
out