feat: translation support
All checks were successful
continuous-integration/drone/push Build is passing

See #483
This commit is contained in:
2025-08-19 11:22:52 +02:00
parent 5cf6048ecb
commit ff32c06676
49 changed files with 466 additions and 405 deletions

View File

@ -3,11 +3,13 @@ package web
import (
"encoding/json"
"fmt"
"errors"
"io"
"net/http"
"os"
"time"
"github.com/leonelquinteros/gotext"
)
// 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(gotext.Get("bad status: %s", resp.Status))
}
_, err = io.Copy(out, resp.Body)