Fixed invalid feedback -> foodback singularization
This commit is contained in:
parent
d9c0c55ace
commit
bc501259d1
@ -197,7 +197,7 @@ class StringUtil
|
||||
}
|
||||
|
||||
// Convert teeth to tooth, feet to foot
|
||||
if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3) {
|
||||
if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3 && 'feedback' !== $plural) {
|
||||
return substr_replace($plural, 'oo', $pos, 2);
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,7 @@ class StringUtilTest extends \PHPUnit_Framework_TestCase
|
||||
array('data', array('daton', 'datum')),
|
||||
array('days', 'day'),
|
||||
array('discos', 'disco'),
|
||||
array('devices', array('devex', 'devix', 'device')),
|
||||
array('drives', 'drive'),
|
||||
array('drivers', 'driver'),
|
||||
array('dwarves', array('dwarf', 'dwarve', 'dwarff')),
|
||||
@ -67,6 +68,7 @@ class StringUtilTest extends \PHPUnit_Framework_TestCase
|
||||
array('emphases', array('emphas', 'emphase', 'emphasis')),
|
||||
array('faxes', 'fax'),
|
||||
array('feet', 'foot'),
|
||||
array('feedback', 'feedback'),
|
||||
array('foci', 'focus'),
|
||||
array('focuses', array('focus', 'focuse', 'focusis')),
|
||||
array('formulae', 'formula'),
|
||||
|
Reference in New Issue
Block a user