Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b560e06715 | ||
|
|
a8f6e972bf | ||
|
|
dbf0246c4a | ||
|
|
ba7b2bca57 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@govoplan/learning",
|
"name": "@govoplan/learning",
|
||||||
"version": "0.1.16",
|
"version": "0.1.20",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "GovOPlaN Learning platform module seed.",
|
"description": "GovOPlaN Learning platform module seed.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
+3
-3
@@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "govoplan-learning"
|
name = "govoplan-learning"
|
||||||
version = "0.1.16"
|
version = "0.1.20"
|
||||||
description = "GovOPlaN Learning platform module seed."
|
description = "GovOPlaN Learning platform module seed."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
authors = [{ name = "GovOPlaN" }]
|
authors = [{ name = "GovOPlaN" }]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"govoplan-core>=0.1.16",
|
"govoplan-core>=0.1.18",
|
||||||
"govoplan-access>=0.1.16",
|
"govoplan-access>=0.1.18",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
"""German translations for public structured documentation metadata."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
|
||||||
|
GERMAN_STRUCTURED_TRANSLATIONS: dict[str, dict[str, Any]] = {'learning.module-boundary': {'consequence_classes': {'seed_boundary': 'Erklärt nur Besitz und '
|
||||||
|
'Berechtigungen an; es ist '
|
||||||
|
'noch kein '
|
||||||
|
'Laufzeit-Workflow '
|
||||||
|
'verfügbar.'}}}
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from govoplan_core.core.modules import with_documentation_structured_translations
|
||||||
|
from govoplan_learning.backend.german_structured_documentation import GERMAN_STRUCTURED_TRANSLATIONS
|
||||||
|
|
||||||
from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER
|
from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER
|
||||||
from govoplan_core.core.modules import DocumentationLink, DocumentationTopic, ModuleManifest, PermissionDefinition, RoleTemplate
|
from govoplan_core.core.modules import DocumentationLink, DocumentationTopic, ModuleManifest, PermissionDefinition, RoleTemplate
|
||||||
from govoplan_core.core.provider_governance import declared_module_architecture
|
from govoplan_core.core.provider_governance import declared_module_architecture
|
||||||
|
|
||||||
MODULE_ID = "learning"
|
MODULE_ID = "learning"
|
||||||
MODULE_NAME = "Learning"
|
MODULE_NAME = "Learning"
|
||||||
MODULE_VERSION = "0.1.16"
|
MODULE_VERSION = "0.1.20"
|
||||||
READ_SCOPE = "learning:workspace:read"
|
READ_SCOPE = "learning:workspace:read"
|
||||||
WRITE_SCOPE = "learning:workspace:write"
|
WRITE_SCOPE = "learning:workspace:write"
|
||||||
ADMIN_SCOPE = "learning:workspace:admin"
|
ADMIN_SCOPE = "learning:workspace:admin"
|
||||||
@@ -70,6 +73,13 @@ DOCUMENTATION = (
|
|||||||
layer="available",
|
layer="available",
|
||||||
documentation_types=("admin", "user"),
|
documentation_types=("admin", "user"),
|
||||||
audience=("user", "operator", "module_admin", "product_owner"),
|
audience=("user", "operator", "module_admin", "product_owner"),
|
||||||
|
translations={
|
||||||
|
"de": {
|
||||||
|
"title": "Modulgrenze von Learning",
|
||||||
|
"summary": "Kursplanung und -buchung, Teilnehmendenlisten, Anwesenheit, Zertifikate, Zuweisung von Lehrkräften, Räume, Materialien und Evaluationen für Fortbildungen im öffentlichen Dienst.",
|
||||||
|
"body": "Dieses Repository ist derzeit ein Grundgerüst für ein Plattformmodul. Es registriert die Fachgrenze, Berechtigungsoberfläche, Rollenvorlagen und Dokumentationsmetadaten, bevor Laufzeit-APIs, Datenbankmodelle, Migrationen und WebUI-Routen eingeführt werden.",
|
||||||
|
}
|
||||||
|
},
|
||||||
order=100,
|
order=100,
|
||||||
related_modules=OPTIONAL_DEPENDENCIES,
|
related_modules=OPTIONAL_DEPENDENCIES,
|
||||||
links=(
|
links=(
|
||||||
@@ -80,7 +90,11 @@ DOCUMENTATION = (
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
metadata={
|
metadata={
|
||||||
|
"kind": "reference",
|
||||||
"seed": True,
|
"seed": True,
|
||||||
|
"consequence_classes": {
|
||||||
|
"seed_boundary": "Declares ownership and permissions only; no runtime workflow is available yet.",
|
||||||
|
},
|
||||||
"domain_objects": ['course catalogue', 'course sessions', 'participant enrolment', 'attendance facts', 'trainer and material allocation', 'evaluation records'],
|
"domain_objects": ['course catalogue', 'course sessions', 'participant enrolment', 'attendance facts', 'trainer and material allocation', 'evaluation records'],
|
||||||
"first_slice": "Define course, session, participant, attendance, and certificate handoff concepts, then add tenant-local course administration.",
|
"first_slice": "Define course, session, participant, attendance, and certificate handoff concepts, then add tenant-local course administration.",
|
||||||
},
|
},
|
||||||
@@ -109,5 +123,10 @@ manifest = ModuleManifest(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
manifest = with_documentation_structured_translations(
|
||||||
|
manifest, locale="de", translations=GERMAN_STRUCTURED_TRANSLATIONS
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_manifest() -> ModuleManifest:
|
def get_manifest() -> ModuleManifest:
|
||||||
return manifest
|
return manifest
|
||||||
|
|||||||
@@ -15,6 +15,15 @@ class ManifestSeedTests(unittest.TestCase):
|
|||||||
self.assertEqual({permission.scope for permission in manifest.permissions}, {READ_SCOPE, WRITE_SCOPE, ADMIN_SCOPE})
|
self.assertEqual({permission.scope for permission in manifest.permissions}, {READ_SCOPE, WRITE_SCOPE, ADMIN_SCOPE})
|
||||||
self.assertEqual({role.slug for role in manifest.role_templates}, {"learning_manager", "learning_viewer"})
|
self.assertEqual({role.slug for role in manifest.role_templates}, {"learning_manager", "learning_viewer"})
|
||||||
self.assertTrue(manifest.documentation)
|
self.assertTrue(manifest.documentation)
|
||||||
|
topic = manifest.documentation[0]
|
||||||
|
self.assertEqual("reference", topic.metadata["kind"])
|
||||||
|
self.assertIn("seed_boundary", topic.metadata["consequence_classes"])
|
||||||
|
self.assertTrue(
|
||||||
|
all(
|
||||||
|
topic.translations.get("de", {}).get(field)
|
||||||
|
for field in ("title", "summary", "body")
|
||||||
|
)
|
||||||
|
)
|
||||||
self.assertIsNone(manifest.route_factory)
|
self.assertIsNone(manifest.route_factory)
|
||||||
self.assertIsNone(manifest.migration_spec)
|
self.assertIsNone(manifest.migration_spec)
|
||||||
self.assertIsNone(manifest.frontend)
|
self.assertIsNone(manifest.frontend)
|
||||||
|
|||||||
Reference in New Issue
Block a user