diff --git a/pyproject.toml b/pyproject.toml index 7c529ca..541ad3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "govoplan-poll" -version = "0.1.19" +version = "0.1.20" description = "GovOPlaN lightweight poll and availability decision module seed." readme = "README.md" requires-python = ">=3.12" diff --git a/src/govoplan_poll/__init__.py b/src/govoplan_poll/__init__.py index 0a366de..25203ce 100644 --- a/src/govoplan_poll/__init__.py +++ b/src/govoplan_poll/__init__.py @@ -2,4 +2,4 @@ __all__ = ["__version__"] -__version__ = "0.1.19" +__version__ = "0.1.20" diff --git a/src/govoplan_poll/backend/german_structured_documentation.py b/src/govoplan_poll/backend/german_structured_documentation.py new file mode 100644 index 0000000..f7ff26c --- /dev/null +++ b/src/govoplan_poll/backend/german_structured_documentation.py @@ -0,0 +1,25 @@ +"""German translations for public structured documentation metadata.""" + +from __future__ import annotations + +from typing import Any + + +GERMAN_STRUCTURED_TRANSLATIONS: dict[str, dict[str, Any]] = {'poll.data-subject-requests': {'consequence_classes': {'anonymous_limitation': 'Kann keine ' + 'Antwort ' + 'korrelieren, die ' + 'absichtlich ' + 'keinen ' + 'Subjektidentifikator ' + 'hat.', + 'export_identified_response': 'Retouren ' + 'begrenzt ' + 'subjekteigene ' + 'Antworten ' + 'und ' + 'Umfragekontext.', + 'review_participation_erasure': 'Erfordert ' + 'Ergebnisintegrität ' + 'und ' + 'Retention ' + 'Review.'}}} diff --git a/src/govoplan_poll/backend/manifest.py b/src/govoplan_poll/backend/manifest.py index e8a426d..a5e879f 100644 --- a/src/govoplan_poll/backend/manifest.py +++ b/src/govoplan_poll/backend/manifest.py @@ -1,5 +1,8 @@ from __future__ import annotations +from govoplan_core.core.modules import with_documentation_structured_translations +from govoplan_poll.backend.german_structured_documentation import GERMAN_STRUCTURED_TRANSLATIONS + from pathlib import Path from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER @@ -23,7 +26,7 @@ from govoplan_poll.backend.dsar_provider import POLL_DSAR_CAPABILITY, PollDsarPr MODULE_ID = "poll" MODULE_NAME = "Poll" -MODULE_VERSION = "0.1.19" +MODULE_VERSION = "0.1.20" READ_SCOPE = "poll:poll:read" WRITE_SCOPE = "poll:poll:write" ADMIN_SCOPE = "poll:poll:admin" @@ -309,5 +312,10 @@ manifest = ModuleManifest( ) +manifest = with_documentation_structured_translations( + manifest, locale="de", translations=GERMAN_STRUCTURED_TRANSLATIONS +) + + def get_manifest() -> ModuleManifest: return manifest diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 8091b9b..d895419 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -25,7 +25,7 @@ class PollManifestTests(unittest.TestCase): self.assertIn("poll.signed_participation", {interface.name for interface in manifest.provides_interfaces}) self.assertIn("poll.governed_participation", {interface.name for interface in manifest.provides_interfaces}) self.assertIn(CAPABILITY_POLL_PARTICIPATION_GATEWAY, manifest.capability_factories) - self.assertEqual(manifest.version, "0.1.19") + self.assertEqual(manifest.version, "0.1.20") self.assertIn("poll:response:write", {permission.scope for permission in manifest.permissions}) for topic in manifest.documentation: