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
+5 -5
View File
@@ -6,11 +6,11 @@ from molodetz.docs_prose import page_source, render_page, visible_pages
def export_markdown(viewer_is_admin):
parts = ["# Molodetz documentatie", ""]
parts = ["# Molodetz documentation", ""]
for page in visible_pages(viewer_is_admin):
parts += [page_source(page["slug"]).strip(), ""]
for group in ordered_groups():
if group["slug"] == "beheer" and not viewer_is_admin:
if group["slug"] == "admin" and not viewer_is_admin:
continue
parts += [f"## API: {group['title']}", "", group["description"], ""]
for item in group["endpoints"]:
@@ -24,7 +24,7 @@ def export_html(viewer_is_admin):
for page in visible_pages(viewer_is_admin):
body.append(f"<section>{render_page(page['slug'])}</section>")
for group in ordered_groups():
if group["slug"] == "beheer" and not viewer_is_admin:
if group["slug"] == "admin" and not viewer_is_admin:
continue
items = "".join(
f"<li><code>{escape(item['method'])} {escape(item['path'])}</code> ({escape(item['auth'])}): {escape(item['title'])}</li>"
@@ -32,6 +32,6 @@ def export_html(viewer_is_admin):
)
body.append(f"<section><h2>API: {escape(group['title'])}</h2><ul>{items}</ul></section>")
return (
"<!doctype html><html lang=\"nl\"><head><meta charset=\"utf-8\"><title>Molodetz documentatie</title></head>"
f"<body><h1>Molodetz documentatie</h1>{''.join(body)}</body></html>"
"<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><title>Molodetz documentation</title></head>"
f"<body><h1>Molodetz documentation</h1>{''.join(body)}</body></html>"
)