Reorder inflection rules.

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

Fixes #4040
This commit is contained in:
mark_story 2013-09-03 12:50:02 -04:00
parent 800ffa804b
commit 4c92cdcada
2 changed files with 3 additions and 2 deletions

View file

@ -118,6 +118,7 @@ class InflectorTest extends CakeTestCase {
$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(''), '');
}

View file

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