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

Issue with optional values[] and numbers with diferent spelling 1$ | 1 #70

Closed JuanmaSP closed 1 year ago

JuanmaSP commented 4 years ago

Hi,

I discovered an issue with the funcion for the optional values that returns nothing. I explain that with an example:

Here are 4 lines of the spanish 'es' language 1$ uno 1 un ([579])(\d\d) $(\100) $2 (\d)(\d\d) $1cientos[ $2]

In the website if you spell the number 531531 the result is: quinientos treinta y un mil quinientos treinta y uno (correct --> un uno )

Number 231231: doscientos treinta y uno mil doscientos treinta y uno (incorrect --> uno uno)

This appens bacause the optional function returns ?(31)| and allwais e=true

The issue affects all the languages that have diferent values whit the same number es - ca - da - gl - hu - lb - nl - sl (at their own way)

laszlonemeth commented 1 year ago

Hi,

The problem was solved in the previous patches of the v1.0.11 release, integrated with LibreOffice, too.

The result will be quite visible in LibreOffice 7.5, according to the new number and currency formats of the Calc Cell and Writer Field formatting dialog windows:

https://wiki.documentfoundation.org/ReleaseNotes/7.5#Default_.E2.80.9Cspell_out.E2.80.9D_number_and_currency_formats

Many thanks for your bug report!

Best regards, László