feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
12
vendor/github.com/gobuffalo/flect/pluralize.go
generated
vendored
12
vendor/github.com/gobuffalo/flect/pluralize.go
generated
vendored
@@ -38,18 +38,28 @@ func (i Ident) Pluralize() Ident {
|
||||
pluralMoot.RLock()
|
||||
defer pluralMoot.RUnlock()
|
||||
|
||||
// check if the Original has an explicit entry in the map
|
||||
if p, ok := singleToPlural[i.Original]; ok {
|
||||
return i.ReplaceSuffix(i.Original, p)
|
||||
}
|
||||
if _, ok := pluralToSingle[i.Original]; ok {
|
||||
return i
|
||||
}
|
||||
|
||||
ls := strings.ToLower(s)
|
||||
if _, ok := pluralToSingle[ls]; ok {
|
||||
return i
|
||||
}
|
||||
|
||||
if p, ok := singleToPlural[ls]; ok {
|
||||
if s == Capitalize(s) {
|
||||
p = Capitalize(p)
|
||||
}
|
||||
return i.ReplaceSuffix(s, p)
|
||||
}
|
||||
|
||||
for _, r := range pluralRules {
|
||||
if strings.HasSuffix(ls, r.suffix) {
|
||||
if strings.HasSuffix(s, r.suffix) {
|
||||
return i.ReplaceSuffix(s, r.fn(s))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user