From 00650aee8132fd7c9cd552cbd6629a304f928ef3 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Mon, 24 Aug 2026 01:15:42 +0200 Subject: [PATCH] docs: complete German structured documentation --- pyproject.toml | 2 +- src/govoplan_voting/__init__.py | 2 +- .../german_structured_documentation.py | 67 +++++++++++++++++++ src/govoplan_voting/backend/manifest.py | 10 ++- webui/package.json | 2 +- 5 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 src/govoplan_voting/backend/german_structured_documentation.py diff --git a/pyproject.toml b/pyproject.toml index 1698ece..e0911db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "govoplan-voting" -version = "0.1.19" +version = "0.1.20" description = "Governed voting, ballot assurance, tally, and certification for GovOPlaN." readme = "README.md" requires-python = ">=3.12" diff --git a/src/govoplan_voting/__init__.py b/src/govoplan_voting/__init__.py index ff6b629..5a6e10a 100644 --- a/src/govoplan_voting/__init__.py +++ b/src/govoplan_voting/__init__.py @@ -1,3 +1,3 @@ """GovOPlaN Voting module.""" -__version__ = "0.1.19" +__version__ = "0.1.20" diff --git a/src/govoplan_voting/backend/german_structured_documentation.py b/src/govoplan_voting/backend/german_structured_documentation.py new file mode 100644 index 0000000..ee6e5fb --- /dev/null +++ b/src/govoplan_voting/backend/german_structured_documentation.py @@ -0,0 +1,67 @@ +"""German translations for public structured documentation metadata.""" + +from __future__ import annotations + +from typing import Any + + +GERMAN_STRUCTURED_TRANSLATIONS: dict[str, dict[str, Any]] = {'voting.assurance': {'privacy_notes': ['Aufgezeichnete Stimmzettel sind rekonstruierbar und ' + 'dürfen niemals als geheim bezeichnet werden.', + 'Von Anbietern unterstützte Profile zeigen nur das ' + 'Aggregat, den Empfang, den Hash und die Nachweise, die ' + 'der Anbietervertrag erlaubt.', + 'Der gebündelte lokale vertrauliche Anbieter ist ' + 'serverlesbar und unzertifiziert trotz verschlüsselter ' + 'gespeicherter Auswahl.']}, + 'voting.data-subject-requests': {'consequence_classes': {'export_confidential_receipt': 'Gibt ' + 'Teilnahme-Metadaten ' + 'ohne ' + 'Auswahl ' + 'oder ' + 'Geheimtext ' + 'zurück.', + 'export_recorded_vote': 'Gibt die ' + 'rekonstruierbaren ' + 'aufgezeichneten ' + 'Auswahlen des ' + 'Subjekts ' + 'zurück.', + 'retain_ballot_evidence': 'Bewahrt die ' + 'Integrität ' + 'der ' + 'Stimmzettel ' + 'und die ' + 'Geschichte ' + 'der ' + 'Herausforderungen.'}}, + 'voting.reference.fields-and-consequences': {'consequence_classes': {'cast': 'Registriert oder ' + 'ersetzt eine ' + 'autorisierte Stimme ' + 'und gibt eine ' + 'datenschutzbeschränkte ' + 'Quittung zurück.', + 'certify': 'Fügt ' + 'Zertifizierungsnachweise ' + 'hinzu, ohne das ' + 'eingefrorene ' + 'Ergebnis neu zu ' + 'schreiben.', + 'challenge_or_annul': 'Hängt ' + 'einen ' + 'begründeten ' + 'Governance-Übergang ' + 'an, ' + 'während ' + 'vorherige ' + 'Nachweise ' + 'beibehalten ' + 'werden.', + 'close': 'Stoppt das Gießen ' + 'und zeichnet die ' + 'Aggregatzahl auf.', + 'open': 'Friert die ' + 'Stimmzetteldefinition ' + 'und Wählerschaft ' + 'ein und erlaubt ' + 'autorisiertes ' + 'Casting.'}}} diff --git a/src/govoplan_voting/backend/manifest.py b/src/govoplan_voting/backend/manifest.py index bfd7c95..30a1d0b 100644 --- a/src/govoplan_voting/backend/manifest.py +++ b/src/govoplan_voting/backend/manifest.py @@ -1,5 +1,8 @@ from __future__ import annotations +from govoplan_core.core.modules import with_documentation_structured_translations +from govoplan_voting.backend.german_structured_documentation import GERMAN_STRUCTURED_TRANSLATIONS + from pathlib import Path from govoplan_core.core.access import ( @@ -52,7 +55,7 @@ from govoplan_voting.backend.local_confidential_provider import ( MODULE_ID = "voting" MODULE_NAME = "Voting" -MODULE_VERSION = "0.1.19" +MODULE_VERSION = "0.1.20" READ_SCOPE = "voting:ballot:read" MANAGE_SCOPE = "voting:ballot:manage" CAST_SCOPE = "voting:ballot:cast" @@ -567,5 +570,10 @@ manifest = ModuleManifest( ) +manifest = with_documentation_structured_translations( + manifest, locale="de", translations=GERMAN_STRUCTURED_TRANSLATIONS +) + + def get_manifest() -> ModuleManifest: return manifest diff --git a/webui/package.json b/webui/package.json index 781b0d7..cbafb42 100644 --- a/webui/package.json +++ b/webui/package.json @@ -1,6 +1,6 @@ { "name": "@govoplan/voting-webui", - "version": "0.1.19", + "version": "0.1.20", "private": true, "type": "module", "main": "src/index.ts",