From 12e8402da4138f4bf4ab52cb985d5166518f8a2f Mon Sep 17 00:00:00 2001 From: gonzy <11833677+gonsalet@users.noreply.github.com> Date: Thu, 24 Mar 2022 00:37:53 +0100 Subject: [PATCH] Improved currency gender handling, now splitting 'dollars' and 'cents' parts on --- num2words/lang_ES.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/num2words/lang_ES.py b/num2words/lang_ES.py index 5d086d8..de2d1e1 100644 --- a/num2words/lang_ES.py +++ b/num2words/lang_ES.py @@ -367,7 +367,7 @@ class Num2Word_ES(Num2Word_EU): # Source: https://www.rae.es/dpd/una (section 2.2) # split "dollars" part from "cents" part - list_result = result.split(" con ") + list_result = result.split(separator + " ") # "DOLLARS" PART (list_result[0]) @@ -403,6 +403,6 @@ class Num2Word_ES(Num2Word_EU): list_result[1] = list_result[1].replace("uno", "un") # join back "dollars" part with "cents" part - result = " con ".join(list_result) + result = (separator + " ").join(list_result) return result