aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-02-27 21:19:59 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-02-27 21:19:59 -0800
commitf110384f113002ad022c677ea138a0f77fad4a62 (patch)
tree059d6a98b636715855aa13c7512c103c447c865c
parent953d0a2dc05714c22f7c9c389a860fd38c07b66e (diff)
Improve parser error messages
-rwxr-xr-xlocale/translations.go60
-rw-r--r--locale/translations/de_DE.json12
-rw-r--r--locale/translations/fr_FR.json12
-rwxr-xr-xlocale/translations/pl_PL.json14
-rw-r--r--locale/translations/zh_CN.json12
-rw-r--r--reader/atom/parser.go2
-rw-r--r--reader/feed/handler.go2
-rw-r--r--reader/json/parser.go2
-rw-r--r--reader/opml/parser.go2
-rw-r--r--reader/rdf/parser.go2
-rw-r--r--reader/rss/parser.go2
11 files changed, 61 insertions, 61 deletions
diff --git a/locale/translations.go b/locale/translations.go
index d15a71c..f58fbb9 100755
--- a/locale/translations.go
+++ b/locale/translations.go
@@ -1,5 +1,5 @@
// Code generated by go generate; DO NOT EDIT.
-// 2018-02-27 19:58:12.73440998 -0800 PST m=+0.036081356
+// 2018-02-27 21:15:00.586846241 -0800 PST m=+0.029084447
package locale
@@ -116,12 +116,12 @@ var translations = map[string]string{
"Unable to execute request: %v": "Diese Anfrage konnte nicht ausgeführt werden: %v",
"Last Parsing Error": "Letzter Analysefehler",
"There is a problem with this feed": "Es gibt ein Problem mit diesem Abonnement",
- "Unable to parse OPML file: %v.": "OPML Datei konnte nicht gelesen werden: %v.",
- "Unable to parse RSS feed: %v.": "RSS Feed konnte nicht gelesen werden: %v.",
- "Unable to parse Atom feed: %v.": "Atom Feed konnte nicht gelesen werden: %v.",
- "Unable to parse JSON feed: %v.": "JSON Feed konnte nicht gelesen werden: %v.",
- "Unable to parse RDF feed: %v.": "RDF Feed konnte nicht gelesen werden: %v.",
- "Unable to normalize encoding: %v": "Zeichenkodierung konnte nicht normalisiert werden: %v",
+ "Unable to parse OPML file: %q": "OPML Datei konnte nicht gelesen werden: %q",
+ "Unable to parse RSS feed: %q": "RSS Feed konnte nicht gelesen werden: %q",
+ "Unable to parse Atom feed: %q": "Atom Feed konnte nicht gelesen werden: %q",
+ "Unable to parse JSON feed: %q": "JSON Feed konnte nicht gelesen werden: %q",
+ "Unable to parse RDF feed: %q": "RDF Feed konnte nicht gelesen werden: %q",
+ "Unable to normalize encoding: %q": "Zeichenkodierung konnte nicht normalisiert werden: %q",
"Unable to create this category.": "Diese Kategorie konnte nicht angelegt werden.",
"yes": "ja",
"no": "nein",
@@ -348,12 +348,12 @@ var translations = map[string]string{
"Unable to execute request: %v": "Impossible d'exécuter cette requête: %v",
"Last Parsing Error": "Dernière erreur d'analyse",
"There is a problem with this feed": "Il y a un problème avec cet abonnement",
- "Unable to parse OPML file: %v.": "Impossible de lire ce fichier OPML : %v.",
- "Unable to parse RSS feed: %v.": "Impossible de lire ce flux RSS: %v.",
- "Unable to parse Atom feed: %v.": "Impossible de lire ce flux Atom: %v.",
- "Unable to parse JSON feed: %v.": "Impossible de lire ce flux JSON: %v.",
- "Unable to parse RDF feed: %v.": "Impossible de lire ce flux RDF: %v.",
- "Unable to normalize encoding: %v": "Impossible de normaliser l'encodage : %v",
+ "Unable to parse OPML file: %q": "Impossible de lire ce fichier OPML : %q",
+ "Unable to parse RSS feed: %q": "Impossible de lire ce flux RSS : %q",
+ "Unable to parse Atom feed: %q": "Impossible de lire ce flux Atom : %q",
+ "Unable to parse JSON feed: %q": "Impossible de lire ce flux JSON : %q",
+ "Unable to parse RDF feed: %q": "Impossible de lire ce flux RDF : %q",
+ "Unable to normalize encoding: %q": "Impossible de normaliser l'encodage : %q",
"Unable to create this category.": "Impossible de créer cette catégorie.",
"yes": "oui",
"no": "non",
@@ -466,7 +466,7 @@ var translations = map[string]string{
],
"plural.categories.feed_count": [
"Jest %d kanał.",
- "Są %d kanały.",
+ "Są %d kanały.",
"Jest %d kanałów."
],
"Username": "Nazwa użytkownika",
@@ -572,12 +572,12 @@ var translations = map[string]string{
"Unable to execute request: %v": "To polecenie nie mogło zostać wykonane: %v",
"Last Parsing Error": "Ostatni błąd analizy",
"There is a problem with this feed": "Z tym kanałem jest problem",
- "Unable to parse OPML file: %v.": "Plik OPML nie mógł zostać odczytany: %v.",
- "Unable to parse RSS feed: %v.": "Nie można było odczytać kanału RSS: %v.",
- "Unable to parse Atom feed: %v.": "Nie można było odczytać kanału Atom: %v.",
- "Unable to parse JSON feed: %v.": "Nie można było odczytać kanału JSON: %v.",
- "Unable to parse RDF feed: %v.": "Nie można było odczytać kanału RDF: %v.",
- "Unable to normalize encoding: %v": "Kodowanie znaków nie mogło zostać znormalizowane: %v",
+ "Unable to parse OPML file: %q": "Plik OPML nie mógł zostać odczytany: %q",
+ "Unable to parse RSS feed: %q": "Nie można było odczytać kanału RSS: %q",
+ "Unable to parse Atom feed: %q": "Nie można było odczytać kanału Atom: %q",
+ "Unable to parse JSON feed: %q": "Nie można było odczytać kanału JSON: %q",
+ "Unable to parse RDF feed: %q": "Nie można było odczytać kanału RDF: %q",
+ "Unable to normalize encoding: %q": "Kodowanie znaków nie mogło zostać znormalizowane: %q",
"Unable to create this category.": "Ta kategoria nie mogła zostać utworzona.",
"yes": "tak",
"no": "nie",
@@ -794,12 +794,12 @@ var translations = map[string]string{
"Unable to execute request: %v": "无法执行这一请求: %v",
"Last Parsing Error": "最后一次解析错误",
"There is a problem with this feed": "这一源存在问题",
- "Unable to parse OPML file: %v.": "无法解析OPML文件: %v.",
- "Unable to parse RSS feed: %v.": "无法解析RSS源: %v.",
- "Unable to parse Atom feed: %v.": "无法解析Atom源: %v.",
- "Unable to parse JSON feed: %v.": "无法解析JSON源: %v.",
- "Unable to parse RDF feed: %v.": "无法解析RDF源: %v.",
- "Unable to normalize encoding: %v": "无法正则化编码: %v",
+ "Unable to parse OPML file: %q": "无法解析OPML文件: %q",
+ "Unable to parse RSS feed: %q": "无法解析RSS源: %q",
+ "Unable to parse Atom feed: %q": "无法解析Atom源: %q",
+ "Unable to parse JSON feed: %q": "无法解析JSON源: %q",
+ "Unable to parse RDF feed: %q": "无法解析RDF源: %q",
+ "Unable to normalize encoding: %q": "无法正则化编码: %q",
"Unable to create this category.": "无法建立这个分类.",
"yes": "是",
"no": "否",
@@ -907,9 +907,9 @@ var translations = map[string]string{
}
var translationsChecksums = map[string]string{
- "de_DE": "713e2d53a38253b3a4c541988aa1a917c1290ca208c7a68a131cf09eedb56319",
+ "de_DE": "da3e70c096b35c205d89dddd400bbf34927bb495d4ee0f4eb3c3dc04e02b99c1",
"en_US": "6fe95384260941e8a5a3c695a655a932e0a8a6a572c1e45cb2b1ae8baa01b897",
- "fr_FR": "d5ff2467a4a6d0bfffd7824eaaf00318d08d6ad69972497750e57617e327aa84",
- "pl_PL": "79d0d3a162c81dbb924ebdd794a52e417ce37617ea6b686a7cec1251a18581e9",
- "zh_CN": "9d6149e7bf7d6ec797c77cb7dda9f907f4c2428c354960414fcfb23bb885d831",
+ "fr_FR": "e842d6503b4d50ba5e3cd862b3d92c64f031356cf87f9989d2ac9a1ba0246ac8",
+ "pl_PL": "0d8a76425cf634b96cfc425127d8e83db7662e2d4dbc30674098e3fb6cea7c8d",
+ "zh_CN": "c19cb45a49af7957748fa006b51421edaa9774ef1ab0e91eb2c0552635016b62",
}
diff --git a/locale/translations/de_DE.json b/locale/translations/de_DE.json
index c66f8da..22f7859 100644
--- a/locale/translations/de_DE.json
+++ b/locale/translations/de_DE.json
@@ -110,12 +110,12 @@
"Unable to execute request: %v": "Diese Anfrage konnte nicht ausgeführt werden: %v",
"Last Parsing Error": "Letzter Analysefehler",
"There is a problem with this feed": "Es gibt ein Problem mit diesem Abonnement",
- "Unable to parse OPML file: %v.": "OPML Datei konnte nicht gelesen werden: %v.",
- "Unable to parse RSS feed: %v.": "RSS Feed konnte nicht gelesen werden: %v.",
- "Unable to parse Atom feed: %v.": "Atom Feed konnte nicht gelesen werden: %v.",
- "Unable to parse JSON feed: %v.": "JSON Feed konnte nicht gelesen werden: %v.",
- "Unable to parse RDF feed: %v.": "RDF Feed konnte nicht gelesen werden: %v.",
- "Unable to normalize encoding: %v": "Zeichenkodierung konnte nicht normalisiert werden: %v",
+ "Unable to parse OPML file: %q": "OPML Datei konnte nicht gelesen werden: %q",
+ "Unable to parse RSS feed: %q": "RSS Feed konnte nicht gelesen werden: %q",
+ "Unable to parse Atom feed: %q": "Atom Feed konnte nicht gelesen werden: %q",
+ "Unable to parse JSON feed: %q": "JSON Feed konnte nicht gelesen werden: %q",
+ "Unable to parse RDF feed: %q": "RDF Feed konnte nicht gelesen werden: %q",
+ "Unable to normalize encoding: %q": "Zeichenkodierung konnte nicht normalisiert werden: %q",
"Unable to create this category.": "Diese Kategorie konnte nicht angelegt werden.",
"yes": "ja",
"no": "nein",
diff --git a/locale/translations/fr_FR.json b/locale/translations/fr_FR.json
index 42cdb13..fb3e16e 100644
--- a/locale/translations/fr_FR.json
+++ b/locale/translations/fr_FR.json
@@ -110,12 +110,12 @@
"Unable to execute request: %v": "Impossible d'exécuter cette requête: %v",
"Last Parsing Error": "Dernière erreur d'analyse",
"There is a problem with this feed": "Il y a un problème avec cet abonnement",
- "Unable to parse OPML file: %v.": "Impossible de lire ce fichier OPML : %v.",
- "Unable to parse RSS feed: %v.": "Impossible de lire ce flux RSS: %v.",
- "Unable to parse Atom feed: %v.": "Impossible de lire ce flux Atom: %v.",
- "Unable to parse JSON feed: %v.": "Impossible de lire ce flux JSON: %v.",
- "Unable to parse RDF feed: %v.": "Impossible de lire ce flux RDF: %v.",
- "Unable to normalize encoding: %v": "Impossible de normaliser l'encodage : %v",
+ "Unable to parse OPML file: %q": "Impossible de lire ce fichier OPML : %q",
+ "Unable to parse RSS feed: %q": "Impossible de lire ce flux RSS : %q",
+ "Unable to parse Atom feed: %q": "Impossible de lire ce flux Atom : %q",
+ "Unable to parse JSON feed: %q": "Impossible de lire ce flux JSON : %q",
+ "Unable to parse RDF feed: %q": "Impossible de lire ce flux RDF : %q",
+ "Unable to normalize encoding: %q": "Impossible de normaliser l'encodage : %q",
"Unable to create this category.": "Impossible de créer cette catégorie.",
"yes": "oui",
"no": "non",
diff --git a/locale/translations/pl_PL.json b/locale/translations/pl_PL.json
index 946005e..19f6d3f 100755
--- a/locale/translations/pl_PL.json
+++ b/locale/translations/pl_PL.json
@@ -6,7 +6,7 @@
],
"plural.categories.feed_count": [
"Jest %d kanał.",
- "Są %d kanały.",
+ "Są %d kanały.",
"Jest %d kanałów."
],
"Username": "Nazwa użytkownika",
@@ -112,12 +112,12 @@
"Unable to execute request: %v": "To polecenie nie mogło zostać wykonane: %v",
"Last Parsing Error": "Ostatni błąd analizy",
"There is a problem with this feed": "Z tym kanałem jest problem",
- "Unable to parse OPML file: %v.": "Plik OPML nie mógł zostać odczytany: %v.",
- "Unable to parse RSS feed: %v.": "Nie można było odczytać kanału RSS: %v.",
- "Unable to parse Atom feed: %v.": "Nie można było odczytać kanału Atom: %v.",
- "Unable to parse JSON feed: %v.": "Nie można było odczytać kanału JSON: %v.",
- "Unable to parse RDF feed: %v.": "Nie można było odczytać kanału RDF: %v.",
- "Unable to normalize encoding: %v": "Kodowanie znaków nie mogło zostać znormalizowane: %v",
+ "Unable to parse OPML file: %q": "Plik OPML nie mógł zostać odczytany: %q",
+ "Unable to parse RSS feed: %q": "Nie można było odczytać kanału RSS: %q",
+ "Unable to parse Atom feed: %q": "Nie można było odczytać kanału Atom: %q",
+ "Unable to parse JSON feed: %q": "Nie można było odczytać kanału JSON: %q",
+ "Unable to parse RDF feed: %q": "Nie można było odczytać kanału RDF: %q",
+ "Unable to normalize encoding: %q": "Kodowanie znaków nie mogło zostać znormalizowane: %q",
"Unable to create this category.": "Ta kategoria nie mogła zostać utworzona.",
"yes": "tak",
"no": "nie",
diff --git a/locale/translations/zh_CN.json b/locale/translations/zh_CN.json
index f8107bb..793ed34 100644
--- a/locale/translations/zh_CN.json
+++ b/locale/translations/zh_CN.json
@@ -110,12 +110,12 @@
"Unable to execute request: %v": "无法执行这一请求: %v",
"Last Parsing Error": "最后一次解析错误",
"There is a problem with this feed": "这一源存在问题",
- "Unable to parse OPML file: %v.": "无法解析OPML文件: %v.",
- "Unable to parse RSS feed: %v.": "无法解析RSS源: %v.",
- "Unable to parse Atom feed: %v.": "无法解析Atom源: %v.",
- "Unable to parse JSON feed: %v.": "无法解析JSON源: %v.",
- "Unable to parse RDF feed: %v.": "无法解析RDF源: %v.",
- "Unable to normalize encoding: %v": "无法正则化编码: %v",
+ "Unable to parse OPML file: %q": "无法解析OPML文件: %q",
+ "Unable to parse RSS feed: %q": "无法解析RSS源: %q",
+ "Unable to parse Atom feed: %q": "无法解析Atom源: %q",
+ "Unable to parse JSON feed: %q": "无法解析JSON源: %q",
+ "Unable to parse RDF feed: %q": "无法解析RDF源: %q",
+ "Unable to normalize encoding: %q": "无法正则化编码: %q",
"Unable to create this category.": "无法建立这个分类.",
"yes": "是",
"no": "否",
diff --git a/reader/atom/parser.go b/reader/atom/parser.go
index 9a41dac..d560c27 100644
--- a/reader/atom/parser.go
+++ b/reader/atom/parser.go
@@ -21,7 +21,7 @@ func Parse(data io.Reader) (*model.Feed, *errors.LocalizedError) {
err := decoder.Decode(atomFeed)
if err != nil {
- return nil, errors.NewLocalizedError("Unable to parse Atom feed: %v.", err)
+ return nil, errors.NewLocalizedError("Unable to parse Atom feed: %q", err)
}
return atomFeed.Transform(), nil
diff --git a/reader/feed/handler.go b/reader/feed/handler.go
index 516593c..da02e99 100644
--- a/reader/feed/handler.go
+++ b/reader/feed/handler.go
@@ -24,7 +24,7 @@ var (
errServerFailure = "Unable to fetch feed (statusCode=%d)"
errDuplicate = "This feed already exists (%s)"
errNotFound = "Feed %d not found"
- errEncoding = "Unable to normalize encoding: %v"
+ errEncoding = "Unable to normalize encoding: %q"
errCategoryNotFound = "Category not found for this user"
errEmptyFeed = "This feed is empty"
)
diff --git a/reader/json/parser.go b/reader/json/parser.go
index ddd3e4f..55c9372 100644
--- a/reader/json/parser.go
+++ b/reader/json/parser.go
@@ -17,7 +17,7 @@ func Parse(data io.Reader) (*model.Feed, *errors.LocalizedError) {
feed := new(jsonFeed)
decoder := json.NewDecoder(data)
if err := decoder.Decode(&feed); err != nil {
- return nil, errors.NewLocalizedError("Unable to parse JSON Feed: %v", err)
+ return nil, errors.NewLocalizedError("Unable to parse JSON Feed: %q", err)
}
return feed.Transform(), nil
diff --git a/reader/opml/parser.go b/reader/opml/parser.go
index b167d47..93f2f25 100644
--- a/reader/opml/parser.go
+++ b/reader/opml/parser.go
@@ -20,7 +20,7 @@ func Parse(data io.Reader) (SubcriptionList, *errors.LocalizedError) {
err := decoder.Decode(feeds)
if err != nil {
- return nil, errors.NewLocalizedError("Unable to parse OPML file: %v.", err)
+ return nil, errors.NewLocalizedError("Unable to parse OPML file: %q", err)
}
return feeds.Transform(), nil
diff --git a/reader/rdf/parser.go b/reader/rdf/parser.go
index 06cacec..76b731c 100644
--- a/reader/rdf/parser.go
+++ b/reader/rdf/parser.go
@@ -21,7 +21,7 @@ func Parse(data io.Reader) (*model.Feed, *errors.LocalizedError) {
err := decoder.Decode(feed)
if err != nil {
- return nil, errors.NewLocalizedError("Unable to parse RDF feed: %v.", err)
+ return nil, errors.NewLocalizedError("Unable to parse RDF feed: %q", err)
}
return feed.Transform(), nil
diff --git a/reader/rss/parser.go b/reader/rss/parser.go
index 328cde2..709f8ff 100644
--- a/reader/rss/parser.go
+++ b/reader/rss/parser.go
@@ -21,7 +21,7 @@ func Parse(data io.Reader) (*model.Feed, *errors.LocalizedError) {
err := decoder.Decode(feed)
if err != nil {
- return nil, errors.NewLocalizedError("Unable to parse RSS feed: %v.", err)
+ return nil, errors.NewLocalizedError("Unable to parse RSS feed: %q", err)
}
return feed.Transform(), nil