diff --git a/cmd/help.go b/cmd/help.go index b5f1c2227..0d1295d34 100644 --- a/cmd/help.go +++ b/cmd/help.go @@ -17,6 +17,8 @@ import ( "github.com/rclone/rclone/lib/atexit" "github.com/spf13/cobra" "github.com/spf13/pflag" + "golang.org/x/text/cases" + "golang.org/x/text/language" ) // Root is the main rclone command @@ -316,7 +318,8 @@ func showBackend(name string) { optionsType = "advanced" continue } - fmt.Printf("### %s options\n\n", strings.Title(optionsType)) + optionsType = cases.Title(language.Und, cases.NoLower).String(optionsType) + fmt.Printf("### %s options\n\n", optionsType) fmt.Printf("Here are the %s options specific to %s (%s).\n\n", optionsType, backend.Name, backend.Description) optionsType = "advanced" for _, opt := range opts { diff --git a/fs/operations/operations_test.go b/fs/operations/operations_test.go index 8cd7296e4..34b88d6d1 100644 --- a/fs/operations/operations_test.go +++ b/fs/operations/operations_test.go @@ -47,6 +47,8 @@ import ( "github.com/rclone/rclone/fstest/fstests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "golang.org/x/text/cases" + "golang.org/x/text/language" ) // Some times used in the tests @@ -270,7 +272,7 @@ func TestHashSums(t *testing.T) { if !hashes.Contains(test.ht) { continue } - name := strings.Title(test.ht.String()) + name := cases.Title(language.Und, cases.NoLower).String(test.ht.String()) if test.download { name += "Download" }