diff --git a/CHANGES.rst b/CHANGES.rst index 9f3a7b2..4a1d1e1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,21 @@ Changelog ========= +Version 0.5.12 -- 2022/08/19 +---------------------------- + +* Support Japanese Reiwa (令和/れいわ) era. (#412) +* Add basic farsi support (#354) +* Added Tajik language support (#406) +* Fix Amharic language support (#465) +* Fix Hebrew pluralize and implement to_currency (#330) +* Add support to translate some currencies in italian language (#434) +* Fix Polish twenties (#345) +* Add uzs for ru and en (#422) +* Added support for Esperanto numbers. (#387) +* [ADD] to ordinal number for Turkish (#468) +* Fix zeroth in Dutch to nulde fixing (#326) + Version 0.5.11 -- 2022/08/03 ---------------------------- @@ -77,9 +92,9 @@ Version 0.5.7 -- 2018/06/27 * Add Finnish localization. (#170) * Add Japanese localization. (#171) * Add belgian-french localization. (#151) -* Add Czech localization. (#154) +* Add Czech localization. (#154) * Add Thai localization. (#139) -* Improve English localization. (#144) +* Improve English localization. (#144) * Improve Spanish localization. (#167) * Improve Italian localization. (#143) * Improve documentation. (#155, #145, #174) diff --git a/bin/num2words b/bin/num2words index 2a20b22..26990c0 100755 --- a/bin/num2words +++ b/bin/num2words @@ -34,7 +34,7 @@ Options: -t --to= Output converter [default: cardinal]. -h --help Show this message. -v --version Show version. - + Examples: $ num2words 10001 ten thousand and one @@ -55,7 +55,7 @@ import sys from docopt import docopt import num2words -__version__ = "0.5.11" +__version__ = "0.5.12" __license__ = "LGPL" diff --git a/num2words/lang_NL.py b/num2words/lang_NL.py index 00d6c5b..7251e2a 100644 --- a/num2words/lang_NL.py +++ b/num2words/lang_NL.py @@ -76,7 +76,10 @@ class Num2Word_NL(Num2Word_EU): "zes", "vijf", "vier", "drie", "twee", "één", "nul"] - self.ords = {"één": "eerst", + # Wiktionary says it is "nulde", not "nulte" or "nule" + # https://en.wiktionary.org/wiki/nulde + self.ords = {"nul": "nuld", + "één": "eerst", "twee": "tweed", "drie": "derd", "vier": "vierd", diff --git a/num2words/lang_TR.py b/num2words/lang_TR.py index 7fba871..ee1d6d4 100644 --- a/num2words/lang_TR.py +++ b/num2words/lang_TR.py @@ -806,6 +806,10 @@ class Num2Word_TR(Num2Word_Base): return wrd + def to_ordinal_num(self, value): + self.verify_ordinal(value) + return "%s%s" % (value, self.to_ordinal(value)[-4:]) + def to_splitnum(self, val): float_digits = str(int(val * 10 ** self.precision)) if not int(val) == 0: diff --git a/tests/test_nl.py b/tests/test_nl.py index e72b43b..95c690f 100644 --- a/tests/test_nl.py +++ b/tests/test_nl.py @@ -36,6 +36,7 @@ class Num2WordsNLTest(TestCase): ) def test_ordinal_at_crucial_number(self): + self.assertEqual(num2words(0, ordinal=True, lang='nl'), "nulde") self.assertEqual(num2words(100, ordinal=True, lang='nl'), "honderdste") self.assertEqual( num2words(1000, ordinal=True, lang='nl'), "duizendste" diff --git a/tests/test_tr.py b/tests/test_tr.py index 8425262..e1aefba 100644 --- a/tests/test_tr.py +++ b/tests/test_tr.py @@ -182,7 +182,11 @@ class Num2WordsTRTest(TestCase): {"test": 101101011010.02, "to": "cardinal", "expected": u"yüzbirmilyaryüzbirmilyononbirbinonvirgüliki"}, {"test": 101101011010.2, "to": "cardinal", - "expected": u"yüzbirmilyaryüzbirmilyononbirbinonvirgülyirmi"} + "expected": u"yüzbirmilyaryüzbirmilyononbirbinonvirgülyirmi"}, + {"test": 10, "to": "ordinal_num", "expected": u"10uncu"}, + {"test": 1, "to": "ordinal_num", "expected": u"1inci"}, + {"test": 3, "to": "ordinal_num", "expected": u"3üncü"}, + {"test": 6, "to": "ordinal_num", "expected": u"6ıncı"} ] for casedata in testcases: