Skip to content
Permalink
Browse files

Reorder inflection rules.

Place rules for words like 'archives' and 'relatives' before words like
'knives'.

Fixes #4040
  • Loading branch information...
markstory committed Sep 3, 2013
1 parent 800ffa8 commit 4c92cdcadaec797d32a6947f8031dd546a2a33da
Showing with 3 additions and 2 deletions.
  1. +1 −0 lib/Cake/Test/Case/Utility/InflectorTest.php
  2. +2 −2 lib/Cake/Utility/Inflector.php
@@ -118,6 +118,7 @@ public function testInflectingSingulars() {
$this->assertEquals(Inflector::singularize('geese'), 'goose');
$this->assertEquals(Inflector::singularize('feet'), 'foot');
$this->assertEquals(Inflector::singularize('objectives'), 'objective');
$this->assertEquals(Inflector::singularize('archives'), 'archive');
$this->assertEquals(Inflector::singularize(''), '');
}
@@ -126,10 +126,10 @@ class Inflector {
'/(s)eries$/i' => '\1\2eries',
'/([^aeiouy]|qu)ies$/i' => '\1y',
'/(tive)s$/i' => '\1',
'/([lre])ves$/i' => '\1f',
'/([^fo])ves$/i' => '\1fe',
'/(hive)s$/i' => '\1',
'/(drive)s$/i' => '\1',
'/([lre])ves$/i' => '\1f',
'/([^fo])ves$/i' => '\1fe',
'/(^analy)ses$/i' => '\1sis',
'/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
'/([ti])a$/i' => '\1um',

0 comments on commit 4c92cdc

Please sign in to comment.
You can’t perform that action at this time.