mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix incorrect pluralization of Human.
Human should become humans, unlike other words ending in man. Fixes #5370
This commit is contained in:
parent
1a1583a832
commit
ac6d5cc70f
2 changed files with 5 additions and 1 deletions
|
@ -186,6 +186,10 @@ class InflectorTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testInflectingPlurals() {
|
||||
$this->assertEquals(Inflector::pluralize('axman'), 'axmen');
|
||||
$this->assertEquals(Inflector::pluralize('man'), 'men');
|
||||
$this->assertEquals(Inflector::pluralize('woman'), 'women');
|
||||
$this->assertEquals(Inflector::pluralize('human'), 'humans');
|
||||
$this->assertEquals(Inflector::pluralize('categoria'), 'categorias');
|
||||
$this->assertEquals(Inflector::pluralize('house'), 'houses');
|
||||
$this->assertEquals(Inflector::pluralize('powerhouse'), 'powerhouses');
|
||||
|
|
|
@ -44,7 +44,7 @@ class Inflector {
|
|||
'/sis$/i' => 'ses',
|
||||
'/([ti])um$/i' => '\1a',
|
||||
'/(p)erson$/i' => '\1eople',
|
||||
'/(m)an$/i' => '\1en',
|
||||
'/(?<!u)(m)an$/i' => '\1en',
|
||||
'/(c)hild$/i' => '\1hildren',
|
||||
'/(buffal|tomat)o$/i' => '\1\2oes',
|
||||
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i',
|
||||
|
|
Loading…
Reference in a new issue