Swedish adaptation: Instegscertifikat and HAREC

- Editions replaced by INSTEG, HAREC and UPPGRADERING (Instegscertifikat -> HAREC)
- Question pool optional; simulator, homework tool and solutions switch off without one
- All UI strings, templates, renderers and project JS localised to sv-SE
  (decimal comma, Swedish non-breaking-space rules, Å/Ä/Ö in Morse table)
- DARC branding, membership CTA and German links removed; attribution footer added
- Page names centralised in src/pages.py
- README and docs rewritten in Swedish

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-10-10 15:03:02 +02:00
co-authored by Claude Sonnet 5.5
parent 28cf11437e
commit 874838f525
81 changed files with 918 additions and 1329 deletions
+7 -6
View File
@@ -103,7 +103,7 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
return None
def render_quote(self, token):
return f"„{self.render_inner(token)}“"
return f"”{self.render_inner(token)}”"
def render_underline(self, token):
return f"<u>{self.render_inner(token)}</u>"
@@ -111,8 +111,8 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
@classmethod
def render_unit(cls, token: Unit):
unit = token.prefix + cls.convert_unit_helper(token.unit)
if token.unit in ["°", "%"]:
# Special cases with no space between value and unit.
if token.unit == "°":
# Special case with no space between value and unit.
return f"{token.value}{unit}"
else:
# Default case is rendered with a narrow no-break space.
@@ -120,6 +120,7 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
units = {
"Ohm": "Ω",
"ohm": "Ω",
}
@classmethod
@@ -234,7 +235,7 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
return (
f'<figure class="picture" id="ref_{marker}" name="{marker}">\n'
f' <img src="pictures/{id}.svg" alt="{alt_text}">\n'
f" <figcaption>Abbildung {label}: {text}</figcaption>\n"
f" <figcaption>Figur {label}: {text}</figcaption>\n"
"</figure>\n"
)
@@ -243,7 +244,7 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
return f"""
<figure class="photo" id="ref_{ref}" name="{ref}">
<img src="photos/{id}.png" alt="{alt_text}">
<figcaption>Abbildung {label}: {text}</figcaption>
<figcaption>Figur {label}: {text}</figcaption>
</figure>
"""
@@ -276,7 +277,7 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
caption_text = token.caption
label = self._format_reference_label(token.name)
if label:
caption_text = f"Tabelle {label}: {token.caption}"
caption_text = f"Tabell {label}: {token.caption}"
table += f"<caption>{caption_text}</caption>\n"
table += "</table>"