mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Properly pluralize everything (closes #19)
This commit is contained in:
@@ -168,3 +168,13 @@ function GetUserDisplayName($user)
|
||||
|
||||
return $displayName;
|
||||
}
|
||||
|
||||
function Pluralize($number, $singularForm, $pluralForm)
|
||||
{
|
||||
$text = $singularForm;
|
||||
if ($number != 1 && $pluralForm !== null && !empty($pluralForm))
|
||||
{
|
||||
$text = $pluralForm;
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
Reference in New Issue
Block a user