This commit is contained in:
Eden Kirin
2025-10-31 19:04:40 +01:00
parent ca10b01fb0
commit 4e4827d640
12 changed files with 2612 additions and 10 deletions

View File

@ -155,8 +155,12 @@ func Pluralize(word string) string {
return preserveCase(word, plural)
}
// Already plural (ends in 's' and not special case)
if strings.HasSuffix(lower, "s") && !strings.HasSuffix(lower, "us") {
// Already plural (ends in 's' after a consonant, but not 'ss', 'us', 'is')
// Skip this check if word ends in 'ss' (like 'class', 'glass')
if strings.HasSuffix(lower, "s") &&
!strings.HasSuffix(lower, "ss") &&
!strings.HasSuffix(lower, "us") &&
!strings.HasSuffix(lower, "is") {
return word
}