mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Reorder inflection rules.
Place rules for words like 'archives' and 'relatives' before words like 'knives'. Fixes #4040
This commit is contained in:
parent
800ffa804b
commit
4c92cdcada
2 changed files with 3 additions and 2 deletions
|
@ -118,6 +118,7 @@ class InflectorTest extends CakeTestCase {
|
||||||
$this->assertEquals(Inflector::singularize('geese'), 'goose');
|
$this->assertEquals(Inflector::singularize('geese'), 'goose');
|
||||||
$this->assertEquals(Inflector::singularize('feet'), 'foot');
|
$this->assertEquals(Inflector::singularize('feet'), 'foot');
|
||||||
$this->assertEquals(Inflector::singularize('objectives'), 'objective');
|
$this->assertEquals(Inflector::singularize('objectives'), 'objective');
|
||||||
|
$this->assertEquals(Inflector::singularize('archives'), 'archive');
|
||||||
|
|
||||||
$this->assertEquals(Inflector::singularize(''), '');
|
$this->assertEquals(Inflector::singularize(''), '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,10 +126,10 @@ class Inflector {
|
||||||
'/(s)eries$/i' => '\1\2eries',
|
'/(s)eries$/i' => '\1\2eries',
|
||||||
'/([^aeiouy]|qu)ies$/i' => '\1y',
|
'/([^aeiouy]|qu)ies$/i' => '\1y',
|
||||||
'/(tive)s$/i' => '\1',
|
'/(tive)s$/i' => '\1',
|
||||||
'/([lre])ves$/i' => '\1f',
|
|
||||||
'/([^fo])ves$/i' => '\1fe',
|
|
||||||
'/(hive)s$/i' => '\1',
|
'/(hive)s$/i' => '\1',
|
||||||
'/(drive)s$/i' => '\1',
|
'/(drive)s$/i' => '\1',
|
||||||
|
'/([lre])ves$/i' => '\1f',
|
||||||
|
'/([^fo])ves$/i' => '\1fe',
|
||||||
'/(^analy)ses$/i' => '\1sis',
|
'/(^analy)ses$/i' => '\1sis',
|
||||||
'/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
|
'/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
|
||||||
'/([ti])a$/i' => '\1um',
|
'/([ti])a$/i' => '\1um',
|
||||||
|
|
Loading…
Reference in a new issue