Repository navigation
fix(platform): enforce terminology-ui-label on the platform catalogs - #5130
tale-code-bot wants to merge 3 commits into
Conversation
`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
|
CI at head Passed:
Still running when I checked: Unit (workspaces) and the Unit aggregate. Failed, and as far as I can tell not because of this change:
Next: rerun the failed jobs after the rate limit resets. On |
|
The autonomous cycle now lands each task through the merge train instead of its own pull request ( |
Summary
This switches the platform's
terminology-ui-labelcheck 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:Closes #4484. Task TALE-82 on the Development board. The plan and its amendment are on the task.
packages/ui/src/i18n/tests/glossary/andchecks/terminology-ui-label.ts_allow: a glossary term can list, per locale, names that contain its English form but mean something else.terminology-ui-labelskips a match inside one of them and still reports the word anywhere else in that locale.feature_workspaceallowsGoogle Workspace,Google-Workspace(for German compounds) and the GermanChat-Workspace._lintExcludewould have switched the term off for all of German.glossary/loader.ts(GlossaryHandle.forLocale)de-CHnow reads thedeentry of_lintExclude,_avoidand_allowunless it has its own, as it already reads thedeform.'de-CH': falsestill enforces a term there.settings.enterpriseSso.guide.google.groupsNote(en, de, fr)glossary.ymlfeature_canvasautomations.canvas.view.canvas(FRCanevas) instead of the removedchat.canvas.title.services/platform/lib/i18n/messages.test.ts'terminology-ui-label': 'enforce'..agents/skills/write-translations/GLOSSARY_GUIDE.md(+ mirror viabun run skills:sync)_allowand the Swiss fallback.The Swiss false positive. With enforcement on at
main0da08205168e8c882a67cd3255f3e29eb1a99f77, exactly one finding remained:de-CH/automations.ymlautomations.blank.deployFailed, "… Schalte sie im Editor live." "Editor" there is the automation editor, not the role.role_editorhas_lintExclude: { de: true }for that loanword, butde-CHdid not inherit it. The key is newer than i18n(platform): 18 German/French strings name Workspace, Owner and Legal hold differently from the shipped UI labels (platform terminology-ui-label is report-only) #4484's count: feat(platform): make a new blank automation run when its trigger fires #4694 added it and fix: cover Swiss sharp-s fallback across message catalogs #4412 added the Swiss copy.de-CHfindings. The five_lintExclude.determs (role_editor,role_editors,feature_automationPath,feature_automationSource,feature_automationEnd) stop being enforced inde-CH, as inde. There is no_avoid.detoday.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 checkpasses (format, lint, typecheck, all tests). Not run in full locally. What did run:@tale/uitsc --noEmitandoxlint --type-aware, both clean;oxlint --type-awareon the changed platform test file, clean;oxfmt, opengrep);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:sastpasses (Opengrep). Not run locally. The pre-commit opengrep step passed on the staged TypeScript files, but it runs withOPENGREP_SKIP_IF_UNCACHED=1. CI's SAST job covers this head.Translations updated:
groupsNoteinmessages/{en,de,fr}/settings.yml.de-CHdoesn't override this key.Docs: N/A for the product docs. No page in
docs/,services/docsorservices/webquotes the groups note (git grepfor "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 bybun install --frozen-lockfile.services/platform:bunx vitest --run --project server lib/i18n/messages.test.tsterminology-ui-label > runs in enforce modeaccessDenied.workspaceNotFoundplanted back to "Dieser Workspace existiert nicht …"accessDenied.workspaceNotFound: [ui-label-mismatch] UI-label term "Workspace" must match shipped string — use "Arbeitsbereich". Reverted.de-CHautomations.blank.deployFailed("Editor",use "Redakteur")packages/ui:bunx vitest --run --project unit src/i18nterminology-ui-label.test.tsagainst the check without_allow_allowtests fail. The fourth is the negative fixture and passes either way.marketing-ui,web,ui-docsanddocs(lib/i18n/messages.test.ts, plus docstests/docs.test.ts)New cases in
packages/ui/src/i18n/tests/checks/terminology-ui-label.test.ts:_avoidname inside an allowed name is skipped;'de-CH': falseturns a term back on.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
emptyStates.members.description("… dans ce workspace.") andchat.errorHintMissingApiKey("… pour ce workspace."). The check matches the English form case-sensitively and misses them, as i18n(platform, docs): French says "legal hold", "conservation juridique" and "gel juridique" for the feature the UI calls "Conservation légale" (follow-up to #4484) #4499 describes for "legal hold". They are the French twins of two of the German strings fix(platform): match de/fr strings to the shipped UI labels #4489 fixed.automations.editor.fields.inputDescriptionsays "liaison sur le canvas", where the glossary's French form is "canevas".