feat: translation support
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See #483
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
containerPkg "coopcloud.tech/abra/pkg/container"
|
||||
"coopcloud.tech/abra/pkg/i18n"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"coopcloud.tech/abra/pkg/upstream/container"
|
||||
"github.com/docker/cli/cli/command"
|
||||
@ -17,17 +18,17 @@ import (
|
||||
)
|
||||
|
||||
var AppRunCommand = &cobra.Command{
|
||||
Use: "run <domain> <service> <cmd> [[args] [flags] | [flags] -- [args]]",
|
||||
Aliases: []string{"r"},
|
||||
Short: "Run a command inside a service container",
|
||||
Example: ` # run <cmd> with args/flags
|
||||
Use: i18n.G("run <domain> <service> <cmd> [[args] [flags] | [flags] -- [args]]"),
|
||||
Aliases: []string{i18n.G("r")},
|
||||
Short: i18n.G("Run a command inside a service container"),
|
||||
Example: i18n.G(` # run <cmd> with args/flags
|
||||
abra app run 1312.net app -- ls -lha
|
||||
|
||||
# run <cmd> without args/flags
|
||||
abra app run 1312.net app bash --user nobody
|
||||
|
||||
# run <cmd> with both kinds of args/flags
|
||||
abra app run 1312.net app --user nobody -- ls -lha`,
|
||||
abra app run 1312.net app --user nobody -- ls -lha`),
|
||||
Args: cobra.MinimumNArgs(3),
|
||||
ValidArgsFunction: func(
|
||||
cmd *cobra.Command,
|
||||
@ -98,17 +99,17 @@ var (
|
||||
|
||||
func init() {
|
||||
AppRunCommand.Flags().BoolVarP(&noTTY,
|
||||
"no-tty",
|
||||
"t",
|
||||
i18n.G("no-tty"),
|
||||
i18n.G("t"),
|
||||
false,
|
||||
"do not request a TTY",
|
||||
i18n.G("do not request a TTY"),
|
||||
)
|
||||
|
||||
AppRunCommand.Flags().StringVarP(
|
||||
&runAsUser,
|
||||
"user",
|
||||
"u",
|
||||
i18n.G("user"),
|
||||
i18n.G("u"),
|
||||
"",
|
||||
"run command as user",
|
||||
i18n.G("run command as user"),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user