summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/libjs/base.js')
-rw-r--r--source4/scripting/libjs/base.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/scripting/libjs/base.js b/source4/scripting/libjs/base.js
index 181b3ca959..39b62b133e 100644
--- a/source4/scripting/libjs/base.js
+++ b/source4/scripting/libjs/base.js
@@ -87,3 +87,14 @@ function substitute_var(str, subobj)
}
return join("", list);
}
+
+/*
+ return "s" if a number should be shown as plural
+*/
+function plural(n)
+{
+ if (n == 1) {
+ return "";
+ }
+ return "s";
+}