Merge pull request #36499 from AarDG10/algerian-curr
fix(data): fix currency in words for Algerian compliance
This commit is contained in:
commit
c8b95bb350
2 changed files with 8 additions and 2 deletions
|
|
@ -27,7 +27,7 @@
|
|||
"Algeria": {
|
||||
"code": "dz",
|
||||
"currency": "DZD",
|
||||
"currency_fraction": "Santeem",
|
||||
"currency_fraction": "Centime",
|
||||
"currency_fraction_units": 100,
|
||||
"currency_name": "Algerian Dinar",
|
||||
"currency_symbol": "\u062f.\u062c",
|
||||
|
|
|
|||
|
|
@ -1558,10 +1558,16 @@ def money_in_words(
|
|||
elif main == "0":
|
||||
out = f"{fraction_in_words()} {fraction_currency}"
|
||||
else:
|
||||
out = _(main_currency, context="Currency") + " " + in_words(main, in_million).title()
|
||||
if main_currency == "DZD":
|
||||
# Use Dinars for Algerian Compliance
|
||||
out = in_words(main, in_million).title() + " " + _("Dinars", context="Currency")
|
||||
else:
|
||||
out = _(main_currency, context="Currency") + " " + in_words(main, in_million).title()
|
||||
if cint(fraction):
|
||||
out = out + " " + _("and") + " " + fraction_in_words() + " " + fraction_currency
|
||||
|
||||
if main_currency == "DZD":
|
||||
return _("{0}.", context="Money in words").format(out)
|
||||
return _("{0} only.", context="Money in words").format(out)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue