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

Wrong text for $0.21 in Russian and Ukrainian #99

Closed zeezooz closed 1 year ago

zeezooz commented 1 year ago

Hi!

The word cents has an incorrect form for the values [2-9]1. It should be the same as for $0.01 (цент) instead of центов/центів.

https://numbertext.github.io/#testimonials image image image

LibreOffice extension 1.0.9 (1.0.10 isn't available at extensions.libreoffice.org) image

oshliaer commented 1 year ago

OK.

I added a separate definition for decimals greater than 20. But now it seems to me that this whole thing could be simpler. You can still think and do refactoring of all these rules.

laszlonemeth commented 1 year ago

Dear Andrew,

Thanks to Alex Ivanov, this problem was fixed in libnumbertext. I'm going to update the integrated libnumbertext of LibreOffice, so using NatNum12 number format, it will be possible to access to the fix immediately, without installing the NumberText extension.

Note: I started to add selectable NUMBERTEXT and MONEYTEXT number formats to Cell formatting dialog window, too:

https://gerrit.libreoffice.org/c/core/+/141994 tdf#115007 add NatNum12 number format list items, fix title case https://gerrit.libreoffice.org/c/core/+/142126 tdf#115007 i18npool: add NatNum12 formats to locale

Many thanks for your bug report!

Best regards, László