Fixed invalid feedback -> foodback singularization

This commit is contained in:
WouterJ 2015-02-07 11:37:57 +01:00
parent d9c0c55ace
commit bc501259d1
2 changed files with 3 additions and 1 deletions

View File

@ -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);
}

View File

@ -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'),