Commit Graph

25 Commits

Author SHA1 Message Date
Rostyslav Ivanyk
40ab739f6c 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
2021-06-30 13:23:46 -04:00
William José Moreno Reyes
601e8cee84 Add AttributeError to to_cardinal_float
Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>
2019-10-25 21:40:26 -06:00
Ernesto Rodriguez Ortiz
2eee037648 Fix typo 'seperator' on source code 2019-01-19 17:00:26 -05:00
kkonieczny
e459021792 Merge branch 'master' into strings 2019-01-18 15:16:24 -05:00
Ernesto Rodriguez Ortiz
53b4518afb Issue 229: Add explicit encoding, license and unix line separators.
Some maintainers for different linux distribution are having some
problems with the encoding on different python versions. This change
intents to make all python files define explicitly the encoding, license
and unix line separators. Remove one example of the README.rst file
where a possible non UTF-8 character is used.
2018-12-23 12:10:24 -05:00
btharper
446e918e14 Convert strings to Decimal values
Punt string handling to python Decimal object, this correctly represents both
integers and floats (except with regards to trailing zeros)
Change command line tests to reflect handling of ints
2018-10-31 22:01:26 -04:00
Mārtiņš Šulcs
61dd1c9a4f Test currency not implemented, remove dead method. 2018-09-25 17:44:08 +03:00
Mārtiņš Šulcs
2a99ff1061 Cleanup (#194)
* Remove some dead code.

* Overloadable _cents_terse

* One setup should be enough

* Move gen_high_numwords up

* Cards are optional.

* Line length

* DRY set_hight_numwords for EU base.

* Remove unused error message. It has to be an exception anyway.
2018-09-17 09:30:36 -04:00
Andrius Laukavičius
39f522f34a [FIX] lang_LT, lang_LV: negative amounts (#185)
Negative amounts were not working (when no currency is used), because
`get_digits` method does not expect `-` sign, which crashes conversion.
To avoid that, we split minus sign from number string and prepare its
word to be used with amount words.

closes: #184
2018-08-23 10:39:03 -04:00
Mārtiņš Šulcs
1e954c909b Attempt at refactoring to_currency into base (#135)
* Attempt at refactoring lv to base

* Remove dead files.

* Use static props.

* Convert doctests, move utils out.

* Refactor lt

* Update and move ru doctests.

* Refactor ru.

* Refactor pl.

* Move uk doctests.

* Refactor uk.

* DRY

* Cleanup.
2017-11-09 10:13:01 -05:00
Ernesto Rodriguez Ortiz
1c699d1bb4 Fix bugs in the float precision and the currency, increase test coverage (#134)
* Fix some bugs in the float precision and the currency, increase test coverage.

Ref: issue #112 #113

* Update README.rst
2017-11-06 20:19:26 -05:00
Ernesto Rodriguez Ortiz
c326d59b2d Replace a custom implementation of an ordered dict in the file orderedmapping.py by collections.OrderedDict (#131) 2017-11-01 09:55:24 -04:00
Ernesto Rodriguez Ortiz
3da0c54f3b Activate flake8, isort and coveralls in the configuration of tox (#105)
* Activate flake8, isort and coveralls in the configuration of tox

* Update code to respect PEP8

* Fix bug in the lang_IT for python 3

* Update the README to include the new converters.
2017-10-30 14:06:46 -04:00
William Moreno Reyes
e2ce7c2562 Many PEP8 fixes
Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 15:58:00 -06:00
Jesús Leganés-Combarro 'piranna
8ecd10f055 [fix] Allow to pass floats to Num2Word_Base.to_splitnum() 2017-09-05 22:42:45 +02:00
Virgil Dupras
20f634028d Convert to single codebase for py2 and py3
No more 2to3. Also, added tox config for easy cross-python testing.
2016-11-22 09:13:18 -05:00
Virgil Dupras
02bb4bcf13 Merge pull request #27 from isnani/master
correction on lang_DE: ordnum, plural and ord form of >= 10**6
2016-08-10 13:21:57 -04:00
Ernesto Rodriguez Ortiz
89ca2b7e8c Merge branch 'language_pt_BR' of https://github.com/filwaitman/num2words into filwaitman-language_pt_BR 2016-03-31 14:26:22 -04:00
Ernesto Rodriguez Ortiz
266fb9d2df Fix regression added in the PR Iss24. 2016-03-31 14:18:29 -04:00
isnani
d3d0af3040 add indonesian ('id') 2016-03-31 10:11:04 -04:00
Ernesto Rodriguez Ortiz
995c153d47 Merge branch 'iss24' of https://github.com/isnani/num2words into isnani-iss24 2016-03-18 15:55:25 -04:00
Filipe Waitman
eeadcc7d5b Add support to pt_BR language 2016-02-26 23:13:40 -03:00
isnani
073925b1d4 address issue 24: floating point spelling 2016-01-13 16:06:16 +01:00
isnani
797e74d1fc correction on lang_DE: ordnum, plural and ord form of >= 10**6 2015-12-12 16:54:30 +01:00
Virgil Dupras
6e2b0eeda2 Big unit reorganisation
* Renamed pynum2word to num2word
* Renamed num2word_* to lang_*
* Re-organised all unit headers
* Made imports relative
2013-05-28 11:50:48 -04:00