-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in AbstractLanguage for decimalNumbers with zero at the end #133
Comments
Hi @PattaBov ,
In regards to representing the result "12.50" as "twelve point five", I believe we could offer an option to display it as "twelve point fifty" instead. |
Hi, thanks for the update. We were using the version 1.17.0. |
That seems perfect to me, thank you for your quick reaction! |
My testing team just pointed me out that the output still is "komma" instead of "Komma".
I can make a local workaround in our project, no problem, but could you include these changes in your next release ? Thank you |
@PattaBov I only manage the project structure and keep it up-to-date with the latest JavaScript standards. Maybe @forzagreen can chime in with insight into languages, regions, and words. However, I have made each language as flexible as possible. This means you can specify a different import n2words from 'n2words/i18n/de.js'
n2words(100, {
seperatorWord: 'Komma'
}) |
Thank you, @TylerVigario , for the resolution. |
Thank you, |
Thank you for your work, this library is a huge help as we convert numbers to text in several languages for our project.
I need to point out a bug though.
When we want to convert some value with two decimals finishing with zero, like "12.50", we expect a string value of "twelve point fifty" but we actually get "twelve point zero fifty".
It comes from the decimalToCardinal function in AbstractLanguage.js:
I think it misses a break after
Other small things, our german colleagues told us that komma in german takes a capital K so "12.50" => "zwölf Komma fünfzig"
Thank you for reading
The text was updated successfully, but these errors were encountered: