feat: write template

This commit is contained in:
u80864958 committed 2026-09-18 16:36:52 +02:00
commit a0a6d2cf84
98 files changed
+6609

No files matched your search

+70
View File
@@ -0,0 +1,70 @@
// Localization Helper
#let translate(key) = {
context {
let lang = text.lang
let en = (
"servers.title": "Servers",
"servers.desc": "This section lists the available servers used to access the API.",
"servers.caption": "Server List",
"servers.table.addr": "Address",
"servers.table.desc": "Description",
"schemas.title": "Schemas",
"schemas.desc": "This section defines the data structures sent and received by the API.",
"schemas.caption": "Schema",
"schemas.property": "Property",
"schemas.type": "Type",
"schemas.desc-ex": "Description/Example",
"endpoints.title": "Endpoints",
"endpoints.desc": "This section describes the available commands (endpoints) that can be sent to the API.",
"endpoints.endpoint": "Endpoint",
"endpoints.method": "HTTP Method",
"endpoints.summary": "Summary",
"endpoints.description": "Description",
"endpoints.parameters": "Parameters:",
"endpoints.request-body": "Request Body:",
"endpoints.responses": "Responses:",
"endpoints.uses-schema": "Uses schema ",
"endpoints.array-of": "Array of ",
"endpoints.type-prefix": "Type",
"endpoints.caption": "Endpoint",
"common.example": "Example",
"common.any": "any",
)
let de = (
"servers.title": "Server",
"servers.desc": "In diesem Abschnitt werden die verfügbaren Server aufgelistet, über die die API erreicht werden kann.",
"servers.caption": "Serverliste",
"servers.table.addr": "Adresse",
"servers.table.desc": "Beschreibung",
"schemas.title": "Datenschemata",
"schemas.desc": "Hier sind die Datenstrukturen definiert, die von der API gesendet und empfangen werden.",
"schemas.caption": "Schema",
"schemas.property": "Eigenschaft",
"schemas.type": "Typ",
"schemas.desc-ex": "Beschreibung/Beispiel",
"endpoints.title": "Endpunkte",
"endpoints.desc": "In diesem Abschnitt werden die verfügbaren Befehle (Endpunkte) beschrieben, die an die API gesendet werden können.",
"endpoints.endpoint": "Endpunkt",
"endpoints.method": "HTTP-Methode",
"endpoints.summary": "Zusammenfassung",
"endpoints.description": "Beschreibung",
"endpoints.parameters": [Parameter: \ (Name, Ort, Typ, \ Beschreibung)],
"endpoints.request-body": "Anfrage-Daten:",
"endpoints.responses": [Antworten: \ (Statuscode, Daten) ],
"endpoints.uses-schema": "Verwendet Schema ",
"endpoints.array-of": "Liste von ",
"endpoints.type-prefix": "Typ",
"endpoints.caption": "Endpunkt",
"common.example": "Beispiel",
"common.any": "beliebig",
)
let dict = if lang == "de" { de } else { en }
let val = dict.at(key, default: key)
if val != none {
val
}
}
}