i18n: the community's primary language sets each service's default language — Nextcloud, Collabora, Paperless, Omeka, sign-in, emails #2122

Open
opened 2026-11-03 18:40:17 +00:00 by ben · 5 comments
Owner

What

Founding records the community's primary language (PrimaryLanguage in internal/founding/draft.go, chosen on P1 community details, ADR 0232 decision 7), but nothing downstream reads it. Every service a community runs comes up in English regardless: Nextcloud, Collabora, Paperless, Omeka, the kanidm sign-in pages, and the emails the gateway sends.

A community that founds in Español should find its members' services in Español.

Scope

  • Carry the primary language from the founding draft into the community's config (the clan config internal/clan renders) as a community fact.
  • For each service, set its default language from it at deploy time, in the service's own config: Nextcloud default_language/default_locale, Collabora UI language, Paperless PAPERLESS_* locale, Omeka default locale, kanidm (check what it supports), and system email templates.
  • A per-service support table in the ticket's PR: which of en/es/nl/fr/pt each service supports, and the fallback where it doesn't. Also record whether each supports Te Reo Māori (mi) — it isn't one of the five yet, but it's the likely next one.
  • Members' own per-user language choice inside a service still wins over the community default (don't force-overwrite user settings).
  • A redeploy with a changed primary language updates the defaults (this pairs with the panel setting ticket).

Acceptance

  • A community founded with es serves Nextcloud, Paperless, Omeka and the sign-in page in Spanish to a fresh member, proved by a render test per service and one live drive.
  • en communities are byte-for-byte unchanged.

Notes

Found while answering "what's left for full multi-language" (session 2026-11-03). Related: ADR 0232, DDR 0300 decision 6.

## What Founding records the community's **primary language** (`PrimaryLanguage` in `internal/founding/draft.go`, chosen on P1 community details, ADR 0232 decision 7), but nothing downstream reads it. Every service a community runs comes up in English regardless: Nextcloud, Collabora, Paperless, Omeka, the kanidm sign-in pages, and the emails the gateway sends. A community that founds in Español should find its members' services in Español. ## Scope - [ ] Carry the primary language from the founding draft into the community's config (the clan config `internal/clan` renders) as a community fact. - [ ] For each service, set its **default** language from it at deploy time, in the service's own config: Nextcloud `default_language`/`default_locale`, Collabora UI language, Paperless `PAPERLESS_*` locale, Omeka default locale, kanidm (check what it supports), and system email templates. - [ ] A per-service support table in the ticket's PR: which of en/es/nl/fr/pt each service supports, and the fallback where it doesn't. Also record whether each supports Te Reo Māori (`mi`) — it isn't one of the five yet, but it's the likely next one. - [ ] Members' own per-user language choice inside a service still wins over the community default (don't force-overwrite user settings). - [ ] A redeploy with a changed primary language updates the defaults (this pairs with the panel setting ticket). ## Acceptance - [ ] A community founded with `es` serves Nextcloud, Paperless, Omeka and the sign-in page in Spanish to a fresh member, proved by a render test per service and one live drive. - [ ] `en` communities are byte-for-byte unchanged. ## Notes Found while answering "what's left for full multi-language" (session 2026-11-03). Related: ADR 0232, DDR 0300 decision 6.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Category: enhancement. State: ready-for-agent.

Ruling. The founding fact already exists — PrimaryLanguage at internal/founding/draft.go:102 — it is simply not read downstream. The work is backend code: carry that fact into the clan config and set each service's own default-language key at deploy, with a per-service support table. No UI surface, so the missing-design gate does not fire; the per-service "which languages / what fallback / Te Reo Māori" questions are investigations, not human decisions.

Why a two-way door. en communities stay byte-for-byte unchanged (the acceptance says so), members' own per-user choices still win, and each service default is provable by a render test per service — an existing test shape. All of it revertible by commit/config.

Carve-out on the live-drive acceptance. The "one live drive" proof needs live-infrastructure standing an unattended swarm worker does not have; it belongs to the standing drive checklist (#2055), not this build. The agent's definition of done here is: the clan-config carry, each service's default wired from it, the support table, and the per-service render tests. The live-drive proof is tracked downstream and is not an agent blocker.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Category:** enhancement. **State:** `ready-for-agent`. **Ruling.** The founding fact already exists — `PrimaryLanguage` at `internal/founding/draft.go:102` — it is simply not read downstream. The work is backend code: carry that fact into the clan config and set each service's own default-language key at deploy, with a per-service support table. No UI surface, so the missing-design gate does not fire; the per-service "which languages / what fallback / Te Reo Māori" questions are investigations, not human decisions. **Why a two-way door.** `en` communities stay byte-for-byte unchanged (the acceptance says so), members' own per-user choices still win, and each service default is provable by a render test per service — an existing test shape. All of it revertible by commit/config. **Carve-out on the live-drive acceptance.** The "one live drive" proof needs live-infrastructure standing an unattended swarm worker does not have; it belongs to the standing drive checklist (#2055), not this build. The agent's definition of done here is: the clan-config carry, each service's default wired from it, the support table, and the per-service render tests. The live-drive proof is tracked downstream and is not an agent blocker.

⏩ independent reviewer for #2122 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2122 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #2122 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261103-190554-769a31 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 2122,
  "status": "success",
  "commits": [
    "95bbdb4959e901575a5174ded01e41318976772e"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/resting_composition.go",
    "docs/i18n/service-language-support.md",
    "internal/clan/archive.go",
    "internal/clan/archive_attach.go",
    "internal/clan/archive_attach_test.go",
    "internal/clan/archive_test.go",
    "internal/clan/clan.go",
    "internal/clan/community.go",
    "internal/clan/community_test.go",
    "internal/clan/config.go",
    "internal/clan/files.go",
    "internal/clan/files_attach.go",
    "internal/clan/files_attach_test.go",
    "internal/clan/files_test.go",
    "internal/clan/testing/fake.go",
    "internal/founding/deploy.go",
    "internal/founding/privatepath.go",
    "internal/founding/selfhostedpath.go",
    "internal/rescue/deviceladder_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ ./internal/founding/ ./internal/rescue/",
      "exit_code": 0
    },
    {
      "command": "go vet ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: gofmt + go build/vet/test ./... + golangci-lint, incl. broker)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Carry the primary language from the founding draft into the community's config as a community fact": "internal/clan/community.go: communityLanguagePath 'idss/primary-language' + ReadCommunityLanguage/WriteCommunityLanguage through the single writer; on the Config interface (clan.go/config.go), the fake (testing/fake.go) and the two other implementers (resting_composition.go, deviceladder_test.go). Round-tripped by TestCommunityLanguage_RoundTripsAndRefusesUnknown.",
    "For each service, set its default language from it at deploy time": "Wired where a server-side default exists: Nextcloud default_language/default_locale (files.go nextcloudLangLocale) and Omeka OMEKA_LOCALE (archive.go omekaLocale); each service's attach reads the resting fact (files_attach.go, archive_attach.go). No server-side UI default for Collabora (inherits via WOPI), Paperless (browser-driven; OCR is a separate operator choice), kanidm/sign-in and emails (need Go-side i18n catalogue, split to #2132/#2133) — recorded in docs/i18n/service-language-support.md.",
    "A per-service support table (en/es/nl/fr/pt + fallback + Te Reo Maori mi)": "docs/i18n/service-language-support.md — full per-service table incl. key, value mapping, fallback and mi (valid code, no upstream translation yet -> English fallback everywhere).",
    "Members' own per-user language choice still wins over the community default": "Nextcloud default_language/default_locale are documented when-unset defaults (NixOS/Nextcloud semantics); Omeka OMEKA_LOCALE is the install default, a logged-in member's own locale still applies. No per-user setting is overwritten. Recorded in the doc and in the field comments.",
    "A redeploy with a changed primary language updates the defaults": "Each service's attach reads the resting idss/primary-language fact off the config repo every run (TestAttachFiles_ReadsCommunityLanguage, TestAttachArchive_ReadsCommunityLanguage), so re-rendering with a changed fact updates the default. The panel Settings control to change the fact is OWED (DDR 0300 d.6), out of scope here.",
    "A community founded with es serves Nextcloud/Paperless/Omeka/sign-in in Spanish (render test per service)": "Nextcloud: TestRenderFiles_PrimaryLanguageSetsNextcloudDefault + TestAttachFiles_ReadsCommunityLanguage. Omeka: TestRenderArchive_PrimaryLanguageSetsOmekaLocale + TestAttachArchive_ReadsCommunityLanguage. Paperless: no server-side UI default exists (finding, docs/i18n) — UI follows the browser; sign-in page: IDSS-owned but needs Go-side i18n catalogue, split to #2124->#2132. The 'one live drive' proof is carved out to #2055 by triage.",
    "en communities are byte-for-byte unchanged": "TestRenderFiles_EnglishAndUnmappedLanguageUnchanged and TestRenderArchive_EnglishAndUnmappedLanguageUnchanged assert '', 'en', 'mi', 'xx' render byte-identical to the no-language baseline."
  },
  "summary": "The community's primary language is now a config-repo fact that sets Nextcloud's and Omeka's default language at deploy; services with no server-side UI default are documented, with sign-in/email i18n split to #2132/#2133.",
  "blockers": []
}
**close-report** for #2122 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261103-190554-769a31` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2122, "status": "success", "commits": [ "95bbdb4959e901575a5174ded01e41318976772e" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/resting_composition.go", "docs/i18n/service-language-support.md", "internal/clan/archive.go", "internal/clan/archive_attach.go", "internal/clan/archive_attach_test.go", "internal/clan/archive_test.go", "internal/clan/clan.go", "internal/clan/community.go", "internal/clan/community_test.go", "internal/clan/config.go", "internal/clan/files.go", "internal/clan/files_attach.go", "internal/clan/files_attach_test.go", "internal/clan/files_test.go", "internal/clan/testing/fake.go", "internal/founding/deploy.go", "internal/founding/privatepath.go", "internal/founding/selfhostedpath.go", "internal/rescue/deviceladder_test.go" ], "tests": [ { "command": "go test ./internal/clan/ ./internal/founding/ ./internal/rescue/", "exit_code": 0 }, { "command": "go vet ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: gofmt + go build/vet/test ./... + golangci-lint, incl. broker)", "exit_code": 0 } ], "criteria": { "Carry the primary language from the founding draft into the community's config as a community fact": "internal/clan/community.go: communityLanguagePath 'idss/primary-language' + ReadCommunityLanguage/WriteCommunityLanguage through the single writer; on the Config interface (clan.go/config.go), the fake (testing/fake.go) and the two other implementers (resting_composition.go, deviceladder_test.go). Round-tripped by TestCommunityLanguage_RoundTripsAndRefusesUnknown.", "For each service, set its default language from it at deploy time": "Wired where a server-side default exists: Nextcloud default_language/default_locale (files.go nextcloudLangLocale) and Omeka OMEKA_LOCALE (archive.go omekaLocale); each service's attach reads the resting fact (files_attach.go, archive_attach.go). No server-side UI default for Collabora (inherits via WOPI), Paperless (browser-driven; OCR is a separate operator choice), kanidm/sign-in and emails (need Go-side i18n catalogue, split to #2132/#2133) — recorded in docs/i18n/service-language-support.md.", "A per-service support table (en/es/nl/fr/pt + fallback + Te Reo Maori mi)": "docs/i18n/service-language-support.md — full per-service table incl. key, value mapping, fallback and mi (valid code, no upstream translation yet -> English fallback everywhere).", "Members' own per-user language choice still wins over the community default": "Nextcloud default_language/default_locale are documented when-unset defaults (NixOS/Nextcloud semantics); Omeka OMEKA_LOCALE is the install default, a logged-in member's own locale still applies. No per-user setting is overwritten. Recorded in the doc and in the field comments.", "A redeploy with a changed primary language updates the defaults": "Each service's attach reads the resting idss/primary-language fact off the config repo every run (TestAttachFiles_ReadsCommunityLanguage, TestAttachArchive_ReadsCommunityLanguage), so re-rendering with a changed fact updates the default. The panel Settings control to change the fact is OWED (DDR 0300 d.6), out of scope here.", "A community founded with es serves Nextcloud/Paperless/Omeka/sign-in in Spanish (render test per service)": "Nextcloud: TestRenderFiles_PrimaryLanguageSetsNextcloudDefault + TestAttachFiles_ReadsCommunityLanguage. Omeka: TestRenderArchive_PrimaryLanguageSetsOmekaLocale + TestAttachArchive_ReadsCommunityLanguage. Paperless: no server-side UI default exists (finding, docs/i18n) — UI follows the browser; sign-in page: IDSS-owned but needs Go-side i18n catalogue, split to #2124->#2132. The 'one live drive' proof is carved out to #2055 by triage.", "en communities are byte-for-byte unchanged": "TestRenderFiles_EnglishAndUnmappedLanguageUnchanged and TestRenderArchive_EnglishAndUnmappedLanguageUnchanged assert '', 'en', 'mi', 'xx' render byte-identical to the no-language baseline." }, "summary": "The community's primary language is now a config-repo fact that sets Nextcloud's and Omeka's default language at deploy; services with no server-side UI default are documented, with sign-in/email i18n split to #2132/#2133.", "blockers": [] } ``` </details>

🚨 Reopened — a push-mode close did NOT land on main (#283). close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (push-rescue-unreachable), so origin/main never carried the commits (95bbdb4959e901575a5174ded01e41318976772e). The gates-passed comment above is therefore NOT true of main. Reopening and relabelling ready-for-session so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).

:rotating_light: **Reopened — a push-mode close did NOT land on `main` (#283).** close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (`push-rescue-unreachable`), so `origin/main` never carried the commits (`95bbdb4959e901575a5174ded01e41318976772e`). The gates-passed comment above is therefore NOT true of `main`. Reopening and relabelling `ready-for-session` so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).

Landed on main (push mode): the keystone + Nextcloud, end to end. Commit a8987221.

This ticket is epic-sized (6 services + a live drive). I built the shared dependency and the first service completely and provably, documented every service's real mechanism, and filed the remainder as follow-ups. What a standing session cannot finish is a one-way door (the live drive) and a design question (sign-in) — so this routes to a human.

What landed (two-way, proven):

  • Keystone — the config-repo fact idss/community-language (clan.WriteCommunityLanguage / ReadCommunityLanguage / SupportedLanguage, internal/clan/community.go), beside the size band, written at all three founding deploy paths from the P1 primary-language answer. Recorded only for a non-en supported code (en/es/nl/fr/pt): en is the authoritative default, recorded by absence, so an en community writes no doc and every service renders byte-identically to before (acceptance 2).
  • Seam — provision.WithCommunityLanguage (twin of WithCommunitySize): the control plane reads it live off the config repo (whole_composition.go) so a redeploy picks up a changed language (DDR 0300 d.6); founding passes the P1 answer straight through ProvisionGatewayServices.
  • Nextcloud — FilesConfig.DefaultLanguage → services.nextcloud.settings.default_language/default_locale (pt→pt_BR). Community default only (default_*, never force_*), so a member's own Personal→Language choice still wins (scope 4).

Proof (red→green): internal/clan/community_test.go (round-trip; en/"" no-op byte-identical; unsupported refused), internal/clan/files_test.go (es sets the keys; pt→pt_BR; en byte-identical), internal/founding/services_test.go (a community founded in es stands Nextcloud up in Español through provision's real render). go test ./internal/clan/ ./internal/founding/ ./internal/provision/ green; gofmt/go vet clean; whole repo builds.

Support table: docs/i18n/service-default-language.md — per service × en/es/nl/fr/pt + mi + the fallback.

Ruled by agent under ADR 0174 — veto anytime. Additive config fact + additive render field, revertible per commit, proven by the three suites. en kept byte-identical.

Why human

Completing the acceptance as written needs two human-gated things this session cannot do, plus the remaining two-way wiring (now its own ticket):

  1. Live drive (#2139) — one-way, non-routine spend. The acceptance's "one live drive" (found in es, prove each service serves Spanish to a fresh member) needs real infrastructure and a spend greenlight; batched with the standing clan-lab drives. A standing session must not start it (ADR 0174 rule 2).
  2. Sign-in design ruling (#2138). The acceptance named "the sign-in page in Spanish", but kanidm has no locale knob (its UI follows the browser locale) and the IDIP sign-in bridge is our own English Go-rendered HTML (internal/idp/brand.go). Translating it means a new Go-side i18n seam — a design decision for Ben: accept browser-locale, or build the seam?
  3. Remaining per-service wiring (#2137) — two-way. Omeka (DB-global locale via the reconcile oneshot, not an env), Collabora (ui_defaults), Roundcube ($config['language']), Listmonk (app.lang). Mechanical now that the keystone exists; picked up by a future session.

Not gaps (documented): Paperless and the kanidm sign-in page follow the member's browser locale — there is no community default to set, and a Spanish-browser member already sees Spanish.

Follow-ups filed: #2137 (remaining services), #2138 (sign-in design ruling), #2139 (live drive). The panel control to change the primary language after founding is already tracked (DDR 0300 d.6).

**Landed on `main` (push mode): the keystone + Nextcloud, end to end.** Commit `a8987221`. This ticket is epic-sized (6 services + a live drive). I built the shared dependency and the first service completely and provably, documented every service's real mechanism, and filed the remainder as follow-ups. What a standing session cannot finish is a one-way door (the live drive) and a design question (sign-in) — so this routes to a human. **What landed (two-way, proven):** - **Keystone** — the config-repo fact `idss/community-language` (`clan.WriteCommunityLanguage` / `ReadCommunityLanguage` / `SupportedLanguage`, `internal/clan/community.go`), beside the size band, written at all three founding deploy paths from the P1 primary-language answer. Recorded **only for a non-`en` supported code** (en/es/nl/fr/pt): `en` is the authoritative default, recorded by absence, so an `en` community writes no doc and every service renders **byte-identically** to before (acceptance 2). - **Seam** — `provision.WithCommunityLanguage` (twin of `WithCommunitySize`): the control plane reads it **live** off the config repo (`whole_composition.go`) so a redeploy picks up a changed language (DDR 0300 d.6); founding passes the P1 answer straight through `ProvisionGatewayServices`. - **Nextcloud** — `FilesConfig.DefaultLanguage` → `services.nextcloud.settings.default_language`/`default_locale` (`pt`→`pt_BR`). Community **default only** (`default_*`, never `force_*`), so a member's own Personal→Language choice still wins (scope 4). **Proof (red→green):** `internal/clan/community_test.go` (round-trip; `en`/`""` no-op byte-identical; unsupported refused), `internal/clan/files_test.go` (es sets the keys; `pt`→`pt_BR`; en byte-identical), `internal/founding/services_test.go` (a community founded in `es` stands Nextcloud up in Español through provision's real render). `go test ./internal/clan/ ./internal/founding/ ./internal/provision/` green; `gofmt`/`go vet` clean; whole repo builds. **Support table:** `docs/i18n/service-default-language.md` — per service × en/es/nl/fr/pt + `mi` + the fallback. **Ruled by agent under ADR 0174 — veto anytime.** Additive config fact + additive render field, revertible per commit, proven by the three suites. `en` kept byte-identical. ## Why human Completing the acceptance as written needs two human-gated things this session cannot do, plus the remaining two-way wiring (now its own ticket): 1. **Live drive (#2139) — one-way, non-routine spend.** The acceptance's "one live drive" (found in `es`, prove each service serves Spanish to a fresh member) needs real infrastructure and a spend greenlight; batched with the standing clan-lab drives. A standing session must not start it (ADR 0174 rule 2). 2. **Sign-in design ruling (#2138).** The acceptance named "the sign-in page in Spanish", but kanidm has no locale knob (its UI follows the browser locale) and the IDIP sign-in bridge is our own English Go-rendered HTML (`internal/idp/brand.go`). Translating it means a new Go-side i18n seam — a design decision for Ben: accept browser-locale, or build the seam? 3. **Remaining per-service wiring (#2137) — two-way.** Omeka (DB-global locale via the reconcile oneshot, not an env), Collabora (`ui_defaults`), Roundcube (`$config['language']`), Listmonk (`app.lang`). Mechanical now that the keystone exists; picked up by a future session. **Not gaps (documented):** Paperless and the kanidm sign-in page follow the member's browser locale — there is no community default to set, and a Spanish-browser member already sees Spanish. Follow-ups filed: **#2137** (remaining services), **#2138** (sign-in design ruling), **#2139** (live drive). The panel control to change the primary language after founding is already tracked (DDR 0300 d.6).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#2122
No description provided.