Submission generator: language selector (DE / EN) to drive output document language #108
Open
opened 2026-05-25 14:24:15 +00:00 by mAi
·
2 comments
No Branch/Tag Specified
main
mai/planck/coder-b5-b6-train-share
mai/archimedes/fixer-port-engine
mai/maxwell/coder-b4-akte-mode
mai/lorenz/coder-b3-event-triggered
mai/euler/fixer-builder-add
mai/brunel/fixer-prod-500s-after-b1
mai/galileo/coder-b1-b2-mvp-train
mai/pasteur/fixer-pkg-litigationplann
mai/newton/coder-b0-scenario-db
mai/edison/inventor-prd-columnar
mai/knuth/coder-workflow-tracker
mai/atlas/inventor-extend-tools
mai/cronus/inventor-unified
mai/atlas/inventor-deadline-system
mai/atlas/inventor-followup-rules
mai/athena/consultant-deadline
mai/brunel/fixer-dark-mode-support
mai/knuth/coder-cronus-fristenrechn
mai/ritchie/coder-mig-153-proceeding
mai/atlas/inventor-proceeding
mai/cronus/inventor-fristenrechner
mai/curie/coder-mig152-clone-dedupe
mai/darwin/researcher-lexy-draft
mai/knuth/coder-dedupe-null
mai/cronus/coder-composer-slice-f
mai/cronus/coder-composer-slice-e
mai/cronus/coder-composer-slice-d
mai/curie/coder-slice-b6-url-rename
mai/curie/coder-slice-b5-go-rename
mai/cronus/coder-composer-slice-c
mai/curie/coder-slice-b4-destructive-drop
mai/cronus/coder-composer-slice-b
mai/cronus/coder-composer-slice-a
mai/cronus/inventor-prd-for
mai/knuth/coder-verfahrensablauf
mai/ritchie/coder-make-backup
mai/diesel/fixer-dark-mode-css
mai/curie/coder-slice-b3-read-cutover
mai/diesel/fixer-verfahrensablauf
mai/curie/coder-slice-b2-dual-write
mai/cronus/coder-slice-d-scenarios
mai/knuth/coder-backfill-applies
mai/hermes/gitster-verfahrensablauf
mai/cronus/coder-berufung-labels-refactor
mai/diesel/hotfix-2-mig-134-missing
mai/curie/coder-slice-b1-procedural-events
mai/cronus/coder-slice-c-upc-snapshot
mai/brunel/hotfix-rename-upc-apl
mai/cronus/coder-slice-b3-primary-party
mai/cronus/coder-slice-b2-catalog-query
mai/cronus/inventor-litigation-slice-b
mai/curie/researcher-slice-b-zero
mai/cronus/inventor-litigation
mai/artemis/gitster-remove-admin
mai/ritchie/coder-sort-post-trigger
mai/knuth/coder-conditional-label
mai/hermes/coder-verfahrensablauf
mai/brunel/rebase-121-conditional
mai/knuth/coder-conditional-rule
mai/hermes/gitster-dark-mode-fix
mai/ritchie/coder-submission-form
mai/artemis/gitster-re-surface
mai/brunel/fixer-views-any-filters
mai/cronus/coder-cicd-slice-a
mai/knuth/coder-wave-1-tier-1-rule
mai/ritchie/coder-upc-damages-add
mai/cronus/inventor-ci-cd-pre
mai/brunel/rebase-108-language
mai/hermes/gitster-admin-rules-list
mai/artemis/gitster-submission
mai/icarus/gitster-verfahrensablauf
mai/orpheus/gitster-search-input
mai/atlas/coder-event-card-choices-slice-ab
mai/hermes/gitster-date-range
mai/demeter/gitster-submission
mai/knuth/coder-hl-patents-style
mai/hermes/gitster-draft-editor
mai/atlas/inventor-per-event-card
mai/knuth/coder-deadline-rule-tier
mai/cronus/coder-procedural-events-slice-a
mai/hermes/gitster-deadline-form
mai/artemis/gitster-add-missing-i18n
mai/demeter/gitster-paliadin-chat
mai/brunel/wave0-tier0-deadline-fixes
mai/artemis/coder-docker-compose-yml
mai/icarus/coder-inbox-overhaul-slice-a
mai/atlas/coder-date-range-picker-slice-a
mai/brunel/fixer-de-inf-lg-cfi
mai/cronus/inventor-procedural
mai/hermes/gitster-event-type-modal
mai/cronus/coder-backup-mode
mai/curie/researcher-bulletproof
mai/hermes/gitster-draft-editor-focus-jump
mai/cronus/inventor-backup-mode
mai/hermes/gitster-submissions
mai/artemis/gitster-deadline-form
mai/brunel/fixer-submission-preview
mai/brunel/fixer-test-data-reset
mai/artemis/gitster-approval-withdraw
mai/demeter/gitster-events
mai/hermes/gitster-sidebar-loses
mai/hermes/gitster-browse-a
mai/brunel/fixer-submissions-demo
mai/icarus/inventor-inbox-overhaul
mai/atlas/inventor-symmetric-date
mai/artemis/gitster-demote-daten
mai/hermes/gitster-team-view-mailto
mai/knuth/coder-global-schriftsatze
mai/knuth/coder-schriftsatze
mai/ritchie/coder-author-demo-docx
mai/knuth/coder-add-schriftsatze
mai/knuth/coder-add-checklist
mai/knuth/coder-anchor-lookup-must
mai/tesla/dashboard-resize-clamp
mai/knuth/coder-demote-projekt
mai/knuth/coder-paliadin-chat
mai/knuth/coder-print-views
mai/knuth/coder-add-proceeding
mai/knuth/coder-submission
mai/ritchie/coder-extend-team-email
mai/knuth/coder-changelog-catch-up
mai/tesla/dashboard-overlap
mai/pasteur/fixercoder-dashboard
mai/newton/inventor-configurable
mai/dirac/inventorcoder-user
mai/gauss/inventorcoder-team-admin
mai/kepler/inventorcoder-project
mai/darwin/roadmap-ccr-en
mai/euler/coder-small-ux-polish
mai/darwin/fristenrechner-cleanup
mai/darwin/fixercoder-priority-bug
mai/leibniz/inventor-caldav-multi
mai/hertz/inventor-unified-modal
mai/archimedes/inventor-excel-data
mai/boltzmann/inventor-gap-tolerant
mai/copernicus/submission-slice-1
mai/fermi/interactive-session
mai/hertz/inventor-suggest-changes
mai/copernicus/inventor-submission
mai/mendel/test-strategy-slice-1
mai/mendel/inventor-test-strategy
mai/ampere/custom-views-improvements
mai/joule/mig-097-apply-huygens-s
mai/ohm/workstream-b-rename
mai/huygens/workstream-a-backfill
mai/kelvin/t-204-phase-2-proceeding
mai/bohr/ingest-t-paliad-203-rule
mai/curie/fristenrechner-gap
mai/maxwell/inbox-grey-out
mai/rutherford/slice-9-follow-up-b-re
mai/dirac/slice-9-follow-up-a
mai/bose/determinator-cascade-slice-3
mai/bose/determinator-cascade-slice-2
mai/bose/determinator-row-cascade
mai/lorenz/fristen-phase-3-slice-9
mai/curie/fristen-phase-3-slice-12
mai/planck/aichat-phase-b-paliad
mai/young/fristen-phase-3-slice-11b
mai/lorenz/fristen-phase-3-slice-11a
mai/lorenz/fristen-phase-3-slice-10
mai/lorenz/fristen-phase-3-slice-8
mai/lorenz/fristen-phase-3-slice-7
mai/lorenz/fristen-phase-3-slice-6
mai/lorenz/fristen-phase-3-slice-5
mai/lorenz/fristen-phase-3-slice-4
mai/lorenz/fristen-phase-3-slice-3
mai/lorenz/fristen-phase-3-slice-2
mai/lorenz/fristen-phase-3-slice-1
mai/pauli/fristen-phase2-design
mai/tesla/project-timeline-chart
mai/pauli/fristen-logic-audit
mai/pauli/determinator-b1-row-by
mai/noether/tools-cleanup-slice-1
mai/kelvin/inventor-tools-surface
mai/planck/paliadin-per-user-rls
mai/maxwell/bug-bundle-filterbar
mai/faraday/project-timeline-chart
mai/schroedinger/smarttimeline-slice-4
mai/bohr/smarttimeline-slice-3
mai/gauss/smarttimeline-slice-2
mai/riemann/filterbar-phase-2-slice
mai/lagrange/smarttimeline-design-the
mai/curie/researcher-determinator
mai/noether/collapse-regel-typ-on
mai/riemann/inventor-universal
mai/minkowski/project-level-our-side
mai/dirac/inventor-inline-paliadin
mai/feynman/fristenrechner
mai/minkowski/navbar-dashboard-reorg
mai/shannon/approval-rework
mai/einstein/consultant-deadline-data
mai/curie/researcher-upc-rop-audit
mai/noether/paliadin-real-claude
mai/noether/inventor-paliadin
mai/hilbert/inventor-approval-policy
mai/shannon/bug-frist-due-date
mai/fritz/bug-fristen-termine
mai/godel/inventor-projects-page
mai/fritz/bug-paliadin-chat
mai/kepler/inventor-profession-vs
mai/noether/inventor-paliadin-in-app
mai/fritz/bulk-team-email-send-to
mai/noether/inventor-local-chat-for
mai/noether/inventor-data-display
mai/fritz/bug-derived-team-members
mai/fritz/bug-sidebar-visibly
mai/noether/inventor-project
mai/shannon/bug-project-team-add
mai/cronus/inventor-dual-control
mai/fritz/bug-edit-mode-on
mai/cronus/inventor-holidays-per
mai/ritchie/phase-h-ai-deadline
No results found.
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: m/paliad#108
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
m's report (2026-05-25 16:22)
Scope
The submission generator currently produces output in the language baked into the template body (mostly DE for the demo templates). m wants the user to explicitly pick the output language (DE or EN) on the draft editor, and the generator should:
de.inf.lg.erwidg.docxvsde.inf.lg.erwidg.en.docx).{{procedural_event.name_de}}vs{{procedural_event.name_en}}).What to do
Backend
languagecolumn topaliad.submission_drafts(text NOT NULL DEFAULT 'de', CHECK in ('de','en')). Migration 129+ (verify slot).SubmissionVarsService.Buildalready returns both_deand_envariants; introduce alanguageparameter that selects the right one for unsuffixed placeholders (e.g.{{procedural_event.name}}becomes the language-matched value).{code}.{lang}.docx) → fallback to unsuffixed → fallback to_skeleton.{lang}.docx→ universal HL skeleton.?language=de|enquery OR reads from the draft row.Frontend
Sprache: ● DE ○ EN.i18n
submission.draft.language,submission.draft.language.de,submission.draft.language.en,submission.draft.language.fallback_notice.Files most likely touched
internal/models/models.go— addLanguagetoSubmissionDraftinternal/db/migrations/12X_submission_drafts_language.up.sqlinternal/services/submission_vars.go— language-aware resolutioninternal/services/submission_templates.go— language-suffixed template lookupinternal/handlers/submissions.go+submission_drafts.gofrontend/src/submission-draft.tsx/client/submission-draft.tsfrontend/src/client/i18n.ts+frontend/src/i18n-keys.tsHard rules
de(per project CLAUDE.md primary-language convention).devia the column default.go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/submission-draft-language-selector.Out of scope
Reporting
mai report completedwith branch + SHAs + migration slot + UX path: open a draft → switch language toggle → confirm preview re-renders with EN labels + EN-suffixed values → export → docx is EN.Shipped (gitster: demeter)
Branch:
mai/demeter/gitster-submissionCommit: 669764e
Migration slot: 130 (bumped from 129 to deconflict with atlas's #96, per paliadin instruction)
Backend
paliad.submission_drafts.language text NOT NULL DEFAULT 'de'(CHECK in('de','en')). Existing rows inheritdevia the default — every legacy draft renders byte-for-byte identically.SubmissionVarsContext.Langoverrides the user's UI lang.Build()uses it when set; falls back touser.Langotherwise, so Slice 1's format-only/generatekeeps working unchanged.SubmissionDraftService.BuildRenderBagthreadsdraft.Languagethrough;Create/EnsureLatestseed from the UI lang (DE default).DraftPatch.Languageadded;Updatevalidates and rejects values outside{de,en}. Both project-scoped and global PATCH endpoints surface the field.resolveSubmissionTemplate(ctx, code, lang)replaces the lang-less predecessor. Returns the matched tier (per_code_lang/per_code/skeleton_lang/skeleton/letterhead) so the editor knows whether the resolved template language-matches the request.fileRegistryregisters the EN skeleton siblingsubmission/_skeleton.en.docxalongside the DE one. Per-code EN variants land insubmissionTemplateENRegistry(empty for now — HLC authors per{code}.en.docx). Gitea 404s on missing variants fall through silently.POST /api/projects/{id}/submissions/{code}/generateaccepts?language=de|enoverride; defaults to the user's UI lang.Frontend
frontend/src/submission-draft.tsx. Switching the radio PATCHeslanguageand the server returns the freshly-resolved bag + preview HTML so the lawyer sees EN values immediately without a reload.submissions.draft.language[.de|.en|.fallback_notice]..submission-draft-language-row,.submission-draft-language-fallback).Tests
services.TestNormalizeDraftLanguagecovers DE / EN / case / whitespace / unknown.services.TestAddRuleVars_LanguageSelectsMatchedNamepinsprocedural_event.name(and the legacyrule.namealias) to the language-matched value across DE + EN; explicit_de/_enkeys stay unchanged regardless of lang.handlers.TestLanguageFallbacktruth table for all 10 (lang × tier) combinations — pins which tier counts as a fallback for the UI signal.go test ./internal/...).UX path
/projects/{id}/submissions/{code}/draft/{draft_id}).PATCH /api/submission-drafts/{id}with{language:"en"}→ server returns updated view withlang="en",language_fallback=true, EN-resolved values forprocedural_event.name,our_side_en, etc.Statement of Defence-{case}-{YYYY-MM-DD}.docx(file name picks EN viarule.NameEN).tplTierPerCodefor DE drafts counts as first-class).Out of scope (deferred per task brief)
submission/{code}.en.docxandsubmission/_skeleton.en.docx. Registry slot already exists; today it falls through to DE.Build hygiene
go build ./...clean.go vet ./...clean.go test ./internal/...clean.cd frontend && bun run buildclean (2877 i18n keys, data-i18n scan clean).Note on coordination
Paliadin flagged mid-flight that atlas's #96 also claimed slot 129. Migration was renamed to 130 before commit — no Go code references the slot number, so the rename was a single
mvpair.Rebased onto main (post-knuth #107 merge)
Branch:
mai/demeter/gitster-submission@ af7a1e9 (force-pushed; previous SHA669764e).Conflicts resolved per paliadin's coordination note — kept BOTH contributions:
internal/handlers/files.gofirmSkeletonSubmissionSlugregistry entry + const (HL-formatted skeleton).skeletonSubmissionENSlugregistry entry + const (EN skeleton sibling).internal/handlers/submission_drafts.go(resolveSubmissionTemplate)Merged the firm-skeleton tier (t-paliad-275) with the language-aware lookup (t-paliad-276). Final fallback order:
de.inf.lg.erwidg.en.docxetc. (most specific)_skeleton.en.docx; only fires for EN drafts since DE drafts prefer the firm-skeleton (step 4)._firm-skeleton.docx(HL styles, DE prose). First-class for DE drafts; counts aslanguage_fallback=truefor EN drafts (handled bylanguageFallback())._skeleton.docx(plain DE, backstop)The
tplTierSkeletonLangtier still trumps any DE skeleton for EN drafts, so an EN draft with a registered_skeleton.en.docxgets a language-matched preview even when no per-code template exists.Build hygiene
go build ./...clean.go vet ./...clean.go test ./internal/...clean (all 3 new tests + every pre-existing test pass).cd frontend && bun run buildclean.Ready for merge.