diff options
| author | nytpu <alex@nytpu.com> | 2021-05-11 15:18:40 -0600 |
|---|---|---|
| committer | nytpu <alex@nytpu.com> | 2021-05-11 15:18:40 -0600 |
| commit | 655a1839997db204646c8ede0c2d1e833fd123c7 (patch) | |
| tree | 2ba49e88b7426b01d21a686a185393bfd82de937 | |
| parent | 4e286e1f10b60936495b1724c0d0e914a53150ad (diff) | |
translate fetch.go
| -rw-r--r-- | fetch/fetch.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fetch/fetch.go b/fetch/fetch.go index 8895fda..ed4a8d0 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -11,6 +11,8 @@ import ( "net/url" "sync" + "golang.nytpu.com/comitium/localizations" + "golang.nytpu.com/comitium/core" ) @@ -25,7 +27,7 @@ func Feed(data *core.FullData, remote *url.URL, title string) error { case "gopher", "gophers": return gopherFeed(data, remote.String(), title) default: - return fmt.Errorf("Unsupported protocol '%s'", remote.Scheme) + return fmt.Errorf(core.Localizer("errors.unsupported_protocol", &localizations.Replacements{"scheme": remote.Scheme}) } } @@ -40,7 +42,7 @@ func Page(data *core.FullData, remote *url.URL, title string) error { case "gopher", "gophers": return gopherPage(data, remote.String(), title) default: - return fmt.Errorf("Unsupported protocol '%s'", remote.Scheme) + return fmt.Errorf(core.Localizer("errors.unsupported_protocol", &localizations.Replacements{"scheme": remote.Scheme}) } } |
