mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -22,6 +22,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/flect"
|
||||
"github.com/gohugoio/hugo/markup/converter"
|
||||
|
||||
"github.com/gohugoio/hugo/hugofs/files"
|
||||
@@ -31,7 +32,6 @@ import (
|
||||
"github.com/gohugoio/hugo/related"
|
||||
|
||||
"github.com/gohugoio/hugo/source"
|
||||
"github.com/markbates/inflect"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/gohugoio/hugo/common/maps"
|
||||
@@ -717,7 +717,7 @@ func (p *pageMeta) applyDefaultValues(n *contentNode) error {
|
||||
|
||||
sectionName = helpers.FirstUpper(sectionName)
|
||||
if p.s.Cfg.GetBool("pluralizeListTitles") {
|
||||
p.title = inflect.Pluralize(sectionName)
|
||||
p.title = flect.Pluralize(sectionName)
|
||||
} else {
|
||||
p.title = sectionName
|
||||
}
|
||||
|
@@ -22,12 +22,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/gobuffalo/flect"
|
||||
"github.com/gohugoio/hugo/publisher"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/markbates/inflect"
|
||||
|
||||
qt "github.com/frankban/quicktest"
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
"github.com/gohugoio/hugo/resources/page"
|
||||
@@ -487,7 +486,7 @@ func doTestSectionNaming(t *testing.T, canonify, uglify, pluralize bool) {
|
||||
for _, test := range tests {
|
||||
|
||||
if test.pluralAware && pluralize {
|
||||
test.expected = inflect.Pluralize(test.expected)
|
||||
test.expected = flect.Pluralize(test.expected)
|
||||
}
|
||||
|
||||
th.assertFileContent(filepath.Join("public", test.doc), test.expected)
|
||||
|
Reference in New Issue
Block a user