-
Notifications
You must be signed in to change notification settings - Fork 5
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
Wrong spellout cardinal for et locale #6
Comments
FWIW, here are some more errors that I stumbled when trying it out. var inter = require('inter').load('fr_be');
console.log(inter.renderSpelloutCardinal(2439871)); Results in: TypeError: Cannot call method 'charCodeAt' of undefined
at subformatFixed (/Library/WebServer/Documents/node_projects/test_inter/node_modules/inter/build/root.js:175:121)
at format (/Library/WebServer/Documents/node_projects/test_inter/node_modules/inter/build/root.js:350:84)
at Object.(anonymous function) [as renderNumber] (/Library/WebServer/Documents/node_projects/test_inter/node_modules/inter/build/root.js:573:162)
at Object.inter.renderSpelloutCardinal (/Library/WebServer/Documents/node_projects/test_inter/node_modules/inter/build/fr_be.js:856:33) The following: var inter = require('inter').load('fr');
console.log(inter.renderSpelloutCardinal(2439871)); Results in:
|
Thanks for taking the time to submit these issues. Some of them are certainly caused by me rushing the update to CLDR 24 without realizing that there were major changes. I'm really sorry about that. I managed to fix some of the problems, but I haven't released a new version yet, because I started writing tests and realized that more stuff is broken. I hope I'll find the time to get the project into a good state soon. Thanks for you patience. |
That's okay. I was simply playing around. I do hope I can evaluate your lib for an app that I am building, where i18n is a big must. |
Seems like these are now fixed in inter 1.2.3, which will be released shortly (updates cldr to 2.1.1). Apparently the correct name for that spellout rule is require('inter').load('fr_be').renderSpelloutNumbering(2439871);
// 'deux millions quatre cent trente-neuf mille huit cent septante-et-un' And for require('inter').load('fr').renderSpelloutNumbering(2439871);
// 'deux millions quatre cent trente-neuf mille huit cent soixante-et-un' Better? |
Gives: üks miljonit nelisada ükskümmend üheksa tuhat kolmkümmend üks
The above result is totally messed up. It should say:
kaks miljonit nelisada kolmkümmend üheksa tuhat kaheksasada seitsekümmend üks
Basically, translated to english, it is currently saying:
One millione four-hunderd onety-nine-thousand thrity-one
I guess there must be a serious flaw in the cardinal function generator.
The text was updated successfully, but these errors were encountered: