merged branch sumbobyboys/patch-1 (PR #8804)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8804).

Discussion
----------

Exclude little words of 'ee' to 'oo' plural transformation

The plural form of 'bee' and 'fee' are not 'foo' and 'boo'. In general words smaller than 3 letters doesn't change to a 'oo' form.

Commits
-------

0ffdb11 Exclude little words of 'ee' to 'oo' plural transformation
This commit is contained in:
Fabien Potencier 2013-08-22 06:15:06 +02:00
commit 124ad0dc69
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class StringUtil
}
// Convert teeth to tooth, feet to foot
if (false !== ($pos = strpos($plural, 'ee'))) {
if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3) {
return substr_replace($plural, 'oo', $pos, 2);
}