Adding waves -> wave as irregular singularization rule. Fixes #47.

This commit is contained in:
jperras 2009-08-22 20:26:27 -04:00
parent 47d9181313
commit 6f8f4c5a05
2 changed files with 7 additions and 2 deletions

View file

@ -318,7 +318,8 @@ class Inflector extends Object {
'nexus', 'Niasese', 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', 'proceedings',
'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', 'sea[- ]bass', 'series', 'Shavese', 'shears',
'siemens', 'species', 'swine', 'testes', 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese',
'whiting', 'wildebeest', 'Yengeese');
'whiting', 'wildebeest', 'Yengeese'
);
$coreIrregularSingular = array(
'atlases' => 'atlas',
@ -349,7 +350,9 @@ class Inflector extends Object {
'soliloquies' => 'soliloquy',
'testes' => 'testis',
'trilbys' => 'trilby',
'turfs' => 'turf');
'turfs' => 'turf',
'waves' => 'wave'
);
$singularRules = Set::pushDiff($this->__singularRules, $coreSingularRules);
$uninflected = Set::pushDiff($this->__uninflectedSingular, $coreUninflectedSingular);

View file

@ -108,6 +108,7 @@ class InflectorTest extends CakeTestCase {
$this->assertEqual(Inflector::singularize('taxes'), 'tax');
$this->assertEqual(Inflector::singularize('faxes'), 'fax');
$this->assertEqual(Inflector::singularize('waxes'), 'wax');
$this->assertEqual(Inflector::singularize('waves'), 'wave');
$this->assertEqual(Inflector::singularize(''), '');
}
/**
@ -151,6 +152,7 @@ class InflectorTest extends CakeTestCase {
$this->assertEqual(Inflector::pluralize('people'), 'people');
$this->assertEqual(Inflector::pluralize('glove'), 'gloves');
$this->assertEqual(Inflector::pluralize('crisis'), 'crises');
$this->assertEqual(Inflector::pluralize('wave'), 'waves');
$this->assertEqual(Inflector::pluralize(''), '');
}
/**