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 37c0257851
108 changed files with 11208 additions and 1645 deletions

View File

@ -2,9 +2,10 @@ package client
import (
"context"
"fmt"
"errors"
"time"
"coopcloud.tech/abra/pkg/i18n"
"coopcloud.tech/abra/pkg/log"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/volume"
@ -37,7 +38,7 @@ func RemoveVolumes(cl *client.Client, ctx context.Context, volumeNames []string,
return cl.VolumeRemove(context.Background(), volName, force)
})
if err != nil {
return fmt.Errorf("volume %s: %s", volName, err)
return errors.New(i18n.G("volume %s: %s", volName, err))
}
}
return nil
@ -54,9 +55,9 @@ func retryFunc(retries int, fn func() error) error {
}
if i+1 < retries {
sleep := time.Duration(i+1) * time.Duration(i+1)
log.Infof("%s: waiting %d seconds before next retry", err, sleep)
log.Info(i18n.G("%s: waiting %d seconds before next retry", err, sleep))
time.Sleep(sleep * time.Second)
}
}
return fmt.Errorf("%d retries failed", retries)
return errors.New(i18n.G("%d retries failed", retries))
}