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

Some tests in French (Belgium) are not correct. #532

Open
Vincent-Stragier opened this issue Aug 24, 2023 · 0 comments
Open

Some tests in French (Belgium) are not correct. #532

Vincent-Stragier opened this issue Aug 24, 2023 · 0 comments

Comments

@Vincent-Stragier
Copy link

Vincent-Stragier commented Aug 24, 2023

French (Belgium) is a really complex with numbers and even as a native speaker, numbers are quite difficult to write correctly. I've been through the tests and some seem to be wrongs.

Some interesting references from Wikipedia (maybe not the most reliable sources, but at least they exist):

Big numbers names (in French)
Numbers in French (in French)

Alternative (edit)

I'd really like this package to handle all the languages, but for the time being, I made my own package to handle all the French numbers. More information here: https://pypi.org/project/nombres-vers-lettres/. Feel free to open issues, or use it to improve this package (although my code is more spaghetti like, but it is also tested and linted).

The rest of the issue

Cardinal

(729, 'sept cents vingt-neuf'),
(894, 'huit cents nonante-quatre'),
(999, 'neuf cents nonante-neuf'),
(7232, 'sept mille deux cents trente-deux'),
(8569, 'huit mille cinq cents soixante-neuf'),
(9539, 'neuf mille cinq cents trente-neuf'),
(1000000, 'un millions'),
(1000001, 'un millions un'),

(1000000000000000000, 'un trillions'),
(1000000000000000000000, 'un trilliards'),

The correct tests would be:

 (729, 'sept cent vingt-neuf'), 
 (894, 'huit cent nonante-quatre'), 
 (999, 'neuf cent nonante-neuf'), 
 (7232, 'sept mille deux cent trente-deux'), 
 (8569, 'huit mille cinq cent soixante-neuf'), 
 (9539, 'neuf mille cinq cent trente-neuf'), 
 (1000000, 'un million'), 
 (1000001, 'un million un'), 
 [...]
 (1000000000000000000, 'un trillion'), 
 (1000000000000000000000, 'un trilliard'), 

Ordinal

(1000000, 'un millionsième'),
(1000000000000000, 'un billiardsième'),
(1000000000000000000, 'un trillionsième') # over 1e18 is not supported

The correct tests would be:

    (1000000,  'millionième'),
    (1000000000000000, 'billiardième'),
    (1000000000000000000, 'trillionième')  # over 1e18 is not supported

Also, you should test for (2000000, 'deux millionièmes'),, etc.

Currency EUR

(1.00, 'un euro et zéro centimes'),

(100.00, 'cent euros et zéro centimes'),

The correct tests would be:

    (1.00, 'un euro et zéro centime'),
    [...]
    (100.00, 'cent euros et zéro centime'),

Currency FRF

(1.00, 'un euro et zéro centimes'),

(100.00, 'cent euros et zéro centimes'),

The correct tests would be:

    (1.00, 'un franc et zéro centime'),
    [...]
    (100.00, 'cent francs et zéro centime'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant