Commit Graph

415 Commits

Author SHA1 Message Date
James ADJINWA
569b29af39 Typo correction in documentation (#155) 2018-01-31 09:24:28 -05:00
François Honoré (Acsone)
ce21cb9f18 [ADD] Add lang fr_BE + tests (#151) 2018-01-16 14:38:43 -05:00
Antonio Gurgel
e28394d29f Improve README.rst. (#145)
* Improve README.rst.

* Fix "Usage": "cardinal" => "ordinal".

>>> num2words(42,to='cardinal')
u'forty-two'
>>> num2words(42,to='ordinal')
u'forty-second'

* Add PyPI shield. Closes #36.

* Fix link to GitHub.

* Maintain "country - language" consistency

* Fix typos, clarify country-language fallback
2017-12-19 07:51:58 -05:00
Antonio Gurgel
1a2b783d31 lang_EN.to_year(): render correct pronunciations (#144)
* Add tests

Starting work on #141, which points out that 2017 should come out
"twenty seventeen"; it currently comes out "two thousand seventeen".

* Handle English years properly.

Resolves #141.

* Whoops -- didn't PEP-8 my tests

* Handle years MORE properly...with suffixes!

- Rendering years between 10-99 was bugged (e.g. "zero fifty").
Fixed that by thinking outside the high/low text box I had made.
- Added suffixes: default none if positive, 'BC' if negative.
User-overrideable.
2017-12-18 10:56:38 -05:00
pipech
ab54bed93a add Thai Language from Thailand (#139)
* add Thai

* change splitby3 to splitbyx

* change lang_th to use function from currency

* make Num2Word_TH inherit from Num2Word_Base

* comment out test failed in 2.7 env

* fix python2.7 error

* add USD EUR for Thai

* pep8 fix

* added Thai
2017-12-14 11:48:12 -05:00
Carli Samuele
efce631944 Fix lang_IT handling of floats (#143)
`n % 1 != 0` is not a valid test for float:

In []: 1.1 % 1 == 0
Out[]: False

but:

In []: 1.0 % 1 == 0
Out[]: True

hence it's really necessary to explicitly test for type in this case.
2017-12-04 17:16:06 -05:00
Ernesto Rodriguez Ortiz
8ffdc5e49d Update CHANGE.rst to publish a new release.
Ref: issue #140
2017-11-22 14:35:46 -05:00
Ernesto Rodriguez Ortiz
9819498a14 Increase test coverage for lang fr* (#136)
Ref: issues #116 #121 #127
2017-11-09 10:15:29 -05: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
Mārtiņš Šulcs
5a131fedc6 Long form for currency name is optional. Currency name rendering in e… (#133)
* Long form for currency name is optional. Currency name rendering in english.

* Missing encoding header.
2017-11-05 17:59:25 -05:00
Ernesto Rodriguez Ortiz
ee9f767b06 Create PULL_REQUEST_TEMPLATE.md 2017-11-05 15:19:46 -05:00
Ernesto Rodriguez Ortiz
c511f499b9 Create ISSUE_TEMPLATE.md 2017-11-05 15:16:23 -05:00
Ernesto Rodriguez Ortiz
a98c75e394 Create CONTRIBUTING.md 2017-11-05 15:15:15 -05:00
Ernesto Rodriguez Ortiz
dde43cb4e5 Create CODE_OF_CONDUCT.md 2017-11-05 15:07:12 -05:00
Mārtiņš Šulcs
a1a3c53b39 Improve lv (#132)
* Add legal form.

* Fix fractions (comma)

* Fix edge case, improve test coverage.

* Add most popular currencies

* PEP8 line length

* Fix some forms.
2017-11-01 13:04:09 -04: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
Mārtiņš Šulcs
f9d8868794 Refactor and fix some issues with to_currency. Reduce code duplication. (#129)
* Refactor and fix some issues with to_currency. Reduce code duplication.

* Use unicode literals in uk testcase.
2017-10-31 20:17:13 -04:00
Ernesto Rodriguez Ortiz
abae0b56a2 Update fichier README.rst to fix the coverage badge 2017-10-30 14:08:44 -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
Ernesto Rodriguez Ortiz
c6015db8b4 Update tox.ini to check more stuffs (#103) 2017-10-26 20:10:44 -04:00
Ernesto Rodriguez Ortiz
34d5a4cd5a Merge pull request #102 from savoirfairelinux/remove_lang_EN_GB_old_file
Remove old and not used file num2words/lang_EN_GB_old.py
2017-10-26 16:11:06 -04:00
Ernesto Rodriguez Ortiz
14bcd99cab Remove old and not used file num2words/lang_EN_GB_old.py 2017-10-26 16:08:33 -04:00
Ernesto Rodriguez Ortiz
3788cb213a Merge pull request #101 from shulcsm/expose_to_currency
Expose to to_currency.
2017-10-26 15:06:34 -04:00
Ernesto Rodriguez Ortiz
02a52aab5b Merge pull request #100 from shulcsm/pass_kwargs_to_converters
Pass kwargs to converters.
2017-10-26 15:05:12 -04:00
Ernesto Rodriguez Ortiz
168707744d Merge pull request #98 from williamjmorenor/master
Fix some pep8 issues
2017-10-26 15:03:27 -04:00
Mārtiņš Šulcs
7461ef6d78 Expose to to_currency. 2017-10-26 13:26:17 +03:00
Mārtiņš Šulcs
f01dfa2de0 Pass kwargs to converters. 2017-10-26 13:14:09 +03:00
William Moreno Reyes
0600fbb183 Fix many to long lines issues
Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-24 17:48:51 -06:00
William Moreno Reyes
6462321257 Remove unnecessary line break
Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-24 07:10:58 -06:00
William Moreno Reyes
9e6015494c Fix tests
Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 18:38:21 -06:00
William Moreno
d65f5b10db Merge branch 'master' into master 2017-10-23 18:15:55 -06:00
William Moreno Reyes
94c73d277e Fix as many pep8 issues as posible
Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 18:12:36 -06: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
William Moreno Reyes
27058f5ddc Include tests in release
Please include tests in the release, I am the mantainer of this library
for Fedora/EPEL and have the tests available in the releases file is
reale usefull

Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 15:05:58 -06:00
William Moreno Reyes
55cb0ea3e9 Fix a py3 issue with print like a funtion
Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 14:33:25 -06:00
William Moreno Reyes
d73acaa985 Fix missing print funtion for py3
Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 14:25:37 -06:00
Ernesto Rodriguez Ortiz
096cb45ad9 Merge pull request #97 from bblaz/master
Added Slovene (sl) languange
2017-10-23 16:19:30 -04:00
Ernesto Rodriguez Ortiz
931d7063db Merge pull request #95 from savoirfairelinux/allow_call_to_other_converters
Allow call to other convertes as to_currency, to_year
2017-10-23 16:18:14 -04:00
William Moreno Reyes
d9aee6934f Fix some pep8 issues
W291:
 pycodestyle-3.6 num2words | grep W291
 num2words/lang_NL.py:64:40: W291 trailing whitespace
 num2words/lang_NL.py:97:38: W291 trailing whitespace

Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 14:16:46 -06:00
Ernesto Rodriguez Ortiz
38db45cc4a Merge pull request #96 from marcu/master
lang_DK do not depends on num2words
2017-10-23 16:16:37 -04:00
William Moreno Reyes
34de8f7f87 Fix some pep8 issues
W293:
 pycodestyle-3.6 num2words | grep W293
 num2words/lang_EN_EUR.py:19:1: W293 blank line contains whitespace
 num2words/lang_EN_EUR.py:43:1: W293 blank line contains whitespace
 num2words/lang_EN_IN.py:19:1: W293 blank line contains whitespace
 num2words/lang_EU.py:28:1: W293 blank line contains whitespace
 num2words/lang_RU.py:236:1: W293 blank line contains whitespace
 num2words/lang_UK.py:218:1: W293 blank line contains whitespace
 num2words/lang_UK.py:238:1: W293 blank line contains whitespace
 num2words/lang_UK.py:248:1: W293 blank line contains whitespace
 num2words/orderedmapping.py:22:1: W293 blank line contains whitespace

Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com>
2017-10-23 14:10:29 -06:00
William Moreno
e15e7486c4 Merge pull request #1 from savoirfairelinux/master
Sync
2017-10-23 14:42:19 -05:00
Blaž Bregar
2ee0e49a8b Added Slovene 2017-10-22 18:06:49 +02:00
Blaž Bregar
1176539b62 Merge branch 'master' of https://github.com/savoirfairelinux/num2words
Conflicts:
	num2words/__init__.py
2017-10-22 15:59:04 +02:00
Blaž Bregar
5d7697a85e resolved merge 2017-10-22 15:50:55 +02:00
Marc Ducobu
2f3acee36f lang_DK do not depends on num2words 2017-10-19 11:57:37 +02:00
Ernesto Rodriguez Ortiz
49a39fc253 Allow call to other convertes as to_currency, to_year
There are at least to issues related with questions about how to use other convertes.
This changes should allow the use of this converters
2017-09-29 15:29:25 -04:00
Ernesto Rodriguez Ortiz
659920c881 Merge pull request #91 from olix20/master
Added support for Dutch language (NL)
2017-09-20 09:14:28 -04:00
Armin Oliya
d96175b58e Merge branch 'master' into master 2017-09-20 14:35:27 +02:00