feat(i18n): English source strings with German translation

All UI texts and generated document texts use gettext; exports follow the user's language. Adds a check that README and PluginConfig version ranges match.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-26 21:27:47 +01:00
1 parent 0d046f3a9d
commit 9dba7e07a0
35 files changed
+1841 -364

No files matched your search

+4 -3
View File
@@ -3,6 +3,7 @@ import base64
from dataclasses import dataclass, field
from django.utils.text import slugify
from django.utils.translation import gettext as _
EMPTY = "—"
@@ -48,11 +49,11 @@ def P(text):
def T(headers, rows):
return Block("table", headers=list(headers), rows=[[fmt(c) for c in r] for r in rows])
return Block("table", headers=[str(h) for h in headers], rows=[[fmt(c) for c in r] for r in rows])
def KV(pairs, skip_empty=True):
rows = [[k, fmt(v)] for k, v in pairs if not (skip_empty and v in (None, "", [], EMPTY))]
rows = [[str(k), fmt(v)] for k, v in pairs if not (skip_empty and v in (None, "", [], EMPTY))]
return Block("kv", rows=rows)
@@ -84,7 +85,7 @@ def fmt(value):
if value is None or value == "":
return EMPTY
if isinstance(value, bool):
return "Ja" if value else "Nein"
return _("Yes") if value else _("No")
if isinstance(value, (list, tuple, set)) or hasattr(value, "all"):
items = value.all() if hasattr(value, "all") else value
return ", ".join(str(i) for i in items) or EMPTY