Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BYN to EU and RU #439

Merged
merged 7 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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