Update Inflector.php

Modified singularizer inside inflector to accurately inflect most words ending in -aves. Removed irregular cases solved by this fix.
This commit is contained in:
wbkostan 2014-03-19 19:12:44 -04:00
parent c53131f434
commit 9a36ed5785

View file

@ -117,7 +117,7 @@ class Inflector {
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us', '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us',
'/([ftw]ax)es/i' => '\1', '/([ftw]ax)es/i' => '\1',
'/(cris|ax|test)es$/i' => '\1is', '/(cris|ax|test)es$/i' => '\1is',
'/(shoe|slave)s$/i' => '\1', '/(shoe)s$/i' => '\1',
'/(o)es$/i' => '\1', '/(o)es$/i' => '\1',
'/ouses$/' => 'ouse', '/ouses$/' => 'ouse',
'/([^a])uses$/' => '\1us', '/([^a])uses$/' => '\1us',
@ -130,7 +130,7 @@ class Inflector {
'/(hive)s$/i' => '\1', '/(hive)s$/i' => '\1',
'/(drive)s$/i' => '\1', '/(drive)s$/i' => '\1',
'/([le])ves$/i' => '\1f', '/([le])ves$/i' => '\1f',
'/([^rfo])ves$/i' => '\1fe', '/([^rfoa])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',
@ -147,7 +147,6 @@ class Inflector {
), ),
'irregular' => array( 'irregular' => array(
'foes' => 'foe', 'foes' => 'foe',
'waves' => 'wave',
) )
); );