feat(app): i18n share-publish surfaces — wire t() across 7 components + 6 locales#372
Merged
Conversation
… + 6 locales Closes the largest single i18n parity gap in the renderer: ~80 hardcoded English strings across PublishTab, ExportTab, ConnectCard, the two destructive confirm modals, SettingsAccount, and the Published tab on SharesPage. Adds 112 new keys to en.json grouped under coherent namespaces (shareEditor.publishTab / .exportTab / .connectCard / .unpublishConfirm, settings.account, shares.publishedTab) and translates each to the six non-English locales (de, fr, ja, ko, zh-CN, zh-TW). Pluralised counts use i18next _one/_other (collapsed to _other in the four no-plural locales). Also drops the unsafe `tx = t as unknown as (k: string) => string` cast in ExportTab and propagates the `t` translator into the PublishTab subcomponents instead of duplicating useTranslation() calls. The VisibilityCard testid was derived from the (now translated) title; switched to an explicit `testId` prop so e2e selectors stay stable. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Jun 8, 2026
Merged
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jun 10, 2026
The Share button, Publish/Export tab labels, and the popover/tablist aria-labels were the last hardcoded English strings in the share-publish surfaces after the #372 i18n pass. Route them through t() with new shareEditor.shareMenu.* keys across all 7 locales. Co-authored-by: Chen <99816898+donteatfriedrice@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What
Closes the largest single i18n parity gap in the renderer. Pre-commit, ~80 user-visible strings across the share-publish surfaces were hardcoded English —
locales.test.tscouldn't catch them because the violation was the absence of keys inen.json, not key drift between locales.7 components migrated to
t():share-editor/share-tabs/PublishTab.tsx— visibility radios, expiry select, PII warnings, error states, manage view (largest single file)share-editor/share-tabs/ExportTab.tsx— footer hint + Download button; also drops the unsafeconst tx = t as unknown as (k: string) => stringcastshare-editor/ConnectCard.tsx— sign-in CTA + privacy hintshare-editor/UnpublishConfirmModal.tsx— destructive confirm copyDeleteAccountConfirmModal.tsx— 24h grace explainer + button labelsSettingsAccount.tsx— handle claim, sign out, delete account state machine (36 keys)SharesPage.tsx— Published-tab section + tab strip112 new keys added to
en.jsonunder coherent namespaces:shareEditor.publishTabshareEditor.exportTabshareEditor.connectCardshareEditor.unpublishConfirmsettings.accountshares.publishedTabshares.{tab_drafts, tab_published, tabs_aria}Translated to all 6 non-English locales (
de,fr,ja,ko,zh-CN,zh-TW) in the same commit per the project's strict 100%-parity rule.Notable choices
VisibilityCardtestid is now an explicittestIdprop instead of being derived fromtitle.toLowerCase().replace(/\s+/g, '-'). The derived form silently breaks every translated build, so e2e selectors couldn't depend on it.tvia props rather than each callinguseTranslation(). One call site at the top, no leaf-component coupling to react-i18next._one/_otherfor counts (X credential-like values). Locales without grammatical plural (ja,ko,zh-CN,zh-TW) collapse to_other.Verification
pnpm --filter @spool/app exec vitest run src/renderer/i18n/locales.test.ts→ 17/17 pass (100% key parity + plural shape + count interpolation rules)pnpm --filter @spool/app exec tsc --noEmit→ cleanpnpm --filter @spool/app test→ 433 pass + 1 pre-existing macOS path-slug flake (sessionResume.test.ts:38, unrelated)Risk
Pure-additive surface change. No new IPC, no schema changes, no runtime gates touched. The destructive-action confirmation copy reads slightly differently in each language, but the underlying flow is unchanged.
Submitted by @graydawnc.