Fix some humanize issues

Fixes #7912
This commit is contained in:
susiwen8
2021-02-15 01:30:59 +08:00
committed by GitHub
parent 5f621df257
commit bf55afd71f
6 changed files with 13 additions and 12 deletions

View File

@@ -16,8 +16,9 @@ package inflect
import (
"strconv"
"strings"
_inflect "github.com/markbates/inflect"
_inflect "github.com/gobuffalo/flect"
"github.com/spf13/cast"
)
@@ -53,7 +54,8 @@ func (ns *Namespace) Humanize(in interface{}) (string, error) {
return _inflect.Ordinalize(word), nil
}
return _inflect.Humanize(word), nil
str := _inflect.Humanize(word)
return _inflect.Humanize(strings.ToLower(str)), nil
}
// Pluralize returns the plural form of a single word.