From 60da14d1d3c61e715abed710d66e13b32f261382 Mon Sep 17 00:00:00 2001 From: nytpu Date: Tue, 11 May 2021 18:35:33 -0600 Subject: add translation for writing files in comitium.json (I didn't notice them before) --- comitium.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'comitium.go') diff --git a/comitium.go b/comitium.go index 0d3af19..ce5bc5e 100644 --- a/comitium.go +++ b/comitium.go @@ -118,17 +118,26 @@ func main() { } err = core.Data.WriteSubs(dataPath) if err != nil { - fmt.Fprintf(os.Stderr, "Error saving subscriptions: %v\n", err) + fmt.Fprintf(os.Stderr, core.TranslateString( + "%s\n", "errors.saving", + &localizations.Replacements{"file": "subscriptions.gmi", "error": err}, + )) os.Exit(1) } err = core.Data.WriteFeed(dataPath) if err != nil { - fmt.Fprintf(os.Stderr, "Error writing feed: %v\n", err) + fmt.Fprintf(os.Stderr, core.TranslateString( + "%s\n", "errors.saving", + &localizations.Replacements{"file": "feed.gmi", "error": err}, + )) os.Exit(1) } err = core.Data.WriteJSON(dataPath) if err != nil { - fmt.Fprintf(os.Stderr, "Error saving subscriptions json: %v\n", err) + fmt.Fprintf(os.Stderr, core.TranslateString( + "%s\n", "errors.saving", + &localizations.Replacements{"file": "comtitium.json", "error": err}, + )) os.Exit(1) } } -- cgit v1.2.3