feat: support alias translation

See toolshed/abra#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

@ -1,6 +1,8 @@
package recipe
import (
"strings"
"coopcloud.tech/abra/cli/internal"
"coopcloud.tech/abra/pkg/autocomplete"
"coopcloud.tech/abra/pkg/i18n"
@ -9,10 +11,14 @@ import (
"github.com/spf13/cobra"
)
// translators: `abra recipe reset` aliases. use a comma separated list of
// aliases with no spaces in between
var recipeResetAliases = i18n.G("rs")
var RecipeResetCommand = &cobra.Command{
// translators: `recipe reset` command
Use: i18n.G("reset <recipe> [flags]"),
Aliases: []string{i18n.G("rs")},
Aliases: strings.Split(recipeResetAliases, ","),
// translators: Short description for `recipe reset` command
Short: i18n.G("Remove all unstaged changes from recipe config"),
Long: i18n.G("WARNING: this will delete your changes. Be Careful."),