From 9a47f62d1c4d661130afe20bdeeaccc3614fc83f Mon Sep 17 00:00:00 2001 From: Sergei Ruzki Date: Sat, 5 Feb 2022 13:16:55 +0100 Subject: [PATCH 1/5] BYN to EU and RU --- num2words/lang_EU.py | 2 ++ num2words/lang_RU.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/num2words/lang_EU.py b/num2words/lang_EU.py index 09d39c15..a23cf81f 100644 --- a/num2words/lang_EU.py +++ b/num2words/lang_EU.py @@ -26,6 +26,7 @@ class Num2Word_EU(Num2Word_Base): CURRENCY_FORMS = { 'AUD': (GENERIC_DOLLARS, GENERIC_CENTS), + 'BYN': (('rouble', 'roubles'), ('kopek', 'kopeks')), 'CAD': (GENERIC_DOLLARS, GENERIC_CENTS), # repalced by EUR 'EEK': (('kroon', 'kroons'), ('sent', 'senti')), @@ -48,6 +49,7 @@ class Num2Word_EU(Num2Word_Base): CURRENCY_ADJECTIVES = { 'AUD': 'Australian', + 'BYN': 'Belarussian', 'CAD': 'Canadian', 'EEK': 'Estonian', 'USD': 'US', diff --git a/num2words/lang_RU.py b/num2words/lang_RU.py index 8e6c875b..549710ef 100644 --- a/num2words/lang_RU.py +++ b/num2words/lang_RU.py @@ -113,6 +113,10 @@ class Num2Word_RU(Num2Word_Base): 'KZT': ( ('тенге', 'тенге', 'тенге'), ('тиын', 'тиына', 'тиынов') ), + 'BYN': ( + ('белорусский рубль', 'белорусского рубля', 'белорусских рублей'), ('копейка', 'копейки', 'копеек') + ), + } def setup(self): @@ -208,7 +212,7 @@ def _money_verbose(self, number, currency): return self._int2word(number, currency == 'UAH') def _cents_verbose(self, number, currency): - return self._int2word(number, currency in ('UAH', 'RUB')) + return self._int2word(number, currency in ('UAH', 'RUB', 'BYN')) def _int2word(self, n, feminine=False): if n < 0: From dd8b8bd313ad99c04ef580f867649eee86f2d1d9 Mon Sep 17 00:00:00 2001 From: Sergei Ruzki Date: Sat, 5 Feb 2022 13:43:37 +0100 Subject: [PATCH 2/5] BYN to EU and RU + version --- bin/num2words | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/num2words b/bin/num2words index 068abf25..d89c142a 100755 --- a/bin/num2words +++ b/bin/num2words @@ -55,7 +55,7 @@ import sys from docopt import docopt import num2words -__version__ = "0.5.10" +__version__ = "0.5.11" __license__ = "LGPL" From 994f2eadf1e277e129bc046e33c90278e531e3ff Mon Sep 17 00:00:00 2001 From: Sergei Ruzki Date: Mon, 7 Feb 2022 20:57:47 +0100 Subject: [PATCH 3/5] BYN to EU and RU spelling corrected --- num2words/lang_RU.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/num2words/lang_RU.py b/num2words/lang_RU.py index 549710ef..43781a4d 100644 --- a/num2words/lang_RU.py +++ b/num2words/lang_RU.py @@ -114,7 +114,7 @@ class Num2Word_RU(Num2Word_Base): ('тенге', 'тенге', 'тенге'), ('тиын', 'тиына', 'тиынов') ), 'BYN': ( - ('белорусский рубль', 'белорусского рубля', 'белорусских рублей'), ('копейка', 'копейки', 'копеек') + ('белорусский рубль', 'белорусских рубля', 'белорусских рублей'), ('копейка', 'копейки', 'копеек') ), } From cb1f132c1aab6f61afaf06285f4a762e20ab1cab Mon Sep 17 00:00:00 2001 From: Sergei Ruzki Date: Fri, 15 Jul 2022 10:11:08 +0300 Subject: [PATCH 4/5] USD to PL --- CHANGES.rst | 9 +++++++++ bin/num2words | 2 +- num2words/lang_PL.py | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 298f9db9..861e6abc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,15 @@ Changelog ========= +Version 0.5.12 -- 2022/07/15 +---------------------------- + +* USD added to PL + +Version 0.5.11 -- 2022/02/05 +---------------------------- + +* BYN to EU and RU Version 0.5.10 -- 2019/05/12 ---------------------------- diff --git a/bin/num2words b/bin/num2words index d89c142a..ce5e1393 100755 --- a/bin/num2words +++ b/bin/num2words @@ -55,7 +55,7 @@ import sys from docopt import docopt import num2words -__version__ = "0.5.11" +__version__ = "0.5.12" __license__ = "LGPL" diff --git a/num2words/lang_PL.py b/num2words/lang_PL.py index 1fb1fdcd..88c9c47f 100644 --- a/num2words/lang_PL.py +++ b/num2words/lang_PL.py @@ -155,6 +155,9 @@ class Num2Word_PL(Num2Word_Base): 'EUR': ( ('euro', 'euro', 'euro'), ('cent', 'centy', 'centów') ), + 'USD': ( + ('dolar amerykański', 'dolary amerykańskie', 'dolarów amerykańskich'), ('cent', 'centy', 'centów') + ), } def setup(self): From 6a26a0b9686cdfc8cba683238277919cb79bf8a0 Mon Sep 17 00:00:00 2001 From: Sergei Ruzki Date: Tue, 8 Nov 2022 14:11:15 +0100 Subject: [PATCH 5/5] [FIX]flake8 for 3.10 line length fix --- num2words/lang_PL.py | 11 ++++++++++- num2words/lang_RU.py | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/num2words/lang_PL.py b/num2words/lang_PL.py index a692f23f..92ff9678 100644 --- a/num2words/lang_PL.py +++ b/num2words/lang_PL.py @@ -156,7 +156,16 @@ class Num2Word_PL(Num2Word_Base): ('euro', 'euro', 'euro'), ('cent', 'centy', 'centów') ), 'USD': ( - ('dolar amerykański', 'dolary amerykańskie', 'dolarów amerykańskich'), ('cent', 'centy', 'centów') + ( + 'dolar amerykański', + 'dolary amerykańskie', + 'dolarów amerykańskich' + ), + ( + 'cent', + 'centy', + 'centów' + ) ), } diff --git a/num2words/lang_RU.py b/num2words/lang_RU.py index 77fe441f..b521cfed 100644 --- a/num2words/lang_RU.py +++ b/num2words/lang_RU.py @@ -114,7 +114,8 @@ class Num2Word_RU(Num2Word_Base): ('тенге', 'тенге', 'тенге'), ('тиын', 'тиына', 'тиынов') ), 'BYN': ( - ('белорусский рубль', 'белорусских рубля', 'белорусских рублей'), ('копейка', 'копейки', 'копеек') + ('белорусский рубль', 'белорусских рубля', 'белорусских рублей'), + ('копейка', 'копейки', 'копеек') ), 'UZS': ( ('сум', 'сума', 'сумов'), ('тийин', 'тийина', 'тийинов')