mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-11 19:20:01 +08:00
updated StringHelper plural rules
intregrated updates from version 1.1
This commit is contained in:
@@ -28,13 +28,14 @@ class StringHelper
|
||||
public static function pluralize($name)
|
||||
{
|
||||
$rules = array(
|
||||
'/move$/i' => 'moves',
|
||||
'/foot$/i' => 'feet',
|
||||
'/child$/i' => 'children',
|
||||
'/human$/i' => 'humans',
|
||||
'/man$/i' => 'men',
|
||||
'/tooth$/i' => 'teeth',
|
||||
'/person$/i' => 'people',
|
||||
'/(m)ove$/i' => '\1oves',
|
||||
'/(f)oot$/i' => '\1eet',
|
||||
'/(c)hild$/i' => '\1hildren',
|
||||
'/(h)uman$/i' => '\1umans',
|
||||
'/(m)an$/i' => '\1en',
|
||||
'/(s)taff$/i' => '\1taff',
|
||||
'/(t)ooth$/i' => '\1eeth',
|
||||
'/(p)erson$/i' => '\1eople',
|
||||
'/([m|l])ouse$/i' => '\1ice',
|
||||
'/(x|ch|ss|sh|us|as|is|os)$/i' => '\1es',
|
||||
'/([^aeiouy]|qu)y$/i' => '\1ies',
|
||||
|
||||
Reference in New Issue
Block a user