fix: auth race condition on refresh, section edit dialog, time slot duplicate, autocomplete disable
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
15
apps/app/src/lib/dutch-plural.ts
Normal file
15
apps/app/src/lib/dutch-plural.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Basic Dutch pluralisation for configurable event labels.
|
||||
* Covers the known sub_event_label values: Dag, Programmaonderdeel, Editie, Locatie, Ronde.
|
||||
*/
|
||||
export function dutchPlural(word: string): string {
|
||||
// Words ending in -ie: add -s (editie → edities, locatie → locaties)
|
||||
if (word.endsWith('ie')) return `${word}s`
|
||||
// Words ending in -e: add -s (ronde → rondes)
|
||||
if (word.endsWith('e')) return `${word}s`
|
||||
// Double vowel before final consonant(s): single vowel + en (onderdeel → onderdelen)
|
||||
const match = word.match(/^(.*)([aeiou])\2([^aeiou]+)$/i)
|
||||
if (match) return `${match[1]}${match[2]}${match[3]}en`
|
||||
// Default: add -en (dag → dagen)
|
||||
return `${word}en`
|
||||
}
|
||||
Reference in New Issue
Block a user