mirror of https://github.com/Icinga/icinga2.git
parent
1b9f0a8c77
commit
b2829ca522
|
@ -60,7 +60,8 @@ String Type::GetPluralName(void) const
|
||||||
{
|
{
|
||||||
String name = GetName();
|
String name = GetName();
|
||||||
|
|
||||||
if (name[name.GetLength() - 1] == 'y')
|
if (name.GetLength() >= 2 && name[name.GetLength() - 1] == 'y' &&
|
||||||
|
name.SubStr(name.GetLength() - 2, 1).FindFirstOf("aeiou") == String::NPos)
|
||||||
return name.SubStr(0, name.GetLength() - 1) + "ies";
|
return name.SubStr(0, name.GetLength() - 1) + "ies";
|
||||||
else
|
else
|
||||||
return name + "s";
|
return name + "s";
|
||||||
|
|
Loading…
Reference in New Issue