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
+8 -8
View File
@@ -17,7 +17,7 @@ def normalize_website(value):
if not value.lower().startswith(("http://", "https://")):
value = "https://" + value
if not URL_HOST_PATTERN.match(value):
raise ValueError("Geef een geldige link op, bijvoorbeeld https://git.example.nl/naam")
raise ValueError("Enter a valid link, for example https://git.example.com/name")
return value[:500]
@@ -30,7 +30,7 @@ def normalize_european_date(value):
return datetime.strptime(value, fmt).date().isoformat()
except ValueError:
continue
raise ValueError("Gebruik DD/MM/JJJJ")
raise ValueError("Use DD/MM/YYYY")
class FormModel(BaseModel):
@@ -47,7 +47,7 @@ class LoginForm(FormModel):
class PostForm(FormModel):
title: str = Field(min_length=3, max_length=200)
body: str = Field(min_length=10, max_length=PROSE_CAP)
topic: str = "rol"
topic: str = "roll"
status: str = "draft"
is_placeholder: bool = False
@@ -55,14 +55,14 @@ class PostForm(FormModel):
@classmethod
def check_topic(cls, value):
if value not in TOPICS:
raise ValueError("Onbekend onderwerp")
raise ValueError("Unknown topic")
return value
@field_validator("status")
@classmethod
def check_status(cls, value):
if value not in POST_STATUSES:
raise ValueError("Onbekende status")
raise ValueError("Unknown status")
return value
@@ -86,7 +86,7 @@ class JoinStatusForm(FormModel):
@classmethod
def check_status(cls, value):
if value not in JOIN_STATUSES:
raise ValueError("Onbekende status")
raise ValueError("Unknown status")
return value
@@ -97,7 +97,7 @@ class RoleForm(FormModel):
@classmethod
def check_role(cls, value):
if value not in ROLES:
raise ValueError("Onbekende rol")
raise ValueError("Unknown role")
return value
@@ -133,5 +133,5 @@ class BackupForm(FormModel):
@classmethod
def check_target(cls, value):
if value not in ("database", "uploads", "keys", "full"):
raise ValueError("Onbekend doel")
raise ValueError("Unknown target")
return value