8000 bug #32730 [Inflector] Fix pluralizing words ending with "son" (norku… · symfony/symfony@9d6ca0d · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d6ca0d

Browse files
committed
bug #32730 [Inflector] Fix pluralizing words ending with "son" (norkunas)
This PR was merged into the 4.3 branch. Discussion ---------- [Inflector] Fix pluralizing words ending with "son" | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32713 | License | MIT | Doc PR | - <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch. --> Commits ------- bf608aa Fix pluralizing "season"
2 parents 61b0f79 + bf608aa commit 9d6ca0d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Symfony/Component/Inflector/Inflector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ final class Inflector
228228
// bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
229229
['noi', 3, true, true, 'ions'],
230230

231+
// seasons (season), treasons (treason), poisons (poison), lessons (lesson)
232+
['nos', 3, true, true, 'sons'],
233+
231234
// bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
232235
['no', 2, true, true, 'a'],
233236

src/Symfony/Component/Inflector/Tests/InflectorTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public function singularizeProvider()
9393
['kisses', 'kiss'],
9494
['knives', 'knife'],
9595
['lamps', 'lamp'],
96+
['lessons', 'lesson'],
9697
['leaves', ['leaf', 'leave', 'leaff']],
9798
['lice', 'louse'],
9899
['lives', 'life'],
@@ -115,6 +116,7 @@ public function singularizeProvider()
115116
['photos', 'photo'],
116117
['pianos', 'piano'],
117118
['plateaux', 'plateau'],
119+
['poisons', 'poison'],
118120
['poppies', 'poppy'],
119121
['prices', ['prex', 'prix', 'price']],
120122
['quizzes', 'quiz'],
@@ -124,6 +126,7 @@ public function singularizeProvider()
124126
['sandwiches', ['sandwich', 'sandwiche']],
125127
['scarves', ['scarf', 'scarve', 'scarff']],
126128
['schemas', 'schema'], //schemata
129+
['seasons', 'season'],
127130
['selfies', 'selfie'],
128131
['series', 'series'],
129132
['services', 'service'],
@@ -139,6 +142,7 @@ public function singularizeProvider()
139142
['teeth', 'tooth'],
140143
['theses', ['thes', 'these', 'thesis']],
141144
['thieves', ['thief', 'thieve', 'thieff']],
145+
['treasons', 'treason'],
142146
['trees', ['tre', 'tree']],
143147
['waltzes', ['waltz', 'waltze']],
144148
['wives', 'wife'],
@@ -226,6 +230,7 @@ public function pluralizeProvider()
226230
['knife', 'knives'],
227231
['lamp', 'lamps'],
228232
['leaf', ['leafs', 'leaves']],
233+
['lesson', 'lessons'],
229234
['life', 'lives'],
230235
['louse', 'lice'],
231236
['man', 'men'],
@@ -245,6 +250,7 @@ public function pluralizeProvider()
245250
['photo', 'photos'],
246251
['piano', 'pianos'],
247252
['plateau', ['plateaus', 'plateaux']],
253+
['poison', 'poisons'],
248254
['poppy', 'poppies'],
249255
['price', 'prices'],
250256
['quiz', 'quizzes'],
@@ -254,6 +260,7 @@ public function pluralizeProvider()
254260
['sandwich', 'sandwiches'],
255261
['scarf', ['scarfs', 'scarves']],
256262
['schema', 'schemas'], //schemata
263+
['season', 'seasons'],
257264
['selfie', 'selfies'],
258265
['series', 'series'],
259266
['service', 'services'],
@@ -268,6 +275,7 @@ public function pluralizeProvider()
268275
['tag', 'tags'],
269276
['thief', ['thiefs', 'thieves']],
270277
['t 553E ooth', 'teeth'],
278+
['treason', 'treasons'],
271279
['tree', 'trees'],
272280
['waltz', 'waltzes'],
273281
['wife', 'wives'],

0 commit comments

Comments
 (0)
0