feat: support alias translation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See #627
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/cli/app"
|
||||
"coopcloud.tech/abra/cli/catalogue"
|
||||
@ -108,10 +109,14 @@ func Run(version, commit string) {
|
||||
rootCmd.CompletionOptions.DisableDefaultCmd = true
|
||||
rootCmd.SetUsageTemplate(usageTemplate)
|
||||
|
||||
// translators: `abra man` aliases. use a comma separated list of aliases
|
||||
// with no spaces in between
|
||||
manAliases := i18n.G("m")
|
||||
|
||||
manCommand := &cobra.Command{
|
||||
// translators: `man` command
|
||||
Use: i18n.G("man [flags]"),
|
||||
Aliases: []string{"m"},
|
||||
Aliases: strings.Split(manAliases, ","),
|
||||
// translators: Short description for `man` command
|
||||
Short: i18n.G("Generate manpage"),
|
||||
Example: i18n.G(` # generate the man pages into /usr/local/share/man/man1
|
||||
|
Reference in New Issue
Block a user