feat: support alias translation
All checks were successful
continuous-integration/drone/push Build is passing

See #627
This commit is contained in:
2025-08-30 11:35:27 +02:00
parent 52f02ad9b9
commit 4bfbc53b94
47 changed files with 1915 additions and 1425 deletions

View File

@ -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,