Numbertext / libnumbertext

Number to number name and money text conversion libraries in C++, Java, JavaScript and Python & LibreOffice Calc Extension
BSD 3-Clause "New" or "Revised" License
67 stars 46 forks source link

Fix Czech cardinals and add ordinals for genders #98

Closed strepon closed 1 year ago

strepon commented 1 year ago

This fixes some Czech cardinals and adds ordinals for all three Czech genders.

@zcrhonek, @TomKladno - Please review the changes.

There are still wrong ordinals in combinations involving big numbers, e.g. 1001001 should be milióntý tisící první but the output is milión tisící první. I believe the rest of the ordinals should be recursive as well, e.g.

(.*)milión[yů]?(.*) $(ordinal \1milióntý\2)

however in that case I get "too much recursion" JavaScript error when trying it in the web interface (https://numbertext.github.io/Soros.html). Is this supposed to work, or am I doing something wrong?

zcrhonek commented 1 year ago

+1 Looks good

TomKladno commented 1 year ago

Well done! Looks good.

strepon commented 1 year ago

Update: I added a commit which fixes currencies in Czech (work started by @zcrhonek, thanks!) - I liked that the language is flexible enough to incorporate genders of currencies.

zcrhonek commented 1 year ago

Tested and it works correctly.

laszlonemeth commented 1 year ago

Hello,

Many thanks for the nice fix and reviewing! I'll integrate the fixes with LibreOffice soon, and report the result! Also I started to add number format menu items to give easy access to NumberText in Calc, thanks to the nice conversation with @zcrhonek on LiboCon!

Best regards, László

strepon commented 1 year ago

Thanks a lot! And also thanks to Zdeněk for his diplomacy:) Looking forward to the improvements in LibreOffice!