Commit Graph

354 Commits

Author SHA1 Message Date
Ernesto Rodriguez Ortiz
7e893f1ef6 Merge branch 'master' into romanian-issues-259 2019-10-25 18:36:11 -04:00
William José Moreno Reyes
3cb0b40fd5 Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>
Add a test to check correct error raises

This is a simple test to check that NotImplementedError raises
fine. This also should improve test code coverage.
2019-10-25 18:33:40 -04:00
William José Moreno Reyes
3202476d55 Add es_NI test
Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>
2019-10-25 18:33:40 -04:00
William José Moreno Reyes
5e15702912 Add es_NI currency
Examples:

  python bin/num2words 1 -l es_NI --to currency
  un córdoba con cero centavos

  python bin/num2words 1.02 -l es_NI --to currency
  un córdoba con dos centavos

  python bin/num2words 2.02 -l es_NI --to currency
  dos córdobas con dos centavos

  python bin/num2words 1.01 -l es_NI --to currency
  un córdoba con un centavo

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>
2019-10-25 18:33:40 -04:00
Ivan Petukhov
ca5989a3ec Add KZT and UAH currencies to lang RU 2019-09-10 16:46:05 -04:00
Maria S
a192afec85 romanian-issues-259: test new branch 2019-06-09 12:43:01 +03:00
Maria S
bdf651d1fa romanian-issues-259: rough implementation 2019-06-09 12:24:01 +03:00
Ernesto Rodriguez Ortiz
2d1a318359 Release v0.5.10 2019-05-12 11:48:38 -04:00
Akhilesh
cbfc8fd5d0 add kannada language support (#243)
* add kannada support

* add Kannada Language support

* add tests for kannada

* reformatted

* change lang param

* fix tests

* add condition

* add modifier

* add few more test cases

* fix test

* fix test

* modify test

* fix flake8

* fix isort

* add more tests

* add unicode prefix

* edit tests for float numbers

* add more tests

* add unicode prefix in tests

* add Kannada language
2019-05-12 11:03:31 -04:00
Filippo Costa
f6dc5a3893 Revert some copyright changes made in commit 53b4518 (#254)
Commit 53b4518 made added explicit utf-8 encoding for all sources, among
other things. A copyright notice in `tests/test_tr.py` was removed and
two were added in `num2words/lang_it.py`. I know this was a simple
mistake, I just thought it would be best to explicitly give credit where
credit is due.
2019-05-07 11:04:19 -04:00
Chintalagiri Shashank
f4b2bac098 Add support for the Indian rupee. (#248) 2019-04-11 20:14:59 -04:00
Sarah Beranek
a869745813 Fixing currency functions for german and french. Adding Currency_Forms for DE, FR and NL. (#247)
* Fix currency function for French. Adding Currency_Forms.

* Fix currency function for German. Adding Currency_Forms.

* Move FR_DZ to new currency functions, too.

* Fix tests

* Add more currency options for dutch.

* Add more tests for German, Dutch and French currencies.
2019-04-11 19:07:44 -04:00
Blaž Bregar
18194b52ef Multitude of corrections of Slovene language (#246)
* Multitude of corrections of Slovene language

* Indentation correction for flake8

* Added tests from https://github.com/gregopet/num2words by @gregopet and merged them with existing.

* Flake8ing tests.

* Sorted imports

* Some more sorting...

* Last time for sorting?
2019-03-29 13:47:18 -04:00
Alvaro
eef5b03593 Updates accents on céntimos in Spanish (#240)
* Updates accents on céntimos in Spanish

* Update test_es.py

* Update test_es.py

* fix tests

* fix encoding

* Update tox.ini

* Update test_cli.py

* Update test_cli.py

* Update test_cli.py

* Update lang_AR.py

flake-8 compliant

* Update test_cli.py

flake8 compliant

* Update test_cli.py

* Update test_cli.py
2019-02-12 13:59:46 -05:00
Pierre Duchemin
aa9b882fe6 Merge pull request #238 from savoirfairelinux/fix_typo_seperator
Fix typo 'seperator' on source code
2019-01-23 14:23:07 -05:00
Ernesto Rodriguez Ortiz
2eee037648 Fix typo 'seperator' on source code 2019-01-19 17:00:26 -05:00
kkonieczny
c1292c1499 Merge pull request #223 from btharper/strings
Convert strings to Decimal values
2019-01-18 16:01:39 -05:00
kkonieczny
e459021792 Merge branch 'master' into strings 2019-01-18 15:16:24 -05:00
kkonieczny
83cfcdc999 Merge pull request #237 from zenogantner/master
German improvements
2019-01-18 15:05:24 -05:00
kkonieczny
a3a0961b7d Merge branch 'master' into master 2019-01-18 14:55:41 -05:00
kkonieczny
cebcaa6e64 Merge pull request #233 from TrangOul/master
PL: regular names for powers of thousand
2019-01-18 14:38:04 -05:00
Marek Madejski
38d2752728 Merge branch 'master' into master 2019-01-14 15:19:17 +01:00
Zeno Gantner
67d58e7081 German: add 3 more test cases for thousands 2019-01-13 23:57:57 +01:00
Zeno Gantner
b71facf3ea German: ordinals involving 'Million' etc. are written without space, and lower case 2019-01-13 23:55:34 +01:00
Zeno Gantner
e321caf392 Million etc. are upper case in German 2019-01-13 23:25:54 +01:00
Zeno Gantner
df65296a80 German: similar rule for million as for 100 and 1000; 2 more ordinal tests 2019-01-13 23:18:51 +01:00
Zeno Gantner
0398d16460 German: 2 more ordinal tests 2019-01-13 23:04:10 +01:00
Zeno Gantner
778786b65b fix ordinal_num for French numbers ending with 1 (#236) 2019-01-12 13:10:31 -05:00
Pierre Duchemin
218d184583 Merge pull request #235 from savoirfairelinux/release-0.5.9
Release 0.5.9
2019-01-11 15:13:32 -05:00
Ernesto Rodriguez Ortiz
f2fb5bc67f Release 0.5.9 2019-01-10 20:09:08 -05:00
Marek Madejski
52fb935d8c PL: regular names for powers of thousand
Names for powers of thousand are now built instead of being hardcoded - less error-prone and more concise.
2018-12-28 11:57:12 +01:00
Marek Madejski
cb55d7b91d Merge remote-tracking branch 'upstream/master' 2018-12-28 11:14:26 +01:00
Pierre Duchemin
c12131d557 Merge pull request #231 from savoirfairelinux/issue_229
Issue 229: Add explicit encoding, license and unix line separators.
2018-12-26 09:54:48 -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
kkonieczny
7f125590f7 Merge pull request #228 from TrangOul/patch-1
Extend Polish names + typos; power of thousand names not inserted when value is 0
2018-12-21 14:20:07 -05:00
Marek Madejski
9bd1bebb0e Shortened one test number for PEP8 compliance - smaller number parts are already tested. 2018-12-05 10:54:02 +01:00
Marek Madejski
4a0b323fa9 early continue
skip processing given power of thousand if it is 0
2018-12-03 16:07:15 +01:00
Marek Madejski
d78add4c3a Update test_pl.py
unit test fix
2018-12-03 12:40:04 +01:00
Marek Madejski
b8cd4ba181 no word for zero value of thousand's power; PL unit test fix
Before: 1_000_000_000 = "miliard milionów tysięcy" (with words for zero millions and thousands)
After: "miliard" (no words if value for given power of 1000 is 0)
2018-12-03 12:03:16 +01:00
Marek Madejski
518ce0b606 Update lang_PL.py
typo in "dziewięćset" (900) fix
2018-12-03 11:30:45 +01:00
Marek Madejski
efde954697 Update test_pl.py
added test for a really big number in Polish
2018-12-03 11:14:55 +01:00
Marek Madejski
f26c3a139a Update test_pl.py
test for really big number's Polish name
2018-12-03 11:05:36 +01:00
Marek Madejski
a147dc3d34 Update lang_PL.py
PEP8 compliance
2018-12-03 09:59:53 +01:00
Marek Madejski
8fde057760 Update lang_PL.py
- typo in "kwadryliard"
- expanded long scale up to decilliard (10^63)
- PEP8 compliance
2018-12-03 09:57:37 +01:00
Marek Madejski
562e446716 Update lang_PL.py
- typo in "kwadryliard"
- expanded long scale up to decilliard (10^63)
2018-11-30 09:42:15 +01:00
Maxime St-Pierre
58613e0a18 Merge pull request #225 from savoirfairelinux/v0.5.8
Release 0.5.8
2018-11-17 20:03:20 -05:00
Ernesto Rodriguez Ortiz
fffb5c2dcf Release 0.5.8 2018-11-17 14:38:49 -05:00
Hugo Lefeuvre
66a47e2423 Improve german support (#222)
* german: fix case in currency names

Also, add more tests for german language.

* german: default to amount of euros, not cents

If a non-float number is provided, interpret it as a quantity in euros,
not cents.

* german: handle "ein Euro" vs "eins Euro" exception

* german: prefer "einhundert" over "hundert"

"hundert" is usually colloquial (even if widely used).

Exception: "eintausendste" and "hundertste" are special cases, here
"hundertste" and "tausendste" are usually preferred (see Duden).
2018-11-16 16:19:36 -05:00
Sangbum Kim
4d8c93847c Add: Korean support (#219)
* Add: lang_KO support

Added Korean language support and tests

* Remove commented code
2018-11-10 18:44:02 -05:00
fatkaratekid
1ed09f511d Add support for Serbian (Latin) (#207)
* Add support for Serbian language

* Fix the billion strings for short scale

Used the long scale name instead of the short one. Simplified the scale and the ones geneder definition.

* Adds Serbian to README
2018-11-10 18:36:51 -05:00