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 57e09b6917
108 changed files with 11210 additions and 1645 deletions

View File

@ -3,11 +3,13 @@ package web
import (
"encoding/json"
"fmt"
"errors"
"io"
"net/http"
"os"
"time"
"coopcloud.tech/abra/pkg/i18n"
)
// Timeout is the time it takes before a web request bails out waiting for a
@ -40,7 +42,7 @@ func GetFile(filepath string, url string) (err error) {
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("bad status: %s", resp.Status)
return errors.New(i18n.G("bad status: %s", resp.Status))
}
_, err = io.Copy(out, resp.Body)