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

Remove French pluralization rules. #195

Merged

Conversation

AntoineBecquet
Copy link
Contributor

I don't now where does this "number % 10 == 1" comme from, but in French "trente et un chats" is as plural as "trente deux chats", all numbers superior or equal at two are.

Apparently this rule existed on the seventeenth century :

  1. Un après un nombre (vingt et un, trente et un, etc.) veut le pluriel : vingt et un chevaux. Autre était la décision de l'Académie au XVIIe siècle : On dit ce mois a trente et un jour, et non pas trente et un jours ;

https://www.littre.org/definition/un


A little of topic, but I found this error because this pluralization rule was applied to all of our Rails project.

We had strange behavior like :

irb(main):001:0> I18n.t("toto", count: 20)
=> "20 totos"
irb(main):002:0> I18n.t("toto", count: 21)
=> "un toto"

This behavior won't exist in French anymore, but is it expected for other languages ?

@AntoineBecquet
Copy link
Contributor Author

Funnily, the existing "vingt et un mille" fixture was already correct because "mille" is invariable.

@AntoineBecquet AntoineBecquet force-pushed the remove_french_pluralization branch 3 times, most recently from cd0ae98 to fd1d496 Compare April 19, 2023 16:19
@AntoineBecquet AntoineBecquet force-pushed the remove_french_pluralization branch from fd1d496 to 39ea562 Compare April 19, 2023 16:20
@jlduran
Copy link
Collaborator

jlduran commented Apr 19, 2023

Thank you for your contribution!
Expect a new gem release over the weekend.

@jlduran jlduran merged commit dea76c7 into kslazarev:master Apr 19, 2023
@dblock
Copy link
Collaborator

dblock commented Apr 19, 2023

Merci!

jlduran added a commit that referenced this pull request Apr 23, 2023
Release 0.11.12 (April 22, 2023)

Features:

- Add support for Ruby 3.1. \[[#187](https://github.com/kslazarev/numbers_and_words/pull/187)\]
- Drop support for Ruby 2.5. \[[#180](https://github.com/kslazarev/numbers_and_words/pull/180)\]
- Drop support for Ruby 2.6. \[[#190](https://github.com/kslazarev/numbers_and_words/pull/190)\]
- Add support for Ruby 3.2. \[[#193](https://github.com/kslazarev/numbers_and_words/pull/193)\]

Bugs:

- Properly handle Dutch year numbers. \[[#183](https://github.com/kslazarev/numbers_and_words/pull/183)\] \([@mvz](https://github.com/mvz)\)
- Remove pluralization rules for French. \[[#195](https://github.com/kslazarev/numbers_and_words/pull/195)\]
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

Successfully merging this pull request may close these issues.

3 participants