WIP: feat: translation support
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
See #483
This commit is contained in:
@ -10,13 +10,14 @@ import (
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/docker/cli/cli/connhelper/ssh"
|
||||
"github.com/leonelquinteros/gotext"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var ServerListCommand = &cobra.Command{
|
||||
Use: "list [flags]",
|
||||
Use: gotext.Get("list [flags]"),
|
||||
Aliases: []string{"ls"},
|
||||
Short: "List managed servers",
|
||||
Short: gotext.Get("List managed servers"),
|
||||
Args: cobra.NoArgs,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
dockerContextStore := contextPkg.NewDefaultDockerContextStore()
|
||||
@ -78,7 +79,7 @@ var ServerListCommand = &cobra.Command{
|
||||
if internal.MachineReadable {
|
||||
out, err := formatter.ToJSON(headers, rows)
|
||||
if err != nil {
|
||||
log.Fatal("unable to render to JSON: %s", err)
|
||||
log.Fatal(gotext.Get("unable to render to JSON: %s", err))
|
||||
}
|
||||
|
||||
fmt.Println(out)
|
||||
@ -98,6 +99,6 @@ func init() {
|
||||
"machine",
|
||||
"m",
|
||||
false,
|
||||
"print machine-readable output",
|
||||
gotext.Get("print machine-readable output"),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user