Translate the whole site to English: English routes with 301 redirects from the Dutch paths, English UI, docs, seeds and captions, one-time live content migration

This commit is contained in:
2026-10-05 11:25:41 +02:00
parent bbdecdc95b
commit ff547e1677
153 changed files with 1095 additions and 774 deletions
+7 -7
View File
@@ -4,15 +4,15 @@
def test_home_is_molodetz(anon):
html = anon.get("/").text
assert "Molodetz" in html
for label in ("Rol", "Standaard", "Flyers", "Memes", "Mensen", "Binnen"):
for label in ("Roll", "Standard", "Flyers", "Memes", "People", "Join"):
assert f">{label}</a>" in html
assert "wa.me" not in html and "whatsapp" not in html.lower()
def test_unknown_page_is_404(anon):
response = anon.get("/bestaat-niet-xyz")
response = anon.get("/does-not-exist-xyz")
assert response.status_code == 404
assert anon.get("/bestaat-niet-xyz", headers={"Accept": "application/json"}).json()["error"]
assert anon.get("/does-not-exist-xyz", headers={"Accept": "application/json"}).json()["error"]
def _intro_section(html):
@@ -47,15 +47,15 @@ def test_intro_json_face(anon):
def test_admin_can_edit_intro(admin, anon):
original = admin.get("/admin/settings", headers={"Accept": "application/json"}).json()["settings"]["site_intro"]
try:
response = admin.post("/admin/settings", json={"site_intro": "Eerste regel.\n\nTweede alinea\nmet een regel erbij."}, headers={"Accept": "application/json"})
response = admin.post("/admin/settings", json={"site_intro": "First line.\n\nSecond paragraph\nwith an extra line."}, headers={"Accept": "application/json"})
assert response.status_code == 200
intro = _intro_section(anon.get("/").text)
assert intro.find("p").get_text() == "Eerste regel."
assert intro.find("p").get_text() == "First line."
assert intro.find_all("p")[1].find("br") is not None
form = admin.post("/admin/settings", data={"site_intro": "Via formulier.\r\n\r\nRegel een\r\nregel twee"})
form = admin.post("/admin/settings", data={"site_intro": "Via the form.\r\n\r\nLine one\r\nline two"})
assert form.status_code in (302, 303)
stored = admin.get("/admin/settings", headers={"Accept": "application/json"}).json()["settings"]["site_intro"]
assert stored == "Via formulier.\n\nRegel een\nregel twee"
assert stored == "Via the form.\n\nLine one\nline two"
finally:
admin.post("/admin/settings", json={"site_intro": original}, headers={"Accept": "application/json"})
assert _intro_section(anon.get("/").text).find("p").get_text(" ", strip=True).startswith("I wrote more code than you.")