Repository navigation
fix(platform): show connector setting options in the reader's language - #5126
Closed
tale-code-bot wants to merge 1 commit into
Closed
tale-code-bot wants to merge 1 commit into
tale-code-bot wants to merge 1 commit into
Conversation
The credential form rendered a connector setting's select options as their stored values: the mailbox's Connection security offered `tls` and `starttls` in English, German and French alike, because a config field could declare no option labels. #4746 had already translated each setting's label and help. A config field now names its options: `optionLabels` gives the English label of each `enum` value, and `i18n.<locale>.optionLabels` overrides it. The connector schema refuses a label for a value the field does not take. The settings catalog and the app contract pass the labels through. The form resolves each option on its own through the locale chain: exact tag, base language, English, then the stored value. The mailbox offers Implicit TLS / STARTTLS (Implizites TLS, TLS implicite), and its hidden From address carries its German and French like Outlook's. The shipped display-data guard now also holds every setting's label, help and option labels to German and French, with de-CH where German writes ß, so a setting can no longer land in English only. The develop guide documents `optionLabels` in EN/DE/FR, and the connectors manual suite names the labels (CONN-F7) and checks the forms in three languages (CONN-F7a).
Contributor
|
The autonomous cycle now lands each task through the merge train instead of its own pull request ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A connector's credential form now shows a select's options in the reader's language. Before, the mailbox's Connection security offered the raw values
tlsandstarttlsin every language: a config field could not declare labels for its options.Context: #4746 (
e6227a0cc) already translated each setting's label and help, and the de and fr HTTP guides. This PR closes what the issue still names:Task: TALE-143 (Development board).
Closes #4743
What changed
Schema (
packages/shared/src/schemas/connectors.ts):optionLabels, the English label of eachenumvalue;i18n.<locale>.optionLabelsoverrides them per locale;enum.enumstays the set of values that are stored and validated, so nothing that reads it changes.Manifest (
configs/platform/system/connectors/imap-smtp/connector.yml):securityoffers Implicit TLS / STARTTLS: de Implizites TLS / STARTTLS, fr TLS implicite / STARTTLS. No German text has ß, so there is no de-CH override.fromAddressgains de and fr label and help, worded like Outlook's, so every declared setting text is translated.Catalog and contract (
connector_catalog.ts,contract/connector-credentials.ts): passoptionLabelsthrough, and typei18n.<locale>.optionLabels.Form (
config-fields.tsx): each option resolves on its own throughuseLocalized: exact tag, then base language, then English, then the stored value. A sparse de-CH override of one option therefore keeps German for the others.Guard (
lib/connectors/action-titles.test.ts, the shipped display-data guard): every shipped setting must carry de and fr for:It also requires de-CH where German has ß and names any unknown locale. A "bites" case shows each problem line.
Docs: the
configFieldsrow ofdocs/{en,de,fr}/develop/connectors.mddocumentsoptionLabels.Manual suite (
suites/connectors.md):Checklist
bun run check: not run in full (the whole monorepo). I ran every part this change touches; see the test plan. CI runs the rest.bun run lint:sast: not run locally. The pinned opengrep binary is not cached in my worker, and I don't download tools from outside the lockfiles; the pre-commit scan skipped for the same reason. The PR's SAST check runs it.messages/catalogs, because no key changed. The new user-visible texts live in the connector manifest and ship in en, de and fr. No German text has ß, so there is no de-CH override.docs/{en,de,fr}/develop/connectors.md.Test plan
Everything below ran at
00de44a7b5734aadf1fe08584616af63e9c22aeaon Node v24.21.0 and Bun 1.4.2, with credentials removed from the environment.Each new test fails without its fix (checked by stashing the fix):
packages/shared:bunx vitest run src/schemas/connectors.test.tslib/connectors/action-titles.test.ts,backend/core/connector_credentials/catalog_docs.test.ts,lib/shared/schemas/shipped-connectors.test.tsmain's imap-smtp manifestsecurity, and the de and fr label and help offromAddressapp/features/settings/connectors/config-fields.test.tsxThe 5 new UI tests cover the options in en, de, fr and de-CH, plus "a German reader sees none of the English it translates".
Wider suites:
lib/connectors,backend/core/connector_credentials,backend/domains/connector_credentials,lib/shared/schemasandlib/engine: 2822 passed, 1 failed.lib/engine/core/validate/golden-errors.test.ts. It fails the same way on a cleanmain(0da082051) in this worker: Node v24.21.0 accepts the regex/(?i:yes)/, which the golden expects to be a syntax error. It is unrelated to this change.app/features/settings/connectors,app/features/settings/credentialsandsettings-field-control: 14 files, 135 passed.Gates:
tsc --noEmitpasses for@tale/sharedand for@tale/platform. The platform needs CI'sNODE_OPTIONS=--max-old-space-size=6144.bun run lint(type-aware oxlint) passes in@tale/sharedand@tale/platform.oxfmt --checkpasses on the changed files.services/docsvitest passes (38 files, 716 tests), andbun run lint:linkspasses.bun run lint:manualpasses, andtests/manual/scripts/check-guide.tsreports OK forsuites/connectors.md.Not run:
bun run check;bun run lint:sast(see the checklist);@tale/clitypecheck. The CLI parses manifests with the same schema but reads no config-field types, and the shipped manifests parse under the new schema inshipped-connectors.test.ts.Follow-up (not in this PR)
The server's refusals in
normalizeConfigstill quote a setting's English label and its raw enum values. For example, the "must be one of" message liststls, starttls.