Explorar el Código

fix(locale): add or reuse translation keys missing from all locales

Three translation keys used in the code did not exist in any locale,
so the raw key was displayed instead of a message:

- error.invalid_proxy_url, used when subscription discovery receives
  an invalid proxy URL. It now uses error.invalid_feed_proxy_url,
  which has the same text.
- page.tag_entry_count, used for the screen reader entry count on the
  tag entries page. It now uses page.total_entry_count, like the feed
  and category entries pages.
- error.unable_to_parse_html_document, used when feed discovery
  cannot parse the HTML page. This key is added to all locales.
Frédéric Guillot hace 1 día
padre
commit
707d3c3956

+ 1 - 0
internal/locale/translations/ar_SA.json

@@ -181,6 +181,7 @@
     "error.unable_to_create_user": "تعذر إنشاء هذا المستخدم.",
     "error.unable_to_detect_rssbridge": "تعذر اكتشاف المصدر باستخدام RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "تعذر تحليل هذا المصدر: %v.",
+    "error.unable_to_parse_html_document": "تعذر تحليل مستند HTML: %v.",
     "error.unable_to_update_category": "تعذر تحديث هذه الفئة.",
     "error.unable_to_update_feed": "تعذر تحديث هذا المصدر.",
     "error.unable_to_update_user": "تعذر تحديث هذا المستخدم.",

+ 1 - 0
internal/locale/translations/de_DE.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Dieser Benutzer kann nicht erstellt werden.",
     "error.unable_to_detect_rssbridge": "Abonnement kann nicht durch RSS-Bridge erkannt werden: %v.",
     "error.unable_to_parse_feed": "Dieses Abonnement kann nicht gelesen werden: %v.",
+    "error.unable_to_parse_html_document": "Das HTML-Dokument kann nicht gelesen werden: %v.",
     "error.unable_to_update_category": "Diese Kategorie konnte nicht aktualisiert werden.",
     "error.unable_to_update_feed": "Dieses Abonnement konnte nicht aktualisiert werden.",
     "error.unable_to_update_user": "Dieser Benutzer konnte nicht aktualisiert werden.",

+ 1 - 0
internal/locale/translations/el_EL.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Δεν είναι δυνατή η δημιουργία αυτού του χρήστη.",
     "error.unable_to_detect_rssbridge": "Δεν είναι δυνατή η ανίχνευση ροής με χρήση RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Δεν είναι δυνατή η ανάλυση αυτής της ροής: %v.",
+    "error.unable_to_parse_html_document": "Δεν είναι δυνατή η ανάλυση του εγγράφου HTML: %v.",
     "error.unable_to_update_category": "Δεν είναι δυνατή η ενημέρωση αυτής της κατηγορίας.",
     "error.unable_to_update_feed": "Δεν είναι δυνατή η ενημέρωση αυτής της ροής.",
     "error.unable_to_update_user": "Δεν είναι δυνατή η ενημέρωση αυτού του χρήστη.",

+ 1 - 0
internal/locale/translations/en_US.json

@@ -169,6 +169,7 @@
     "error.unable_to_create_user": "Unable to create this user.",
     "error.unable_to_detect_rssbridge": "Unable to detect feed using RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Unable to parse this feed: %v.",
+    "error.unable_to_parse_html_document": "Unable to parse the HTML document: %v.",
     "error.unable_to_update_category": "Unable to update this category.",
     "error.unable_to_update_feed": "Unable to update this feed.",
     "error.unable_to_update_user": "Unable to update this user.",

+ 1 - 0
internal/locale/translations/es_ES.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Incapaz de crear este usuario.",
     "error.unable_to_detect_rssbridge": "No se puede detectar la fuente usando RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "No se puede analizar este feed: %v.",
+    "error.unable_to_parse_html_document": "No se puede analizar el documento HTML: %v.",
     "error.unable_to_update_category": "Incapaz de actualizar esta categoría.",
     "error.unable_to_update_feed": "Incapaz de actualizar esta fuente.",
     "error.unable_to_update_user": "Incapaz de actualizar este usuario.",

+ 1 - 0
internal/locale/translations/fi_FI.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Käyttäjää ei voi luoda.",
     "error.unable_to_detect_rssbridge": "Syötettä ei voitu havaita RSS-Bridgea käyttäen: %v.",
     "error.unable_to_parse_feed": "Tätä syötettä ei voitu jäsentää: %v.",
+    "error.unable_to_parse_html_document": "HTML-dokumenttia ei voitu jäsentää: %v.",
     "error.unable_to_update_category": "Kategoriaa  ei voi päivittää.",
     "error.unable_to_update_feed": "Syötettä ei voi päivittää.",
     "error.unable_to_update_user": "Käyttäjää ei voi päivittää.",

+ 1 - 0
internal/locale/translations/fr_FR.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Impossible de créer cet utilisateur.",
     "error.unable_to_detect_rssbridge": "Impossible de détecter un flux RSS en utilisant RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Impossible d'analyser ce flux : %v.",
+    "error.unable_to_parse_html_document": "Impossible d'analyser le document HTML : %v.",
     "error.unable_to_update_category": "Impossible de mettre à jour cette catégorie.",
     "error.unable_to_update_feed": "Impossible de mettre à jour cet abonnement.",
     "error.unable_to_update_user": "Impossible de mettre à jour cet utilisateur.",

+ 1 - 0
internal/locale/translations/gl_ES.json

@@ -169,6 +169,7 @@
     "error.unable_to_create_user": "Non se puido crear a conta.",
     "error.unable_to_detect_rssbridge": "Non se detectou a canle a usar RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Non se puido procesar a canle: %v.",
+    "error.unable_to_parse_html_document": "Non se puido procesar o documento HTML: %v.",
     "error.unable_to_update_category": "Non se puido actualizar a categoría.",
     "error.unable_to_update_feed": "Non se puido actualizar a canle.",
     "error.unable_to_update_user": "Non se puido actualizar a usuaria.",

+ 1 - 0
internal/locale/translations/hi_IN.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "इस उपयोगकर्ता को बनाने में असमर्थ।",
     "error.unable_to_detect_rssbridge": "RSS-Bridge का उपयोग करके फ़ीड का पता लगाने में असमर्थ: %v.",
     "error.unable_to_parse_feed": "इस फ़ीड को पार्स करने में असमर्थ: %v.",
+    "error.unable_to_parse_html_document": "HTML दस्तावेज़ को पार्स करने में असमर्थ: %v.",
     "error.unable_to_update_category": "इस श्रेणी को अपडेट करने में असमर्थ।",
     "error.unable_to_update_feed": "इस फ़ीड को अपडेट करने में असमर्थ.",
     "error.unable_to_update_user": "इस उपयोगकर्ता को अपडेट करने में असमर्थ.",

+ 1 - 0
internal/locale/translations/id_ID.json

@@ -164,6 +164,7 @@
     "error.unable_to_create_user": "Tidak bisa membuat pengguna tersebut.",
     "error.unable_to_detect_rssbridge": "Tidak dapat mendeteksi umpan menggunakan RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Tidak dapat membaca umpan: %v.",
+    "error.unable_to_parse_html_document": "Tidak dapat membaca dokumen HTML: %v.",
     "error.unable_to_update_category": "Tidak bisa memperbarui kategori ini.",
     "error.unable_to_update_feed": "Tidak bisa memperbarui umpan ini.",
     "error.unable_to_update_user": "Tidak bisa memperbarui pengguna tersebut.",

+ 1 - 0
internal/locale/translations/it_IT.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Non sono riuscito ad aggiungere questo user.",
     "error.unable_to_detect_rssbridge": "Impossibile rilevare il feed usando RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Impossibile analizzare questo feed: %v.",
+    "error.unable_to_parse_html_document": "Impossibile analizzare il documento HTML: %v.",
     "error.unable_to_update_category": "Non sono riuscito ad aggiornare questa categoria.",
     "error.unable_to_update_feed": "Non sono riuscito ad aggiornare questo feed.",
     "error.unable_to_update_user": "Non sono riuscito ad aggiornare questo utente.",

+ 1 - 0
internal/locale/translations/ja_JP.json

@@ -164,6 +164,7 @@
     "error.unable_to_create_user": "このユーザーは作成できません。",
     "error.unable_to_detect_rssbridge": "RSS-Bridge を使ってフィードを検出できません: %v.",
     "error.unable_to_parse_feed": "このフィードを解析できません: %v.",
+    "error.unable_to_parse_html_document": "HTML ドキュメントを解析できません: %v.",
     "error.unable_to_update_category": "このカテゴリは更新できません。",
     "error.unable_to_update_feed": "このフィードは更新できません。",
     "error.unable_to_update_user": "このユーザーは更新できません。",

+ 1 - 0
internal/locale/translations/ko_KR.json

@@ -164,6 +164,7 @@
     "error.unable_to_create_user": "이 사용자를 만들 수 없습니다.",
     "error.unable_to_detect_rssbridge": "RSS-Bridge를 사용해 피드를 감지할 수 없습니다: %v.",
     "error.unable_to_parse_feed": "이 피드를 파싱할 수 없습니다: %v.",
+    "error.unable_to_parse_html_document": "HTML 문서를 파싱할 수 없습니다: %v.",
     "error.unable_to_update_category": "이 카테고리를 업데이트할 수 없습니다.",
     "error.unable_to_update_feed": "이 피드를 업데이트할 수 없습니다.",
     "error.unable_to_update_user": "이 사용자를 업데이트할 수 없습니다.",

+ 1 - 0
internal/locale/translations/nan_Latn_pehoeji.json

@@ -164,6 +164,7 @@
     "error.unable_to_create_user": "Bô-hoat-tō͘ sin cheng-ka chit ê sú-iōng-lâng",
     "error.unable_to_detect_rssbridge": "Sú-iōng RSS-Bridge sî chhē bô līm-hô siau-sit lâi-goân: %v.",
     "error.unable_to_parse_feed": "Bô-hoat-tō͘ kái-sek chit ê siau-sit lâi-goân: %v.",
+    "error.unable_to_parse_html_document": "Bô-hoat-tō͘ kái-sek HTML bûn-kiāⁿ: %v.",
     "error.unable_to_update_category": "Bô-hoat-tō͘ ōaⁿ-sin chit ê lūi-pia̍t",
     "error.unable_to_update_feed": "Bô-hoat-tō͘ ōaⁿ-sin chit ê siau-sit lâi-goân",
     "error.unable_to_update_user": "Bô-hoat-tō͘ ōaⁿ-sin chit ê sú-iōng-lâng",

+ 1 - 0
internal/locale/translations/nl_NL.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Kan deze gebruiker niet aanmaken.",
     "error.unable_to_detect_rssbridge": "Kan feed niet detecteren met RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Kan deze feed niet verwerken: %v.",
+    "error.unable_to_parse_html_document": "Kan het HTML-document niet verwerken: %v.",
     "error.unable_to_update_category": "Kan categorie niet bijwerken.",
     "error.unable_to_update_feed": "Kan deze feed niet bijwerken.",
     "error.unable_to_update_user": "Kan deze gebruiker niet bijwerken.",

+ 1 - 0
internal/locale/translations/pl_PL.json

@@ -170,6 +170,7 @@
     "error.unable_to_create_user": "Nie można utworzyć tego użytkownika.",
     "error.unable_to_detect_rssbridge": "Nie można wykryć kanału za pomocą RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Nie można przeanalizować tego kanału: %v.",
+    "error.unable_to_parse_html_document": "Nie można przeanalizować dokumentu HTML: %v.",
     "error.unable_to_update_category": "Ta kategoria nie mogła zostać zaktualizowana.",
     "error.unable_to_update_feed": "Nie można zaktualizować tego kanału.",
     "error.unable_to_update_user": "Nie można zaktualizować tego użytkownika.",

+ 1 - 0
internal/locale/translations/pt_BR.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Não foi possível criar esse usuário.",
     "error.unable_to_detect_rssbridge": "Unable to detect feed using RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Unable to parse this feed: %v.",
+    "error.unable_to_parse_html_document": "Não foi possível analisar o documento HTML: %v.",
     "error.unable_to_update_category": "Não foi possível atualizar essa categoria.",
     "error.unable_to_update_feed": "Não foi possível atualizar essa fonte.",
     "error.unable_to_update_user": "Não foi possível atualizar esse usuário.",

+ 1 - 0
internal/locale/translations/ro_RO.json

@@ -170,6 +170,7 @@
     "error.unable_to_create_user": "Nu se poate crea utilizatorul.",
     "error.unable_to_detect_rssbridge": "Nu pot detecta fluxul când utilizez RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Nu pot procesa acest flux: %v.",
+    "error.unable_to_parse_html_document": "Nu pot procesa documentul HTML: %v.",
     "error.unable_to_update_category": "Nu se poate actualiza această categorie.",
     "error.unable_to_update_feed": "Nu se poate actualiza acest flux.",
     "error.unable_to_update_user": "Nu se poate actualiza utilizatorul.",

+ 1 - 0
internal/locale/translations/ru_RU.json

@@ -170,6 +170,7 @@
     "error.unable_to_create_user": "Не удалось создать этого пользователя.",
     "error.unable_to_detect_rssbridge": "Не удалось обнаружить подписку с помощью RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Не удалось обработать эту подписку: %v.",
+    "error.unable_to_parse_html_document": "Не удалось обработать HTML-документ: %v.",
     "error.unable_to_update_category": "Не удалось обновить эту категорию.",
     "error.unable_to_update_feed": "Не удалось обновить эту подписку.",
     "error.unable_to_update_user": "Не удалось обновить этого пользователя.",

+ 1 - 0
internal/locale/translations/tr_TR.json

@@ -167,6 +167,7 @@
     "error.unable_to_create_user": "Bu kullanıcı oluşturulamıyor.",
     "error.unable_to_detect_rssbridge": "RSS-Bridge kullanılarak besleme algılanamıyor: %v.",
     "error.unable_to_parse_feed": "Bu besleme ayrıştırılamıyor: %v.",
+    "error.unable_to_parse_html_document": "HTML belgesi ayrıştırılamıyor: %v.",
     "error.unable_to_update_category": "Bu kategori güncellenemiyor.",
     "error.unable_to_update_feed": "Bu besleme güncellenemiyor.",
     "error.unable_to_update_user": "Bu kullanıcı güncellenemiyor.",

+ 1 - 0
internal/locale/translations/uk_UA.json

@@ -170,6 +170,7 @@
     "error.unable_to_create_user": "Не вдається створити користувача.",
     "error.unable_to_detect_rssbridge": "Не вдалося виявити стрічку за допомогою RSS-Bridge: %v.",
     "error.unable_to_parse_feed": "Не вдалося розібрати цю стрічку: %v.",
+    "error.unable_to_parse_html_document": "Не вдалося розібрати HTML-документ: %v.",
     "error.unable_to_update_category": "Не вдається відредагувати категорію.",
     "error.unable_to_update_feed": "Не вдається оновити стрічку.",
     "error.unable_to_update_user": "Не вдається оновити користувача.",

+ 1 - 0
internal/locale/translations/zh_CN.json

@@ -164,6 +164,7 @@
     "error.unable_to_create_user": "无法创建此用户。",
     "error.unable_to_detect_rssbridge": "无法使用 RSS-Bridge 检测订阅源:%v。",
     "error.unable_to_parse_feed": "无法解析此订阅源:%v。",
+    "error.unable_to_parse_html_document": "无法解析 HTML 文档:%v。",
     "error.unable_to_update_category": "无法更新此分类。",
     "error.unable_to_update_feed": "无法更新此订阅源。",
     "error.unable_to_update_user": "无法更新此用户。",

+ 1 - 0
internal/locale/translations/zh_TW.json

@@ -164,6 +164,7 @@
     "error.unable_to_create_user": "無法建立此使用者",
     "error.unable_to_detect_rssbridge": "使用 RSS-Bridge 無法找到任何訂閱:%v。",
     "error.unable_to_parse_feed": "無法解析此 Feed:%v。",
+    "error.unable_to_parse_html_document": "無法解析 HTML 文件:%v。",
     "error.unable_to_update_category": "無法更新該分類",
     "error.unable_to_update_feed": "無法更新此 Feed",
     "error.unable_to_update_user": "無法更新此使用者",

+ 1 - 1
internal/template/templates/views/tag_entries.html

@@ -6,7 +6,7 @@
         {{ .tagName }}
         <span aria-hidden="true"> ({{ .total }})</span>
     </h1>
-    <span id="page-header-title-count" class="sr-only">{{ plural "page.tag_entry_count" .total .total }}</span>
+    <span id="page-header-title-count" class="sr-only">{{ plural "page.total_entry_count" .total .total }}</span>
 </section>
 {{ end }}
 

+ 1 - 1
internal/validator/subscription.go

@@ -16,7 +16,7 @@ func ValidateSubscriptionDiscovery(request *model.SubscriptionDiscoveryRequest)
 	}
 
 	if request.ProxyURL != "" && !urllib.IsValidProxyURL(request.ProxyURL) {
-		return locale.NewLocalizedError("error.invalid_proxy_url")
+		return locale.NewLocalizedError("error.invalid_feed_proxy_url")
 	}
 
 	return nil