cmd/gotext: fix help text
Add documentation for the "update" command and fix the documentation
to consistently reference the "gotext" binary, not the "go" binary.
This means "go generate ./..." no longer generates a Git diff.
Change-Id: Ic7eb8c5cb3578efbf1f4ebc03ace8155c70cba8c
Reviewed-on: https://go-review.googlesource.com/127922
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/gotext/doc.go b/cmd/gotext/doc.go
index 0e19297..fa247c6 100644
--- a/cmd/gotext/doc.go
+++ b/cmd/gotext/doc.go
@@ -8,11 +8,12 @@
//
// The commands are:
//
+// update merge translations and generate catalog
// extract extracts strings to be translated from code
// rewrite rewrites fmt functions to use a message Printer
// generate generates code to insert translated messages
//
-// Use "go help [command]" for more information about a command.
+// Use "gotext help [command]" for more information about a command.
//
// Additional help topics:
//
@@ -20,6 +21,15 @@
// Use "gotext help [topic]" for more information about that topic.
//
//
+// Merge translations and generate catalog
+//
+// Usage:
+//
+// gotext update <package>* [-out <gofile>]
+//
+//
+//
+//
// Extracts strings to be translated from code
//
// Usage:
diff --git a/cmd/gotext/main.go b/cmd/gotext/main.go
index 73f6d91..f31dd4f 100644
--- a/cmd/gotext/main.go
+++ b/cmd/gotext/main.go
@@ -170,7 +170,7 @@
{{range .}}{{if .Runnable}}
{{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
-Use "go help [command]" for more information about a command.
+Use "gotext help [command]" for more information about a command.
Additional help topics:
{{range .}}{{if not .Runnable}}
@@ -180,7 +180,7 @@
`
-var helpTemplate = `{{if .Runnable}}usage: go {{.UsageLine}}
+var helpTemplate = `{{if .Runnable}}usage: gotext {{.UsageLine}}
{{end}}{{.Long | trim}}
`
@@ -189,7 +189,7 @@
{{end}}{{if .Runnable}}Usage:
- go {{.UsageLine}}
+ gotext {{.UsageLine}}
{{end}}{{.Long | trim}}
@@ -327,7 +327,7 @@
}
}
- fmt.Fprintf(os.Stderr, "Unknown help topic %#q. Run 'go help'.\n", arg)
+ fmt.Fprintf(os.Stderr, "Unknown help topic %#q. Run 'gotext help'.\n", arg)
os.Exit(2) // failed at 'go help cmd'
}