Tests
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user