From 58d224758a0ae570893e2715300d565db569cc4d Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: Thu, 18 Jan 2024 12:09:19 +0530 Subject: [PATCH 1/3] Rename the template identifiers on the 404 page Signed-off-by: Akashdeep Dhar --- noggin/templates/404.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noggin/templates/404.html b/noggin/templates/404.html index 3c2b88f9c..c8bd33a8e 100644 --- a/noggin/templates/404.html +++ b/noggin/templates/404.html @@ -1,13 +1,13 @@ {% extends "main.html" %} -{% block title %}404: {{ _("You've ruined everything.")}}{% endblock %} +{% block title %}404: {{ _("That page wasn't found.")}}{% endblock %} {% block content %} {{ super() }}
-
404 {{ _("That page wasn't found. You've gone and ruined everything.")}}
+
404 {{ _("That page wasn't found.")}}
From b746a867f34dfc63f3d6ca2543d84db529b8d3ca Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: Thu, 18 Jan 2024 12:10:53 +0530 Subject: [PATCH 2/3] Rework the phrasing in the translations Remove one template identifier and correct some translations Signed-off-by: Akashdeep Dhar --- noggin/translations/be/LC_MESSAGES/messages.po | 6 +----- noggin/translations/bs/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/ca/LC_MESSAGES/messages.po | 5 +---- noggin/translations/de/LC_MESSAGES/messages.po | 9 ++------- noggin/translations/fi/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/fr_FR/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/he/LC_MESSAGES/messages.po | 5 +---- noggin/translations/hu/LC_MESSAGES/messages.po | 5 +---- noggin/translations/id/LC_MESSAGES/messages.po | 6 +----- noggin/translations/it/LC_MESSAGES/messages.po | 5 +---- noggin/translations/ko/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/messages.pot | 6 +----- noggin/translations/my/LC_MESSAGES/messages.po | 5 +---- noggin/translations/pt_BR/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/pt_PT/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/si/LC_MESSAGES/messages.po | 5 +---- noggin/translations/sv/LC_MESSAGES/messages.po | 8 ++------ noggin/translations/tr/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/uk/LC_MESSAGES/messages.po | 7 ++----- noggin/translations/zh_Hans/LC_MESSAGES/messages.po | 7 ++----- 20 files changed, 31 insertions(+), 97 deletions(-) diff --git a/noggin/translations/be/LC_MESSAGES/messages.po b/noggin/translations/be/LC_MESSAGES/messages.po index 08e009491..78d57fd95 100644 --- a/noggin/translations/be/LC_MESSAGES/messages.po +++ b/noggin/translations/be/LC_MESSAGES/messages.po @@ -613,12 +613,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -#: noggin/templates/404.html:3 -msgid "You've ruined everything." -msgstr "" - #: noggin/templates/404.html:10 -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" #: noggin/templates/_login_form.html:16 diff --git a/noggin/translations/bs/LC_MESSAGES/messages.po b/noggin/translations/bs/LC_MESSAGES/messages.po index 7e51c09ad..785b2e8e3 100644 --- a/noggin/translations/bs/LC_MESSAGES/messages.po +++ b/noggin/translations/bs/LC_MESSAGES/messages.po @@ -537,11 +537,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "Sve ste upropastili." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "Ta stranica nije pronađena. Otišli ste i sve upropastili." +msgid "That page wasn't found." +msgstr "Ta stranica nije pronađena." #, fuzzy #| msgid "Forgot password?" diff --git a/noggin/translations/ca/LC_MESSAGES/messages.po b/noggin/translations/ca/LC_MESSAGES/messages.po index a6c83c9be..6061bc2ae 100644 --- a/noggin/translations/ca/LC_MESSAGES/messages.po +++ b/noggin/translations/ca/LC_MESSAGES/messages.po @@ -475,10 +475,7 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "" - -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" msgid "Forgot Password?" diff --git a/noggin/translations/de/LC_MESSAGES/messages.po b/noggin/translations/de/LC_MESSAGES/messages.po index 5f56f985a..e8abafec5 100644 --- a/noggin/translations/de/LC_MESSAGES/messages.po +++ b/noggin/translations/de/LC_MESSAGES/messages.po @@ -535,13 +535,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "Sie haben alles ruiniert." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "" -"Die Seite wurde nicht gefunden. Sie sind vom Weg abgekommen und haben alles " -"ruiniert." +msgid "That page wasn't found." +msgstr "Die Seite wurde nicht gefunden." #, fuzzy #| msgid "Forgot password?" diff --git a/noggin/translations/fi/LC_MESSAGES/messages.po b/noggin/translations/fi/LC_MESSAGES/messages.po index b13a8042a..31ac0b380 100644 --- a/noggin/translations/fi/LC_MESSAGES/messages.po +++ b/noggin/translations/fi/LC_MESSAGES/messages.po @@ -497,11 +497,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "Olet pilannut kaiken." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "Sivua ei löytynyt. Olet mennyt ja pilannut kaiken." +msgid "That page wasn't found." +msgstr "Sitä sivua ei löytynyt." msgid "Forgot Password?" msgstr "Unohtuiko salasana?" diff --git a/noggin/translations/fr_FR/LC_MESSAGES/messages.po b/noggin/translations/fr_FR/LC_MESSAGES/messages.po index 86eeae73f..75abcc7d2 100644 --- a/noggin/translations/fr_FR/LC_MESSAGES/messages.po +++ b/noggin/translations/fr_FR/LC_MESSAGES/messages.po @@ -539,11 +539,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "Vous avez tout gâché." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "Cette page n'a pas été trouvée. Et voilà, tu as tout gâché." +msgid "That page wasn't found." +msgstr "Cette page n'a pas été trouvée." #, fuzzy #| msgid "Forgot password?" diff --git a/noggin/translations/he/LC_MESSAGES/messages.po b/noggin/translations/he/LC_MESSAGES/messages.po index 0af1ed13e..1bed19b2a 100644 --- a/noggin/translations/he/LC_MESSAGES/messages.po +++ b/noggin/translations/he/LC_MESSAGES/messages.po @@ -490,10 +490,7 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "" - -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" msgid "Forgot Password?" diff --git a/noggin/translations/hu/LC_MESSAGES/messages.po b/noggin/translations/hu/LC_MESSAGES/messages.po index a89d05282..ea9683aa9 100644 --- a/noggin/translations/hu/LC_MESSAGES/messages.po +++ b/noggin/translations/hu/LC_MESSAGES/messages.po @@ -474,10 +474,7 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "" - -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" msgid "Forgot Password?" diff --git a/noggin/translations/id/LC_MESSAGES/messages.po b/noggin/translations/id/LC_MESSAGES/messages.po index 3edb112f6..7df36eb6e 100644 --- a/noggin/translations/id/LC_MESSAGES/messages.po +++ b/noggin/translations/id/LC_MESSAGES/messages.po @@ -613,12 +613,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -#: noggin/templates/404.html:3 -msgid "You've ruined everything." -msgstr "" - #: noggin/templates/404.html:10 -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" #: noggin/templates/_login_form.html:16 diff --git a/noggin/translations/it/LC_MESSAGES/messages.po b/noggin/translations/it/LC_MESSAGES/messages.po index de930aa4e..ed57b1638 100644 --- a/noggin/translations/it/LC_MESSAGES/messages.po +++ b/noggin/translations/it/LC_MESSAGES/messages.po @@ -508,10 +508,7 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "" - -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" msgid "Forgot Password?" diff --git a/noggin/translations/ko/LC_MESSAGES/messages.po b/noggin/translations/ko/LC_MESSAGES/messages.po index d32b13ef2..77a951571 100644 --- a/noggin/translations/ko/LC_MESSAGES/messages.po +++ b/noggin/translations/ko/LC_MESSAGES/messages.po @@ -490,11 +490,8 @@ msgstr "대소문자 혼합은 허용되지 않으며, 소문자로 시도하세 msgid "Field must not match \"%(pattern)s\"." msgstr "입력란은 \"%(pattern)s\"과 일치하지 않아야 합니다." -msgid "You've ruined everything." -msgstr "모든 걸 망쳤습니다." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "해당 분야를 찾을 수 없습니다. 모든게 날라갔고 망쳐졌습니다 - 힘내요." +msgid "That page wasn't found." +msgstr "해당 페이지를 찾을 수 없습니다." msgid "Forgot Password?" msgstr "비밀번호를 잃어버렸나요?" diff --git a/noggin/translations/messages.pot b/noggin/translations/messages.pot index 27e1c2b6b..8be7a12f2 100644 --- a/noggin/translations/messages.pot +++ b/noggin/translations/messages.pot @@ -613,12 +613,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -#: noggin/templates/404.html:3 -msgid "You've ruined everything." -msgstr "" - #: noggin/templates/404.html:10 -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" #: noggin/templates/_login_form.html:16 diff --git a/noggin/translations/my/LC_MESSAGES/messages.po b/noggin/translations/my/LC_MESSAGES/messages.po index 6b6b1847b..a2930872e 100644 --- a/noggin/translations/my/LC_MESSAGES/messages.po +++ b/noggin/translations/my/LC_MESSAGES/messages.po @@ -469,10 +469,7 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "" - -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" msgid "Forgot Password?" diff --git a/noggin/translations/pt_BR/LC_MESSAGES/messages.po b/noggin/translations/pt_BR/LC_MESSAGES/messages.po index 8fef3f603..5a8a5accd 100644 --- a/noggin/translations/pt_BR/LC_MESSAGES/messages.po +++ b/noggin/translations/pt_BR/LC_MESSAGES/messages.po @@ -530,11 +530,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "Você arruinou tudo." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "A página não foi encontrada. Você foi e arruinou tudo." +msgid "That page wasn't found." +msgstr "Essa página não foi encontrada." #, fuzzy #| msgid "Forgot password?" diff --git a/noggin/translations/pt_PT/LC_MESSAGES/messages.po b/noggin/translations/pt_PT/LC_MESSAGES/messages.po index 5e5a476a3..6634aa80b 100644 --- a/noggin/translations/pt_PT/LC_MESSAGES/messages.po +++ b/noggin/translations/pt_PT/LC_MESSAGES/messages.po @@ -532,11 +532,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "Arruinou tudo." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "Essa página não foi encontrada. Você foi e arruinou tudo." +msgid "That page wasn't found." +msgstr "Essa página não foi encontrada." #, fuzzy #| msgid "Forgot password?" diff --git a/noggin/translations/si/LC_MESSAGES/messages.po b/noggin/translations/si/LC_MESSAGES/messages.po index 185043448..13e0e52eb 100644 --- a/noggin/translations/si/LC_MESSAGES/messages.po +++ b/noggin/translations/si/LC_MESSAGES/messages.po @@ -472,10 +472,7 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "" - -msgid "That page wasn't found. You've gone and ruined everything." +msgid "That page wasn't found." msgstr "" msgid "Forgot Password?" diff --git a/noggin/translations/sv/LC_MESSAGES/messages.po b/noggin/translations/sv/LC_MESSAGES/messages.po index a7d4049b6..28e30233a 100644 --- a/noggin/translations/sv/LC_MESSAGES/messages.po +++ b/noggin/translations/sv/LC_MESSAGES/messages.po @@ -389,13 +389,9 @@ msgstr "Du måste ange en andra kod" msgid "Token ID" msgstr "Token ID" -#: noggin/templates/404.html:3 -msgid "You've ruined everything." -msgstr "Du har förstört allt." - #: noggin/templates/404.html:10 -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "Den sidan hittades inte. Du har gått och förstört allt." +msgid "That page wasn't found." +msgstr "Den sidan hittades inte." #: noggin/templates/_login_form.html:11 msgid "Forgot password?" diff --git a/noggin/translations/tr/LC_MESSAGES/messages.po b/noggin/translations/tr/LC_MESSAGES/messages.po index f1324c1d2..2c0e39570 100644 --- a/noggin/translations/tr/LC_MESSAGES/messages.po +++ b/noggin/translations/tr/LC_MESSAGES/messages.po @@ -528,11 +528,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "Her şeyi mahvettiniz." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "Bu sayfa bulunamadı. Gittiniz ve her şeyi mahvettiniz." +msgid "That page wasn't found." +msgstr "Bu sayfa bulunamadı." #, fuzzy #| msgid "Forgot password?" diff --git a/noggin/translations/uk/LC_MESSAGES/messages.po b/noggin/translations/uk/LC_MESSAGES/messages.po index 25f7ad23b..9c3565366 100644 --- a/noggin/translations/uk/LC_MESSAGES/messages.po +++ b/noggin/translations/uk/LC_MESSAGES/messages.po @@ -515,11 +515,8 @@ msgstr "Змішаний регістр не допускається, спро msgid "Field must not match \"%(pattern)s\"." msgstr "Поле не має відповідати \"%(pattern)s\"." -msgid "You've ruined everything." -msgstr "Ви усе зруйнували." - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "Цієї сторінки не знайдено. Ви пішли і усе зруйнували." +msgid "That page wasn't found." +msgstr "Ця сторінка не знайдена." msgid "Forgot Password?" msgstr "Забули пароль?" diff --git a/noggin/translations/zh_Hans/LC_MESSAGES/messages.po b/noggin/translations/zh_Hans/LC_MESSAGES/messages.po index 7e681f495..32ce519e3 100644 --- a/noggin/translations/zh_Hans/LC_MESSAGES/messages.po +++ b/noggin/translations/zh_Hans/LC_MESSAGES/messages.po @@ -521,11 +521,8 @@ msgstr "" msgid "Field must not match \"%(pattern)s\"." msgstr "" -msgid "You've ruined everything." -msgstr "您毁灭了一切。" - -msgid "That page wasn't found. You've gone and ruined everything." -msgstr "此页面无法找到。您已经离开并毁灭了一切。" +msgid "That page wasn't found." +msgstr "此页面无法找到。" #, fuzzy #| msgid "Forgot password?" From c96ecb9ce638b387722c1b04fd91d21ab7b8da43 Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: Thu, 18 Jan 2024 13:30:13 +0530 Subject: [PATCH 3/3] Fix the tests to allow for the modified strings Signed-off-by: Akashdeep Dhar --- tests/unit/translations/test_translations.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/unit/translations/test_translations.py b/tests/unit/translations/test_translations.py index 5089ee8d0..f03dcfc75 100644 --- a/tests/unit/translations/test_translations.py +++ b/tests/unit/translations/test_translations.py @@ -43,7 +43,4 @@ def test_translation_in_template_french(client, compile_catalogs): assert result.status_code == 404 page = BeautifulSoup(result.data, 'html.parser') message = page.select_one(".alert.alert-danger") - assert ( - message.get_text(strip=True) - == "404Cette page n'a pas été trouvée. Et voilà, tu as tout gâché." - ) + assert message.get_text(strip=True) == "404Cette page n'a pas été trouvée."