diff --git a/locales/ar.json b/locales/ar.json index b12c4cb84..bc0c68306 100644 --- a/locales/ar.json +++ b/locales/ar.json @@ -419,5 +419,8 @@ "location": "الاماكن", "hdr": "وضع التباين العالي", "filter": "معامل الفرز", - "Current version: ": "الإصدار الحالي: " + "Current version: ": "الإصدار الحالي: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } \ No newline at end of file diff --git a/locales/bn_BD.json b/locales/bn_BD.json index 9de526d54..83bd65557 100644 --- a/locales/bn_BD.json +++ b/locales/bn_BD.json @@ -358,5 +358,8 @@ "Videos": "", "Playlists": "", "Community": "", - "Current version: ": "" + "Current version: ": "", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/cs.json b/locales/cs.json index 3d59466a2..c8320a073 100644 --- a/locales/cs.json +++ b/locales/cs.json @@ -419,5 +419,8 @@ "location": "umístění", "hdr": "HDR", "filter": "filtr", - "Current version: ": "" + "Current version: ": "", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/da.json b/locales/da.json index 03b176f44..d207939c1 100644 --- a/locales/da.json +++ b/locales/da.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "" + "Current version: ": "", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/de.json b/locales/de.json index 606fbeb5e..b602192b4 100644 --- a/locales/de.json +++ b/locales/de.json @@ -419,5 +419,8 @@ "location": "Standort", "hdr": "HDR", "filter": "Filtern", - "Current version: ": "Aktuelle Version: " + "Current version: ": "Aktuelle Version: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/el.json b/locales/el.json index 94611e82f..f7588c604 100644 --- a/locales/el.json +++ b/locales/el.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "Τρέχουσα έκδοση: " + "Current version: ": "Τρέχουσα έκδοση: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/eo.json b/locales/eo.json index 698110066..7ac38c355 100644 --- a/locales/eo.json +++ b/locales/eo.json @@ -419,5 +419,8 @@ "location": "loko", "hdr": "granddinamikgama", "filter": "filtri", - "Current version: ": "Nuna versio: " + "Current version: ": "Nuna versio: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/es.json b/locales/es.json index 25329d401..e160526ed 100644 --- a/locales/es.json +++ b/locales/es.json @@ -419,5 +419,8 @@ "location": "ubicación", "hdr": "hdr", "filter": "filtro", - "Current version: ": "Versión actual: " + "Current version: ": "Versión actual: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/eu.json b/locales/eu.json index 426d721f1..34820a507 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -341,5 +341,8 @@ "Videos": "", "Playlists": "", "Community": "", - "Current version: ": "" + "Current version: ": "", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/fa.json b/locales/fa.json index 6b40af620..611cc57df 100644 --- a/locales/fa.json +++ b/locales/fa.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "نسخه فعلی: " + "Current version: ": "نسخه فعلی: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/fi.json b/locales/fi.json index 24a4ec367..b446332c4 100644 --- a/locales/fi.json +++ b/locales/fi.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "Tämänhetkinen versio: " + "Current version: ": "Tämänhetkinen versio: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/fr.json b/locales/fr.json index 75cd2be01..4a685d352 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -419,5 +419,8 @@ "location": "emplacement", "hdr": "HDR", "filter": "filtrer", - "Current version: ": "Version actuelle : " + "Current version: ": "Version actuelle : ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/he.json b/locales/he.json index 368a7e081..d4c70a36d 100644 --- a/locales/he.json +++ b/locales/he.json @@ -419,5 +419,8 @@ "location": "מיקום", "hdr": "HDR", "filter": "סינון", - "Current version: ": "הגרסה הנוכחית: " + "Current version: ": "הגרסה הנוכחית: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/hr.json b/locales/hr.json index 5cadab8f0..ab9dd54b6 100644 --- a/locales/hr.json +++ b/locales/hr.json @@ -419,5 +419,8 @@ "location": "lokacija", "hdr": "hdr", "filter": "filtar", - "Current version: ": "Trenutačna verzija: " + "Current version: ": "Trenutačna verzija: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/hu-HU.json b/locales/hu-HU.json index 5c67b4e7b..a0c6c17f3 100644 --- a/locales/hu-HU.json +++ b/locales/hu-HU.json @@ -340,5 +340,8 @@ "Videos": "Videók", "Playlists": "Lejátszási listák", "Community": "Közösség", - "Current version: ": "Jelenlegi verzió: " + "Current version: ": "Jelenlegi verzió: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/id.json b/locales/id.json index 0ed116b8c..07d252e69 100644 --- a/locales/id.json +++ b/locales/id.json @@ -419,5 +419,8 @@ "location": "lokasi", "hdr": "hdr", "filter": "saring", - "Current version: ": "Versi saat ini: " + "Current version: ": "Versi saat ini: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/is.json b/locales/is.json index d9ec4105b..546d67f8d 100644 --- a/locales/is.json +++ b/locales/is.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "Núverandi útgáfa: " + "Current version: ": "Núverandi útgáfa: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/it.json b/locales/it.json index 4105e83f9..1a14f1721 100644 --- a/locales/it.json +++ b/locales/it.json @@ -419,5 +419,8 @@ "location": "Posizione", "hdr": "HDR", "filter": "Filtra", - "Current version: ": "Versione attuale: " + "Current version: ": "Versione attuale: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/ja.json b/locales/ja.json index 3c6efb775..7a80955d7 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -419,5 +419,8 @@ "location": "", "hdr": "HDR", "filter": "フィルタ", - "Current version: ": "現在のバージョン: " + "Current version: ": "現在のバージョン: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/nb-NO.json b/locales/nb-NO.json index 4b5eabd0f..fec2637fc 100644 --- a/locales/nb-NO.json +++ b/locales/nb-NO.json @@ -419,5 +419,8 @@ "location": "sted", "hdr": "HDR", "filter": "filtrer", - "Current version: ": "Gjeldende versjon: " + "Current version: ": "Gjeldende versjon: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/nl.json b/locales/nl.json index 16cdb4277..30ddd49fe 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -419,5 +419,8 @@ "location": "locatie", "hdr": "HDR", "filter": "verfijnen", - "Current version: ": "Huidige versie: " + "Current version: ": "Huidige versie: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } \ No newline at end of file diff --git a/locales/pl.json b/locales/pl.json index f8df837c3..12177ce64 100644 --- a/locales/pl.json +++ b/locales/pl.json @@ -419,5 +419,8 @@ "location": "", "hdr": "hdr", "filter": "filtr", - "Current version: ": "Aktualna wersja: " + "Current version: ": "Aktualna wersja: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/pt-BR.json b/locales/pt-BR.json index 644aa34dc..13f2c65f4 100644 --- a/locales/pt-BR.json +++ b/locales/pt-BR.json @@ -419,5 +419,8 @@ "location": "localização", "hdr": "hdr", "filter": "filtro", - "Current version: ": "Versão atual: " + "Current version: ": "Versão atual: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/pt-PT.json b/locales/pt-PT.json index c02ca58e6..acc08c65a 100644 --- a/locales/pt-PT.json +++ b/locales/pt-PT.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "Versão atual: " + "Current version: ": "Versão atual: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/ro.json b/locales/ro.json index 5c984ab52..a1cbb270e 100644 --- a/locales/ro.json +++ b/locales/ro.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "Versiunea actuală: " + "Current version: ": "Versiunea actuală: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } \ No newline at end of file diff --git a/locales/ru.json b/locales/ru.json index cd29f06ac..9381c5785 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "Текущая версия: " + "Current version: ": "Текущая версия: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } \ No newline at end of file diff --git a/locales/si.json b/locales/si.json index 23cacc1e8..cbc9bdde8 100644 --- a/locales/si.json +++ b/locales/si.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "" + "Current version: ": "", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/sk.json b/locales/sk.json index ed82fae64..9330232ee 100644 --- a/locales/sk.json +++ b/locales/sk.json @@ -358,5 +358,8 @@ "Videos": "", "Playlists": "", "Community": "", - "Current version: ": "" + "Current version: ": "", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/sr.json b/locales/sr.json index 0c64e176a..4835e9a3e 100644 --- a/locales/sr.json +++ b/locales/sr.json @@ -417,5 +417,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "" + "Current version: ": "", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/sr_Cyrl.json b/locales/sr_Cyrl.json index a76684b4d..7ac90fc8d 100644 --- a/locales/sr_Cyrl.json +++ b/locales/sr_Cyrl.json @@ -341,5 +341,8 @@ "Videos": "", "Playlists": "", "Community": "", - "Current version: ": "Тренутна верзија: " + "Current version: ": "Тренутна верзија: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/sv-SE.json b/locales/sv-SE.json index fe12f8d13..bc1481430 100644 --- a/locales/sv-SE.json +++ b/locales/sv-SE.json @@ -419,5 +419,8 @@ "location": "plats", "hdr": "hdr", "filter": "", - "Current version: ": "Nuvarande version: " + "Current version: ": "Nuvarande version: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/tr.json b/locales/tr.json index ca36023a2..6ada31b5a 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -419,5 +419,8 @@ "location": "konum", "hdr": "HDR", "filter": "filtrele", - "Current version: ": "Şu anki sürüm: " + "Current version: ": "Şu anki sürüm: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/uk.json b/locales/uk.json index 9e9239d1a..6580bb83d 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -419,5 +419,8 @@ "location": "", "hdr": "", "filter": "", - "Current version: ": "Поточна версія: " + "Current version: ": "Поточна версія: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } \ No newline at end of file diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 7f58d67c9..fdd87687c 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -419,5 +419,8 @@ "location": "位置", "hdr": "hdr", "filter": "过滤器", - "Current version: ": "当前版本: " + "Current version: ": "当前版本: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/locales/zh-TW.json b/locales/zh-TW.json index 61a9f1184..3a060e639 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -419,5 +419,8 @@ "location": "位置", "hdr": "HDR", "filter": "篩選條件", - "Current version: ": "目前版本: " + "Current version: ": "目前版本: ", + "next_steps_error_message": "", + "next_steps_error_message_refresh": "", + "next_steps_error_message_go_to_youtube": "" } diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index 714e06700..e1d025632 100644 --- a/src/invidious/helpers/errors.cr +++ b/src/invidious/helpers/errors.cr @@ -108,35 +108,33 @@ def error_json_helper(env : HTTP::Server::Context, locale : Hash(String, JSON::A error_json_helper(env, locale, status_code, message, nil) end -def error_redirect_helper(env : HTTP::Server::Context, locale : Hash(String, JSON::Any) | Nil) +def error_redirect_helper(env : HTTP::Server::Context, locale : Hash(String, JSON::Any) | Nil) request_path = env.request.path - if request_path.starts_with?("/search") || request_path.starts_with?("/watch") || - request_path.starts_with?("/channel") || request_path.starts_with?("/playlist?list=PL") + if request_path.starts_with?("/search") || request_path.starts_with?("/watch") || + request_path.starts_with?("/channel") || request_path.starts_with?("/playlist?list=PL") + next_steps_text = translate(locale, "next_steps_error_message") + refresh = translate(locale, "next_steps_error_message_refresh") + go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube") + switch_instance = translate(locale, "Switch Invidious Instance") - next_steps_text = translate(locale, "next_steps_error_message") - refresh = translate(locale, "next_steps_error_message_refresh") - go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube") - switch_instance = translate(locale, "Switch Invidious Instance") - - - return <<-END_HTML -
#{next_steps_text}
-#{next_steps_text}
+