Skip to content

i18nize remaining React UI strings#2577

Merged
senamakel merged 5 commits into
tinyhumansai:mainfrom
senamakel:codex/fix-react-i18n-hardcoded-strings
May 24, 2026
Merged

i18nize remaining React UI strings#2577
senamakel merged 5 commits into
tinyhumansai:mainfrom
senamakel:codex/fix-react-i18n-hardcoded-strings

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

  • i18nized the remaining React UI copy across settings, onboarding, MCP, skills, intelligence, iOS, and shared UI surfaces.
  • Added scripts/i18n-react-audit.ts and pnpm i18n:react:check to detect newly introduced hardcoded UI strings in TSX.
  • Extended the English translation catalog and updated existing components to use t(...) instead of embedding English literals.
  • Cleaned up a small set of typecheck issues uncovered during the sweep so the app compiles cleanly after the refactor.

Problem

  • The app had a large amount of user-facing React copy still hardcoded in English even though the custom i18n layer and language files already existed.
  • That made the language packs incomplete in practice and allowed new untranslated strings to keep slipping in unnoticed.
  • Reviewers also had no automated way to catch regressions beyond manual grep or UI inspection.

Solution

  • Replaced hardcoded UI strings with translation lookups across the remaining React surfaces, adding only the required English keys.
  • Added an AST-based React audit script that flags literal JSX text and common UI attributes such as aria-label, placeholder, title, and label.
  • Tightened the audit to ignore non-user-facing technical fragments such as code snippets, unit fragments, and other known false positives so the zero-result state is meaningful.
  • Preserved behavior and limited changes to copy plumbing, plus a few mechanical compile fixes uncovered while normalizing the touched files.

Submission Checklist

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy N/A: existing focused tests were reused for touched surfaces; no new runtime behavior was introduced.
  • Diff coverage ≥ 80% — changed lines (Vitest + cargo-llvm-cov merged via diff-cover) meet the gate enforced by .github/workflows/coverage.yml. Run pnpm test:coverage and pnpm test:rust locally; PRs below 80% on changed lines will not merge. N/A: not run locally in this session; merge gate will enforce coverage in CI.
  • Coverage matrix updated — added/removed/renamed feature rows in docs/TEST-COVERAGE-MATRIX.md reflect this change (or N/A: behaviour-only change) N/A: behaviour-only i18n/tooling change.
  • All affected feature IDs from the matrix are listed in the PR description under ## Related N/A: no coverage-matrix feature rows changed.
  • No new external network dependencies introduced (mock backend used per Testing Strategy)
  • Manual smoke checklist updated if this touches release-cut surfaces (docs/RELEASE-MANUAL-SMOKE.md) N/A: no release-manual-smoke doc changes required for copy/i18n plumbing.
  • Linked issue closed via Closes #NNN in the ## Related section N/A: no linked GitHub issue was provided for this request.

Impact

  • Runtime impact is frontend-only plus one repo-level audit script.
  • No backend, Rust-core, or transport behavior is intentionally changed.
  • The main product impact is that existing locale files can now actually drive the affected UI surfaces, and future regressions can be caught with pnpm i18n:react:check.

Related

  • Closes: N/A
  • Follow-up PR(s)/TODOs:
    • Localize the remaining English values still present inside non-English locale maps.

AI Authored PR Metadata (required for Codex/Linear PRs)

Keep this section for AI-authored PRs. For human-only PRs, mark each field N/A.

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: codex/fix-react-i18n-hardcoded-strings
  • Commit SHA: de77b6c7c6076a55edab4c0e58ed9e97762f9715

Validation Run

  • pnpm --filter openhuman-app format:check
  • pnpm typecheck
  • Focused tests:
    • pnpm debug unit src/components/settings/panels/__tests__/DevicesPanel.test.tsx src/components/settings/panels/devices/PairPhoneModal.test.tsx src/components/channels/mcp/McpCatalogBrowser.test.tsx src/pages/onboarding/steps/SkillsStep.test.tsx
    • pnpm debug unit src/components/channels/mcp/InstallDialog.test.tsx src/components/channels/mcp/InstalledServerList.test.tsx src/components/channels/mcp/InstalledServerDetail.test.tsx src/components/channels/mcp/McpServersTab.test.tsx src/components/channels/mcp/McpCatalogBrowser.test.tsx
    • pnpm debug unit src/components/settings/panels/TeamInvitesPanel.test.tsx
    • pnpm debug unit src/components/settings/panels/TeamMembersPanel.test.tsx
    • pnpm debug unit src/pages/ios/PairScreen.test.tsx src/pages/ios/MascotScreen.test.tsx src/components/commands/__tests__/Kbd.test.tsx
  • Rust fmt/check (if changed): pnpm --filter openhuman-app rust:check via pre-push hook
  • Tauri fmt/check (if changed): cargo fmt --manifest-path app/src-tauri/Cargo.toml --all --check via pnpm --filter openhuman-app format:check

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: N/A

Behavior Changes

  • Intended behavior change: The affected React UI surfaces now resolve visible copy through the app i18n catalog instead of embedding English literals.
  • User-visible effect: Language packs can drive these screens correctly, and the repo now has an automated guard against new hardcoded UI strings.

Parity Contract

  • Legacy behavior preserved: Existing flows, actions, and state transitions were preserved; only the source of display strings and a few mechanical compile fixes changed.
  • Guard/fallback/dispatch parity checks: The new audit script was tuned to ignore non-user-facing technical fragments so a zero-result report corresponds to real UI parity rather than scanner noise.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): N/A
  • Canonical PR: This PR
  • Resolution (closed/superseded/updated): N/A

@senamakel senamakel requested a review from a team May 24, 2026 19:00
@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@senamakel, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 5 reviews of capacity. Refill in 32 minutes and 48 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e330d90f-a6aa-4feb-b03c-94e190a9240b

📥 Commits

Reviewing files that changed from the base of the PR and between 59c1687 and 483fd1f.

📒 Files selected for processing (103)
  • app/src/components/AppUpdatePrompt.tsx
  • app/src/components/BootCheckGate/BootCheckGate.tsx
  • app/src/components/LocalAIDownloadSnackbar.tsx
  • app/src/components/OpenhumanLinkModal.tsx
  • app/src/components/ProgressIndicator.tsx
  • app/src/components/RotatingTetrahedronCanvas.tsx
  • app/src/components/channels/TelegramConfig.tsx
  • app/src/components/channels/mcp/ConfigAssistantPanel.tsx
  • app/src/components/channels/mcp/InstallDialog.tsx
  • app/src/components/channels/mcp/InstalledServerDetail.tsx
  • app/src/components/channels/mcp/InstalledServerList.tsx
  • app/src/components/channels/mcp/McpCatalogBrowser.tsx
  • app/src/components/channels/mcp/McpServersTab.tsx
  • app/src/components/channels/mcp/McpToolList.tsx
  • app/src/components/channels/mcp/SmitheryServerCard.tsx
  • app/src/components/commands/Kbd.tsx
  • app/src/components/composio/ComposioConnectModal.tsx
  • app/src/components/intelligence/IntelligenceCallsTab.tsx
  • app/src/components/intelligence/IntelligenceMemoryTab.tsx
  • app/src/components/intelligence/IntelligenceSubconsciousTab.tsx
  • app/src/components/intelligence/VaultPanel.tsx
  • app/src/components/intelligence/WhatsAppMemorySection.tsx
  • app/src/components/ios/MobileTabBar.tsx
  • app/src/components/rewards/ReferralRewardsSection.tsx
  • app/src/components/settings/components/SettingsHeader.tsx
  • app/src/components/settings/panels/AIPanel.tsx
  • app/src/components/settings/panels/AgentChatPanel.tsx
  • app/src/components/settings/panels/AutocompleteDebugPanel.tsx
  • app/src/components/settings/panels/CompanionPanel.tsx
  • app/src/components/settings/panels/ComposioPanel.tsx
  • app/src/components/settings/panels/ComposioTriagePanel.tsx
  • app/src/components/settings/panels/DeveloperOptionsPanel.tsx
  • app/src/components/settings/panels/DevicesPanel.tsx
  • app/src/components/settings/panels/MascotPanel.tsx
  • app/src/components/settings/panels/MemoryDebugPanel.tsx
  • app/src/components/settings/panels/MigrationPanel.tsx
  • app/src/components/settings/panels/NotificationRoutingPanel.tsx
  • app/src/components/settings/panels/PrivacyPanel.tsx
  • app/src/components/settings/panels/ProviderSetupErrorNotice.tsx
  • app/src/components/settings/panels/ScreenAwarenessDebugPanel.tsx
  • app/src/components/settings/panels/TeamInvitesPanel.tsx
  • app/src/components/settings/panels/TeamManagementPanel.tsx
  • app/src/components/settings/panels/TeamMembersPanel.tsx
  • app/src/components/settings/panels/VoiceDebugPanel.tsx
  • app/src/components/settings/panels/VoicePanel.tsx
  • app/src/components/settings/panels/WebhooksDebugPanel.tsx
  • app/src/components/settings/panels/__tests__/AIPanel.test.tsx
  • app/src/components/settings/panels/__tests__/MemoryDebugPanel.test.tsx
  • app/src/components/settings/panels/autocomplete/AppFilterSection.tsx
  • app/src/components/settings/panels/autocomplete/CompletionStyleSection.tsx
  • app/src/components/settings/panels/billing/AutoRechargeSection.tsx
  • app/src/components/settings/panels/billing/InferenceBudget.tsx
  • app/src/components/settings/panels/devices/PairPhoneModal.tsx
  • app/src/components/settings/panels/local-model/DeviceCapabilitySection.tsx
  • app/src/components/settings/panels/local-model/ModelDownloadSection.tsx
  • app/src/components/settings/panels/local-model/ModelStatusSection.test.tsx
  • app/src/components/settings/panels/local-model/ModelStatusSection.tsx
  • app/src/components/skills/CreateSkillModal.tsx
  • app/src/components/skills/InstallSkillDialog.tsx
  • app/src/components/skills/MeetingBotsCard.tsx
  • app/src/components/skills/ScreenIntelligenceSetupModal.tsx
  • app/src/components/skills/skillIcons.tsx
  • app/src/components/upsell/UpsellBanner.tsx
  • app/src/lib/i18n/chunks/ar-1.ts
  • app/src/lib/i18n/chunks/ar-5.ts
  • app/src/lib/i18n/chunks/bn-1.ts
  • app/src/lib/i18n/chunks/bn-5.ts
  • app/src/lib/i18n/chunks/de-1.ts
  • app/src/lib/i18n/chunks/de-5.ts
  • app/src/lib/i18n/chunks/en-1.ts
  • app/src/lib/i18n/chunks/en-5.ts
  • app/src/lib/i18n/chunks/es-1.ts
  • app/src/lib/i18n/chunks/es-5.ts
  • app/src/lib/i18n/chunks/fr-1.ts
  • app/src/lib/i18n/chunks/fr-5.ts
  • app/src/lib/i18n/chunks/hi-1.ts
  • app/src/lib/i18n/chunks/hi-5.ts
  • app/src/lib/i18n/chunks/id-1.ts
  • app/src/lib/i18n/chunks/id-5.ts
  • app/src/lib/i18n/chunks/it-1.ts
  • app/src/lib/i18n/chunks/it-5.ts
  • app/src/lib/i18n/chunks/ko-1.ts
  • app/src/lib/i18n/chunks/ko-5.ts
  • app/src/lib/i18n/chunks/pt-1.ts
  • app/src/lib/i18n/chunks/pt-5.ts
  • app/src/lib/i18n/chunks/ru-1.ts
  • app/src/lib/i18n/chunks/ru-5.ts
  • app/src/lib/i18n/chunks/zh-CN-1.ts
  • app/src/lib/i18n/chunks/zh-CN-5.ts
  • app/src/lib/i18n/en.ts
  • app/src/pages/Conversations.tsx
  • app/src/pages/Home.tsx
  • app/src/pages/Settings.tsx
  • app/src/pages/Skills.tsx
  • app/src/pages/Welcome.tsx
  • app/src/pages/__tests__/Skills.composio-catalog.test.tsx
  • app/src/pages/ios/MascotScreen.tsx
  • app/src/pages/ios/PairScreen.tsx
  • app/src/pages/onboarding/steps/ApiKeysStep.tsx
  • app/src/pages/onboarding/steps/LocalAIStep.tsx
  • app/src/pages/onboarding/steps/SkillsStep.tsx
  • package.json
  • scripts/i18n-react-audit.ts

Comment @coderabbitai help to get the list of available commands and usage tips.

senamakel added 3 commits May 24, 2026 12:16
- Add home.usageExhausted{Title,Body,Cta} to en (already in non-English locales)
- Mirror remaining missing keys from en chunks into all 12 locales so the
  i18n coverage gate has 0 missing/extra/drifted entries
- Update MemoryDebugPanel test to assert on the translated key (mock returns
  keys as-is)
- Update Skills composio-catalog test: button label is now "Try again"
- Update AIPanel test: i18n value uses "..." not "…"
@senamakel senamakel merged commit b08998d into tinyhumansai:main May 24, 2026
25 of 26 checks passed
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