8000 [Inflector][String] Fixed pluralize "coupon" by Nyholm · Pull Request #40499 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
Mar 17, 2021
Merged

Conversation

Nyholm
Copy link
Member
@Nyholm Nyholm commented Mar 17, 2021
Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #40467
License MIT
Doc PR

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.

@derrabus
Copy link
Member

This issue needs to be fixed on 4.4 (inflector component).

@derrabus derrabus modified the milestones: 5.2, 4.4 Mar 17, 2021
@carsonbot carsonbot changed the title [String] Fixed pluralize "coupon" [Inflector][String] Fixed pluralize "coupon" Mar 17, 2021
@Nyholm Nyholm changed the base branch from 5.2 to 4.4 March 17, 2021 15:36
@Nyholm
Copy link
Member Author
Nyholm commented Mar 17, 2021

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'],
Copy link
Member

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'],

Copy link
Member

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.

Copy link
Member
@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(updated)

@nicolas-grekas
Copy link
Member
8000

Thank you @Nyholm.

@nicolas-grekas nicolas-grekas merged commit d3c0834 into symfony:4.4 Mar 17, 2021
@Nyholm
Copy link
Member Author
Nyholm commented Mar 18, 2021

Thank you for merging.

@Nyholm Nyholm deleted the coupon branch March 18, 2021 08:03
This was referenced Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0