- add uzs for ru and en

This commit is contained in:
potapov.s
2021-11-02 12:59:24 +03:00
parent 40ab739f6c
commit 86b9a00a67
4 changed files with 18 additions and 2 deletions

View File

@@ -43,7 +43,8 @@ class Num2Word_EU(Num2Word_Base):
'MXN': (('peso', 'pesos'), GENERIC_CENTS),
'RON': (('leu', 'lei', 'de lei'), ('ban', 'bani', 'de bani')),
'INR': (('rupee', 'rupees'), ('paisa', 'paise')),
'HUF': (('forint', 'forint'), ('fillér', 'fillér'))
'HUF': (('forint', 'forint'), ('fillér', 'fillér')),
'UZS': (('sum', 'sums'), ('tiyin', 'tiyins'))
}
CURRENCY_ADJECTIVES = {
@@ -56,7 +57,8 @@ class Num2Word_EU(Num2Word_Base):
'MXN': 'Mexican',
'RON': 'Romanian',
'INR': 'Indian',
'HUF': 'Hungarian'
'HUF': 'Hungarian',
'UZS': 'Uzbekistan'
}
GIGA_SUFFIX = "illiard"

View File

@@ -113,6 +113,9 @@ class Num2Word_RU(Num2Word_Base):
'KZT': (
('тенге', 'тенге', 'тенге'), ('тиын', 'тиына', 'тиынов')
),
'UZS': (
('сум', 'сума', 'сумов'), ('тийин', 'тийина', 'тийинов')
),
}
def setup(self):

View File

@@ -131,6 +131,12 @@ class Num2WordsENTest(TestCase):
"four pesos and one cent"
)
self.assertEqual(
num2words('2000.00', lang='en', to='currency', separator=' and',
cents=True, currency='UZS'),
"two thousand sums and zero tiyins"
)
def test_to_year(self):
# issue 141
# "e2 e2"

View File

@@ -272,3 +272,8 @@ class Num2WordsRUTest(TestCase):
'одна тысяча двести тридцать четыре доллара, пятьдесят шесть '
'центов'
)
self.assertEqual(
num2words(10122, lang='ru', to='currency', currency='UZS',
separator=' и'),
'сто один сум и двадцать два тийина'
)