aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-02-15 13:03:36 +0100
committerBjørn Erik Pedersen <[email protected]>2022-02-15 13:03:36 +0100
commit837fdfdf45014e3d5ef3b00b01548b68a4489c5f (patch)
tree8711ad6408202a6cbf6b34a5efb7b5aeb868d730 /commands
parent6819feab6c21f226c50705a61dd2eee8c6c564ea (diff)
downloadhugo-837fdfdf45014e3d5ef3b00b01548b68a4489c5f.tar.gz
hugo-837fdfdf45014e3d5ef3b00b01548b68a4489c5f.zip
commands: Rename --i18n-warnings to printI18nWarnings
To get it in line with the others.
Diffstat (limited to 'commands')
-rw-r--r--commands/commands.go2
-rw-r--r--commands/commands_test.go4
-rw-r--r--commands/hugo.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/commands/commands.go b/commands/commands.go
index 6d8149cb3..63707e368 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -304,7 +304,7 @@ func (cc *hugoBuilderCommon) handleFlags(cmd *cobra.Command) {
cmd.Flags().BoolP("forceSyncStatic", "", false, "copy all files when static is changed.")
cmd.Flags().BoolP("noTimes", "", false, "don't sync modification time of files")
cmd.Flags().BoolP("noChmod", "", false, "don't sync permission mode of files")
- cmd.Flags().BoolP("i18n-warnings", "", false, "print missing translations")
+ cmd.Flags().BoolP("printI18nWarnings", "", false, "print missing translations")
cmd.Flags().BoolP("printPathWarnings", "", false, "print warnings on duplicate target paths etc.")
cmd.Flags().StringVarP(&cc.cpuprofile, "profile-cpu", "", "", "write cpu profile to `file`")
cmd.Flags().StringVarP(&cc.memprofile, "profile-mem", "", "", "write memory profile to `file`")
diff --git a/commands/commands_test.go b/commands/commands_test.go
index 3bf2b2e96..9e623e9a2 100644
--- a/commands/commands_test.go
+++ b/commands/commands_test.go
@@ -190,7 +190,7 @@ func TestFlags(t *testing.T) {
"--navigateToChanged",
"--disableLiveReload",
"--noHTTPCache",
- "--i18n-warnings",
+ "--printI18nWarnings",
"--destination=/tmp/mydestination",
"-b=https://example.com/b/",
"--port=1366",
@@ -223,7 +223,7 @@ func TestFlags(t *testing.T) {
// The flag is named printPathWarnings
c.Assert(cfg.GetBool("logPathWarnings"), qt.Equals, true)
- // The flag is named i18n-warnings
+ // The flag is named printI18nWarnings
c.Assert(cfg.GetBool("logI18nWarnings"), qt.Equals, true)
},
},
diff --git a/commands/hugo.go b/commands/hugo.go
index 1eac05ea1..ce3c4ab7b 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -216,7 +216,7 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) {
"dryRun",
"force",
"gc",
- "i18n-warnings",
+ "printI18nWarnings",
"invalidateCDN",
"layoutDir",
"logFile",
@@ -243,7 +243,7 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) {
// Set some "config aliases"
setValueFromFlag(cmd.Flags(), "destination", cfg, "publishDir", false)
- setValueFromFlag(cmd.Flags(), "i18n-warnings", cfg, "logI18nWarnings", false)
+ setValueFromFlag(cmd.Flags(), "printI18nWarnings", cfg, "logI18nWarnings", false)
setValueFromFlag(cmd.Flags(), "printPathWarnings", cfg, "logPathWarnings", false)
}