-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Inflector][String] Fixed pluralize "coupon" #40499
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
Conversation
This issue needs to be fixed on 4.4 (inflector component). |
You are correct. The bug existed in 4.4 in the inflector component too. I guess it will be merged up properly if I target 4.4. The PR is updated. |
@@ -231,6 +231,9 @@ final class Inflector | |||
// bacteria (bacterium), criteria (criterion), phenomena (phenomenon) | |||
['noi', 3, true, true, 'ions'], | |||
|
|||
// coupon (coupons) | |||
['nopuoc', 6, true, true, 'coupons'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can widen this to
['nop', 3, true, true, 'pons'],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm we should do this, see https://en.wiktionary.org/wiki/Category:English_plurals_ending_in_%22-a%22: it lists no English words that end with pon
and have a pa
plural.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(updated)
Thank you @Nyholm. |
Thank you for merging. |
The rule for "bacteria (bacterium), criteria (criterion), phenomena (phenomenon)" is producing this behaviour. I added an exception to the "criterion exception".
"coupon" is an old French word, that is maybe why it does not follow the classic "on" rule... I dont know. The test passes and I dont think I've added any side-effects.
This is also my first time working with the
EnglishInflector
.