2 Commits
Author SHA1 Message Date
zemion 69416faca9 fix(webui): bind template lifecycle controls to help
Module Package Release / publish-packages (push) Successful in 12s
2026-08-24 11:36:45 +02:00
zemion ee6fbc784f docs: complete German structured documentation
Module Package Release / publish-packages (push) Successful in 11s
2026-08-24 01:15:41 +02:00
6 changed files with 72 additions and 6 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "govoplan-templates" name = "govoplan-templates"
version = "0.1.19" version = "0.1.21"
description = "GovOPlaN typed template library and deterministic printable rendering." description = "GovOPlaN typed template library and deterministic printable rendering."
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
+1 -1
View File
@@ -1,3 +1,3 @@
"""GovOPlaN Templates module.""" """GovOPlaN Templates module."""
__version__ = "0.1.19" __version__ = "0.1.21"
@@ -0,0 +1,58 @@
"""German translations for public structured documentation metadata."""
from __future__ import annotations
from typing import Any
GERMAN_STRUCTURED_TRANSLATIONS: dict[str, dict[str, Any]] = {'templates.data-subject-requests': {'consequence_classes': {'exclude_template_payloads': 'Gibt '
'keinen '
'Template-Inhalt '
'zurück '
'oder '
'rendert '
'Inputs '
'und '
'Outputs.',
'export_template_attribution': 'Returns '
'minimiert '
'Autor, '
'Publikation '
'und '
'Render-Aktivität.'}},
'templates.reference.fields-and-consequences': {'consequence_classes': {'delete_template': 'Verhindert '
'zukünftige '
'Auswahl, '
'ohne '
'beibehaltene '
'Revisionen '
'neu '
'zu '
'schreiben '
'oder '
'Nachweise '
'zu '
'erbringen.',
'publish_revision': 'Macht '
'die '
'ausgewählte '
'unveränderliche '
'Revision '
'für '
'die '
'Endverbraucherproduktion '
'geeignet.',
'render_final': 'Erstellt '
'gespeicherte '
'Render-Nachweise '
'und kann '
'ein '
'Artefakt '
'durch '
'Dateien '
'beibehalten.',
'save_revision': 'Erstellt '
'eine '
'neue '
'unveränderliche '
'Template-Revision.'}}}
+9 -1
View File
@@ -1,5 +1,8 @@
from __future__ import annotations from __future__ import annotations
from govoplan_core.core.modules import with_documentation_structured_translations
from govoplan_templates.backend.german_structured_documentation import GERMAN_STRUCTURED_TRANSLATIONS
from pathlib import Path from pathlib import Path
from govoplan_core.core.files import CAPABILITY_FILES_ARTIFACT_STORE from govoplan_core.core.files import CAPABILITY_FILES_ARTIFACT_STORE
@@ -40,7 +43,7 @@ from govoplan_templates.backend.dsar_provider import (
MODULE_ID = "templates" MODULE_ID = "templates"
MODULE_NAME = "Templates" MODULE_NAME = "Templates"
MODULE_VERSION = "0.1.19" MODULE_VERSION = "0.1.21"
READ_SCOPE = "templates:template:read" READ_SCOPE = "templates:template:read"
WRITE_SCOPE = "templates:template:write" WRITE_SCOPE = "templates:template:write"
@@ -545,5 +548,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
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@govoplan/templates-webui", "name": "@govoplan/templates-webui",
"version": "0.1.19", "version": "0.1.21",
"private": true, "private": true,
"type": "module", "type": "module",
"main": "src/index.ts", "main": "src/index.ts",
@@ -353,7 +353,7 @@ export default function TemplatesPage({ settings, auth }: Props) {
</span>} </span>}
helpAction={<DocumentationHelpLink reference={TEMPLATES_DOCUMENTATION} />} helpAction={<DocumentationHelpLink reference={TEMPLATES_DOCUMENTATION} />}
primaryActions={<> primaryActions={<>
<Button disabled={!selected || !canPublish || dirty || busy} disabledReason={busy ? TEMPLATES_I18N.busy : !selected ? TEMPLATES_I18N.noSelection : !canPublish ? TEMPLATES_I18N.publishReason : dirty ? TEMPLATES_I18N.saveBeforeAction : undefined} onClick={() => setPublishOpen(true)}><FileCheck2 size={16} /> Publish</Button> <Button helpContextId="templates.action.publish" helpModuleId="templates" disabled={!selected || !canPublish || dirty || busy} disabledReason={busy ? TEMPLATES_I18N.busy : !selected ? TEMPLATES_I18N.noSelection : !canPublish ? TEMPLATES_I18N.publishReason : dirty ? TEMPLATES_I18N.saveBeforeAction : undefined} onClick={() => setPublishOpen(true)}><FileCheck2 size={16} /> Publish</Button>
<SegmentedControl <SegmentedControl
value={view} value={view}
onChange={setView} onChange={setView}
@@ -361,7 +361,7 @@ export default function TemplatesPage({ settings, auth }: Props) {
ariaLabel="Template workspace" ariaLabel="Template workspace"
/> />
</>} </>}
destructiveActions={<IconButton label="Delete template" icon={<Trash2 size={17} />} variant="danger" disabled={!selected || readOnly} disabledReason={!selected ? TEMPLATES_I18N.noSelection : readOnly ? (canWrite ? TEMPLATES_I18N.readOnlyReason : TEMPLATES_I18N.writeReason) : undefined} onClick={() => setDeleteOpen(true)} />} destructiveActions={<IconButton label="Delete template" helpContextId="templates.action.delete" helpModuleId="templates" icon={<Trash2 size={17} />} variant="danger" disabled={!selected || readOnly} disabledReason={!selected ? TEMPLATES_I18N.noSelection : readOnly ? (canWrite ? TEMPLATES_I18N.readOnlyReason : TEMPLATES_I18N.writeReason) : undefined} onClick={() => setDeleteOpen(true)} />}
discardAction={{ label: "Discard and reload", onClick: () => requestDiscard(() => void reload(selectedId)), disabled: !selected }} discardAction={{ label: "Discard and reload", onClick: () => requestDiscard(() => void reload(selectedId)), disabled: !selected }}
saveAction={{ saveAction={{
label: <><Save size={16} /> Save revision</>, label: <><Save size={16} /> Save revision</>,