mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
Properly pluralize everything (closes #19)
This commit is contained in:
@@ -19,6 +19,16 @@ U = function(relativePath)
|
||||
return Grocy.BaseUrl.replace(/\/$/, '') + relativePath;
|
||||
}
|
||||
|
||||
Pluralize = function(number, singularForm, pluralForm)
|
||||
{
|
||||
var text = singularForm;
|
||||
if (number != 1 && pluralForm !== null && !pluralForm.isEmpty())
|
||||
{
|
||||
text = pluralForm;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
if (!Grocy.ActiveNav.isEmpty())
|
||||
{
|
||||
var menuItem = $('#sidebarResponsive').find("[data-nav-for-page='" + Grocy.ActiveNav + "']");
|
||||
|
Reference in New Issue
Block a user