WIP: feat: translation support
Some checks failed
continuous-integration/drone/push Build is failing

See #483
This commit is contained in:
2025-08-19 11:22:52 +02:00
parent 5cf6048ecb
commit a31ec51c24
71 changed files with 804 additions and 796 deletions

View File

@ -11,6 +11,7 @@ import (
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types/container"
apiclient "github.com/docker/docker/client"
"github.com/leonelquinteros/gotext"
)
// RunExec runs a command on a remote container. io.Writer corresponds to the
@ -39,7 +40,7 @@ func RunExec(dockerCli command.Cli, client *apiclient.Client, containerID string
execID := response.ID
if execID == "" {
return nil, errors.New("exec ID empty")
return nil, errors.New(gotext.Get("exec ID empty"))
}
if execOptions.Detach {
@ -104,12 +105,12 @@ func interactiveExec(ctx context.Context, dockerCli command.Cli, client *apiclie
if execOpts.Tty && dockerCli.In().IsTerminal() {
if err := MonitorTtySize(ctx, client, dockerCli, execID, true); err != nil {
fmt.Fprintln(dockerCli.Err(), "Error monitoring TTY size:", err)
fmt.Fprintln(dockerCli.Err(), gotext.Get("Error monitoring TTY size:"), err)
}
}
if err := <-errCh; err != nil {
log.Debugf("Error hijack: %s", err)
log.Debug(gotext.Get("Error hijack: %s", err))
return out, err
}