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:
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
@ -30,13 +31,18 @@ type recipeMetadata struct {
|
||||
SSO string
|
||||
}
|
||||
|
||||
// translators: `abra recipe new` aliases. use a comma separated list of
|
||||
// aliases with no spaces in between
|
||||
var recipeNewAliases = i18n.G("n")
|
||||
|
||||
var RecipeNewCommand = &cobra.Command{
|
||||
// translators: `recipe new` command
|
||||
Use: i18n.G("new <recipe> [flags]"),
|
||||
Aliases: []string{i18n.G("n")},
|
||||
Short: i18n.G("Create a new recipe"),
|
||||
Long: i18n.G(`A community managed recipe template is used.`),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Aliases: strings.Split(recipeNewAliases, ","),
|
||||
// translators: Short description for `abra recipe new` command
|
||||
Short: i18n.G("Create a new recipe"),
|
||||
Long: i18n.G(`A community managed recipe template is used.`),
|
||||
Args: cobra.ExactArgs(1),
|
||||
ValidArgsFunction: func(
|
||||
cmd *cobra.Command,
|
||||
args []string,
|
||||
|
Reference in New Issue
Block a user