mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 14:52:25 +00:00
Improve Ukrainian support and minor fixes in CZ, KZ, LT, LV, PL, RU, SR languages (#400)
* Fix English char 'i' in Ukrainian words * Fix the feminine currency processing for UAH in lang_UK.py * Fix test_ua.py * Fix the feminine currency processing for UAH in lang_RU.py * Add tests for UAH in test_ru.py * Add world currencies to lang_UK.py; Add test cases to test_uk.py for world currencies * Fix incorrect handling of zeros after decimal point for CZ, KZ, LT, LV, PL, RU, SR and UK languages * Add ukrainian ordinal numbers * Fix too long lines of code * Add test for negative cardinal number
This commit is contained in:
@@ -77,10 +77,11 @@ class Num2Word_KZ(Num2Word_Base):
|
||||
n = str(number).replace(',', '.')
|
||||
if '.' in n:
|
||||
left, right = n.split('.')
|
||||
leading_zero_count = len(right) - len(right.lstrip('0'))
|
||||
return u'%s %s %s' % (
|
||||
self._int2word(int(left)),
|
||||
self.pointword,
|
||||
self._int2word(int(right))
|
||||
(ZERO + ' ') * leading_zero_count + self._int2word(int(right))
|
||||
)
|
||||
else:
|
||||
return self._int2word(int(n))
|
||||
|
||||
Reference in New Issue
Block a user