Skip to content
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

Error with plural before "mille" (thousand) in French #97

Open
killianhuyghe opened this issue Jul 11, 2023 · 1 comment
Open

Error with plural before "mille" (thousand) in French #97

killianhuyghe opened this issue Jul 11, 2023 · 1 comment
Labels

Comments

@killianhuyghe
Copy link

Hello, thank you for this package, this is the most accurate I have seen for French numbers.

There is just one case that isn't handled correctly: the word "mille" (thousand) in french is a numeral adjective (same as "un", "deux", "trois", etc), which means that the word immediately before it shouldn't be plural (as opposed to "millions", "milliards" and following, which are common nouns).

e.g.

writtenNumber(201, { lang: "fr" }); // "deux cent un" ✅
writtenNumber(200000, { lang: "fr" }); // "deux cents mille" ❌ -> should be "deux cent mille" (same rule as 201)
writtenNumber(200000000, { lang: "fr" }); // "deux cents millions" ✅ (this is correct, "millions" is not a numeral adjective)

writtenNumber(81, { lang: "fr" }); // "quatre-vingt-un" ✅
writtenNumber(800000, { lang: "fr" }); // "quatre-vingts mille" ❌ -> should be "quatre-vingt mille" (similar to 81 rule, but no dash)
writtenNumber(800000000, { lang: "fr" }); // "quatre-vingts millions" ✅ (this is correct, "millions" is not a numeral adjective)

@forzagreen
Copy link
Collaborator

Hi @killianhuyghe , this repo has very little maintenance. You can try https://github.com/forzagreen/n2words . I tried all your examples, they work correctly with n2words

@forzagreen forzagreen added the bug label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants