Skip to content

i18n: backfill EN keys for polish-pass defaultValue strings - #132

Merged
logicalmechanism merged 4 commits into
devfrom
feature/i18n-backfill-polish-keys
May 5, 2026
Merged

logicalmechanism merged 4 commits into
devfrom
feature/i18n-backfill-polish-keys

Conversation

@logicalmechanism

Copy link
Copy Markdown
Contributor

Summary

  • Promotes 5 polish-pass strings from i18next defaultValue: fallbacks to proper EN translation keys.
  • Adds dashboard:shell.walletCreatedTitle / walletCreatedBody to en/dashboard.json and card.openDescription, card.viewFull, toast.queueOverflow to en/common.json.
  • Removes the inline , { defaultValue: '...' } from each t() call site in Dashboard.tsx, EncryptionCard.tsx, and Toast.tsx. The count: interpolation on queueOverflow is preserved.
  • The 2 pre-existing defaultValue: calls in config/categories.ts are intentionally left alone — they use the dynamic-subkey + runtime-fallback pattern.

Test plan

  • Targeted vitest: EncryptionCard, Toast, Dashboard, i18n suites — 134 passed
  • tsc --noEmit clean
  • eslint clean for the 3 changed .tsx files
  • grep -rn 'defaultValue:' fe/src shows only the 2 pre-existing categories.ts usages
  • Visual smoke: not required — strings render identically to today (the defaultValue: already showed them in EN); this PR is config tidy-up only

The other 17 locales pick these up via the translation team's backfill flow.

Generated with Claude Code

logicalmechanism and others added 4 commits May 4, 2026 18:42
Promote 5 strings from defaultValue fallbacks to proper keys:
- dashboard:shell.walletCreatedTitle / walletCreatedBody
- card.openDescription / card.viewFull
- toast.queueOverflow (preserves {{count}} interpolation)

Other 17 locales pick these up via the translation backfill flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The polish pass left three template-literal aria-labels with hardcoded
English suffixes ("new bids", "accepted bids ready to decrypt",
"pending transactions"). Visually invisible — only screen-reader users
saw the English. Replace with i18next plural keys (_one / _other) so
the aria-label translates and reads grammatically at count == 1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add no-restricted-syntax ESLint rule that flags string literals and
template literals in user-facing JSX attributes (aria-label,
aria-description, aria-roledescription, alt, title). Test files are
exempted; placeholder is intentionally not covered (numeric-only in
this app, locale-agnostic).

Backfill the 5 call sites the new rule surfaced:
- LayoutPopover card-size + column-count buttons (4 sites) now look up
  layoutPopover.cardSize{Small,Medium,Large} and the new
  layoutPopover.columnsCount plural key.
- StorageSection disk-usage segment tooltip uses storage.segmentTooltip
  with {{label}}, {{size}}, {{percent}} interpolation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
formatAda + formatDate read i18next.language from the singleton and
pass it to toLocaleString / toLocaleDateString instead of `undefined`,
so number grouping and date format follow the user's selected app
language rather than the OS default. Falls back to undefined when
i18next isn't initialized — keeps unit tests stable.

formatRelativeTime swaps its hardcoded English buckets ("just now",
"5m ago", "2y ago") for Intl.RelativeTimeFormat with style:'narrow'.
English narrow CLDR matches the prior strings exactly except
"just now" → "now"; non-English locales now get their proper CLDR
forms (e.g. "5分钟前" instead of "5m ago"). Uses numeric:'auto' under
60s for the "now" form and numeric:'always' above so "1mo ago" / "1y
ago" don't collapse to "last mo." / "last yr."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@logicalmechanism
logicalmechanism merged commit 4e73527 into dev May 5, 2026
4 checks passed
@logicalmechanism logicalmechanism mentioned this pull request May 5, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant