Skip to content

fix(platform): enforce terminology-ui-label on the platform catalogs - #5130

Closed
tale-code-bot wants to merge 3 commits into
mainfrom
fix/platform-terminology-ui-label-enforce
Closed

tale-code-bot wants to merge 3 commits into
mainfrom
fix/platform-terminology-ui-label-enforce

Conversation

@tale-code-bot

Copy link
Copy Markdown
Collaborator

Summary

This switches the platform's terminology-ui-label check from report to enforce. A German or French string that names a feature, role or entity differently from the label its locale ships now fails CI, as it already does for the website (#4472). #4489 had already fixed the 18 strings #4484 listed. This PR settles what was left:

  • an exemption the check understands, for names that only contain a term;
  • the SSO groups note;
  • the glossary's Canvas note;
  • one Swiss German false positive that showed up once the check enforced.

Closes #4484. Task TALE-82 on the Development board. The plan and its amendment are on the task.

Where Change
packages/ui/src/i18n/tests/glossary/ and checks/terminology-ui-label.ts _allow: a glossary term can list, per locale, names that contain its English form but mean something else. terminology-ui-label skips a match inside one of them and still reports the word anywhere else in that locale. feature_workspace allows Google Workspace, Google-Workspace (for German compounds) and the German Chat-Workspace. _lintExclude would have switched the term off for all of German.
glossary/loader.ts (GlossaryHandle.forLocale) Swiss German follows German: de-CH now reads the de entry of _lintExclude, _avoid and _allow unless it has its own, as it already reads the de form. 'de-CH': false still enforces a term there.
settings.enterpriseSso.guide.google.groupsNote (en, de, fr) The note now names the product: "a Google Workspace admin", "einem Google-Workspace-Administrator", "un administrateur Google Workspace". The old "Workspace admin" read like an admin of the Tale workspace. de-CH has no override for this key.
glossary.yml feature_canvas The note points at the shipped automations.canvas.view.canvas (FR Canevas) instead of the removed chat.canvas.title.
services/platform/lib/i18n/messages.test.ts 'terminology-ui-label': 'enforce'.
.agents/skills/write-translations/GLOSSARY_GUIDE.md (+ mirror via bun run skills:sync) Documents _allow and the Swiss fallback.

The Swiss false positive. With enforcement on at main 0da08205168e8c882a67cd3255f3e29eb1a99f77, exactly one finding remained:

German compound. "Google-Workspace-Administrator" is hyphenated all through, following the official spelling rule for a compound whose first part is a multi-word name. The catalog and the docs already write such names that way (Google-Drive-Sync, Microsoft-Graph-Berechtigung, Google-Drive-Konto).

Checklist

  • bun run check passes (format, lint, typecheck, all tests). Not run in full locally. What did run:

    • @tale/ui tsc --noEmit and oxlint --type-aware, both clean;
    • oxlint --type-aware on the changed platform test file, clean;
    • the pre-commit hook on each commit (conflict markers, oxfmt, opengrep);
    • every i18n suite that reads the glossary (see the test plan).

    Not run: the platform typecheck (its only TypeScript change is the mode string in a test config) and the other workspaces' full suites. This PR's CI runs them.

  • bun run lint:sast passes (Opengrep). Not run locally. The pre-commit opengrep step passed on the staged TypeScript files, but it runs with OPENGREP_SKIP_IF_UNCACHED=1. CI's SAST job covers this head.

  • Translations updated: groupsNote in messages/{en,de,fr}/settings.yml. de-CH doesn't override this key.

  • Docs: N/A for the product docs. No page in docs/, services/docs or services/web quotes the groups note (git grep for "Workspace admin", "Workspace-Administrator", "administrateur Workspace" and "Cloud Identity" found nothing). The glossary guide documents the new behaviour.

  • README.md / README.de.md / README.fr.md: N/A.

Test plan

All runs are local, at head 7cf34bec75bf0a0e5b5874e88c35fa1b9bfa7a1b, with dependencies installed by bun install --frozen-lockfile.

Command Result
services/platform: bunx vitest --run --project server lib/i18n/messages.test.ts 34/34 pass, including terminology-ui-label > runs in enforce mode
The same, with de accessDenied.workspaceNotFound planted back to "Dieser Workspace existiert nicht …" Fails with accessDenied.workspaceNotFound: [ui-label-mismatch] UI-label term "Workspace" must match shipped string — use "Arbeitsbereich". Reverted.
The same, before the Swiss fallback Fails on de-CH automations.blank.deployFailed ("Editor", use "Redakteur")
packages/ui: bunx vitest --run --project unit src/i18n 19 files, 172 tests pass
terminology-ui-label.test.ts against the check without _allow 3 of the 4 new _allow tests fail. The fourth is the negative fixture and passes either way.
The same, against the loader without the Swiss fallback The 3 tests with Swiss text fail
i18n suites of marketing-ui, web, ui-docs and docs (lib/i18n/messages.test.ts, plus docs tests/docs.test.ts) 23, 25, 23 and 45 tests pass

New cases in packages/ui/src/i18n/tests/checks/terminology-ui-label.test.ts:

  • Fixture glossary:
    • an allowed name is skipped in its own locale only: the same word outside it is still reported, and a German allowance doesn't cover French;
    • an _avoid name inside an allowed name is skipped;
    • Swiss German follows the German exclusion, avoid and allow lists, and 'de-CH': false turns a term back on.
  • Shipped glossary:
    • Google Workspace, Google-Workspace-Administrator and Chat-Workspace pass in de, de-CH and fr;
    • a bare "Workspace" and "Workspace-Administrator" are reported;
    • the shipped de-CH "im Editor" sentence passes.

Not checked: the rendered SSO guide was not viewed in a browser. The change is one sentence of muted helper text whose key and placement are unchanged.

Noticed, not in this PR

`terminology-ui-label` reports a UI-label term's English form in every
non-English string. So German could not name Google's product, Google
Workspace, or a chat app's workspace without a finding, although a Tale
workspace must read Arbeitsbereich.

A term's `_allow` lists, per locale, the names that contain the term but
mean something else. The check skips a match inside one of them and still
reports the same word anywhere else in that locale. `feature_workspace`
allows Google Workspace (in DE also Google-Workspace, for compounds) and
the DE Chat-Workspace. `_lintExclude` would switch the term off for the
whole locale and let a bare German "Workspace" back in.

Refs #4484
A de-CH string inherits the German glossary form of a term, but not the
German term's `_lintExclude`, `_avoid` or `_allow`. Every German string
with ß needs a Swiss copy, so a German string that passes through one of
these settings failed as its Swiss copy. For example,
`automations.blank.deployFailed` says "im Editor" (the automation editor):
`role_editor` is excluded for `de`, and the platform's de-CH copy was
reported as the role.

`GlossaryHandle.forLocale` resolves those settings along the chain
`resolveForm` walks: de-CH reads the `de` entry unless it has its own, so
`'de-CH': false` still enforces a term there. `shouldEnforce` and
`terminology-ui-label` read the settings through it.

Refs #4484
A German or French string that names a feature, role or entity unlike the
label its locale ships now fails the platform's i18n suite, as it already
does on the marketing site. #4489 changed the 18 strings #4484 listed, and
none of the remaining findings was a real mismatch.

The SSO guide's groups note now names the product, Google Workspace, in
every locale: "a Workspace admin" could read as an admin of the Tale
workspace. German writes the compound Google-Workspace-Administrator, which
the glossary allows like the external Chat-Workspace. The glossary's Canvas
note points at the shipped `automations.canvas.view.canvas` (FR `Canevas`)
instead of the removed `chat.canvas.title`.

Closes #4484
@tale-code-bot

Copy link
Copy Markdown
Collaborator Author

CI at head 7cf34bec75bf0a0e5b5874e88c35fa1b9bfa7a1b. I checked once, at about 2026-10-30 00:05 UTC. The runs are Checks 40976354269 and the scope/CI-ready runs 40976354101, 40976354161, 40976354167 and 40976354172.

Passed:

  • Format, Lint, Type check, Knip, Lint commits, Opengrep, Opengrep OSS and Performance;
  • UI (platform 1/4 to 4/4) and the UI aggregate;
  • Unit (platform 1/2 and 2/2).

Still running when I checked: Unit (workspaces) and the Unit aggregate.

Failed, and as far as I can tell not because of this change:

  • GitHub API rate limit. The scope step's call to GitHub was answered 403 API rate limit exceeded for installation (x-ratelimit-used 5000/5000, reset 2026-10-30 00:36:25 UTC). That failed the four PR scope jobs and Integration scope. Through them it also failed Backend integration (at "Require the scope decision") and CI ready (Build, CLI, E2E, Security).
  • Build. @tale/web#build failed in fetch-releases with GitHub releases API page 1 failed: 403, the same rate limit.
  • Browser. @tale/ui#test:browser ran in full, because this PR changes packages/ui inputs. 714 of 715 tests passed. The one failure was code-editor.browser.test.tsx > CodeEditor completion > closes the list before the sheet, at phone width, with expected 0 to be greater than or equal to 220.40625: the completion list had not been placed yet. The test's own comment says a busy machine can read the list before CodeMirror places it. This PR changes no component code. I could not rerun it locally: the sandbox has Playwright's headless shell 1194, and Playwright 1.58.2 needs 1208.

Next: rerun the failed jobs after the rate limit resets. On main, the last three Checks runs (at 0da082051, 9be5cadac and f8fd83988) fail in Backend integration's own run step.

@yannickmonney

Copy link
Copy Markdown
Contributor

The autonomous cycle now lands each task through the merge train instead of its own pull request (.agents/repo.md on train), so this pull request closes. The branch fix/platform-terminology-ui-label-enforce stays and the task goes on with it: the Reviewer reviews the branch's head on the task and squashes accepted work onto train.

@yannickmonney
yannickmonney deleted the fix/platform-terminology-ui-label-enforce branch October 30, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants