projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #18930 from MegaphoneJon/financial-156
[civicrm-core.git]
/
CRM
/
Utils
/
String.php
diff --git
a/CRM/Utils/String.php
b/CRM/Utils/String.php
index 654b74ff0ebcb41cbd4c28162935265021dbebe0..7c0897436508acb9f83c494f343981706c3b235c 100644
(file)
--- a/
CRM/Utils/String.php
+++ b/
CRM/Utils/String.php
@@
-941,10
+941,10
@@
class CRM_Utils_String {
public static function pluralize($str) {
$lastLetter = substr($str, -1);
$lastTwo = substr($str, -2);
public static function pluralize($str) {
$lastLetter = substr($str, -1);
$lastTwo = substr($str, -2);
- if ($lastLetter == 's' || $lastTwo == 'ch') {
+ if ($lastLetter == 's' || $last
Letter == 'x' || $last
Two == 'ch') {
return $str . 'es';
}
return $str . 'es';
}
- if ($lastLetter == 'y' &&
$lastTwo != 'ey'
) {
+ if ($lastLetter == 'y' &&
!in_array($lastTwo, ['ay', 'ey', 'iy', 'oy', 'uy'])
) {
return substr($str, 0, -1) . 'ies';
}
return $str . 's';
return substr($str, 0, -1) . 'ies';
}
return $str . 's';