2018-11-12 05:24:00 +00:00
|
|
|
const specialized = {
|
|
|
|
"new activity": "new activities"
|
|
|
|
}
|
|
|
|
|
2018-04-02 05:34:16 +00:00
|
|
|
export function plural(count: number, singular: string): string {
|
2018-11-12 05:24:00 +00:00
|
|
|
if(count === 1 || count === -1) {
|
|
|
|
return count + " " + singular
|
|
|
|
}
|
|
|
|
|
|
|
|
if(specialized[singular]) {
|
|
|
|
return count + " " + specialized[singular]
|
|
|
|
}
|
|
|
|
|
|
|
|
return count + " " + singular + "s"
|
2018-04-02 05:34:16 +00:00
|
|
|
}
|