2018-11-12 05:24:00 +00:00
|
|
|
const specialized = {
|
|
|
|
"new activity": "new activities"
|
|
|
|
}
|
|
|
|
|
2019-11-18 02:04:13 +00:00
|
|
|
export default 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"
|
2019-11-17 09:44:30 +00:00
|
|
|
}
|