Skip to content

Commit

Permalink
Merge pull request #439 from SkiBY/master
Browse files Browse the repository at this point in the history
BYN to EU and RU
  • Loading branch information
mrodriguezg1991 authored Nov 9, 2022
2 parents 7bcb5ab + 6a26a0b commit 743c535
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions num2words/lang_EU.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand All @@ -49,6 +50,7 @@ class Num2Word_EU(Num2Word_Base):

CURRENCY_ADJECTIVES = {
'AUD': 'Australian',
'BYN': 'Belarussian',
'CAD': 'Canadian',
'EEK': 'Estonian',
'USD': 'US',
Expand Down
12 changes: 12 additions & 0 deletions num2words/lang_PL.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,18 @@ 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):
Expand Down
6 changes: 5 additions & 1 deletion num2words/lang_RU.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class Num2Word_RU(Num2Word_Base):
'KZT': (
('тенге', 'тенге', 'тенге'), ('тиын', 'тиына', 'тиынов')
),
'BYN': (
('белорусский рубль', 'белорусских рубля', 'белорусских рублей'),
('копейка', 'копейки', 'копеек')
),
'UZS': (
('сум', 'сума', 'сумов'), ('тийин', 'тийина', 'тийинов')
),
Expand Down Expand Up @@ -211,7 +215,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:
Expand Down

0 comments on commit 743c535

Please sign in to comment.