Fix inflection rules for curves.

Remove curve from the uninflected list and update rules so it, wolves,
and lives are still properly handled.

Fixes #2148
This commit is contained in:
mark_story 2013-10-17 12:15:56 -04:00
parent 935a51c892
commit 1ae470a284
2 changed files with 4 additions and 3 deletions

View file

@ -122,6 +122,7 @@ class InflectorTest extends CakeTestCase {
$this->assertEquals(Inflector::singularize('briefs'), 'brief');
$this->assertEquals(Inflector::singularize('quotas'), 'quota');
$this->assertEquals(Inflector::singularize('curves'), 'curve');
$this->assertEquals(Inflector::singularize('body_curves'), 'body_curve');
$this->assertEquals(Inflector::singularize(''), '');
}
@ -185,6 +186,7 @@ class InflectorTest extends CakeTestCase {
$this->assertEquals(Inflector::pluralize('brief'), 'briefs');
$this->assertEquals(Inflector::pluralize('quota'), 'quotas');
$this->assertEquals(Inflector::pluralize('curve'), 'curves');
$this->assertEquals(Inflector::pluralize('body_curve'), 'body_curves');
$this->assertEquals(Inflector::pluralize(''), '');
}

View file

@ -129,8 +129,8 @@ class Inflector {
'/(tive)s$/i' => '\1',
'/(hive)s$/i' => '\1',
'/(drive)s$/i' => '\1',
'/([lre])ves$/i' => '\1f',
'/([^fo])ves$/i' => '\1fe',
'/([le])ves$/i' => '\1f',
'/([^rfo])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',
@ -148,7 +148,6 @@ class Inflector {
'irregular' => array(
'foes' => 'foe',
'waves' => 'wave',
'curves' => 'curve'
)
);