Skip to content

fix(i18n): translate locale fallback strings#3004

Merged
senamakel merged 6 commits into
tinyhumansai:mainfrom
senamakel:fix/i18n-locale-coverage
May 30, 2026
Merged

fix(i18n): translate locale fallback strings#3004
senamakel merged 6 commits into
tinyhumansai:mainfrom
senamakel:fix/i18n-locale-coverage

Conversation

@senamakel

@senamakel senamakel commented May 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces English fallback/stub copy in non-English locale chunks with native translations for the highest-impact app UI surfaces.
  • Covers Settings, developer options, MCP, memory sources/status, routines, graph centrality, task board, intelligence tasks, and approval UI across supported non-English locales.
  • Keeps English as the source of truth while preserving product names, acronyms, placeholders, URLs, filenames, commands, model IDs, and other technical literals.
  • Aligns i18n coverage tooling so Korean and Polish are included consistently in the script, mirror helper, and Vitest coverage test.

Problem

  • Several non-English locale chunks had complete key parity but still rendered English values because missing keys had been mirrored from English, and Polish chunks intentionally spread English as a base.
  • The coverage surfaces also disagreed on locale coverage: ko was absent from the CLI coverage locale list and pl was absent from the mirror helper/test coverage list.

Solution

  • Translated English-identical user-facing strings in each non-English locale chunk for the major app surfaces, using current English values as the accurate source.
  • Preserved intentional English-identical technical values such as ID, Ollama, auth-profiles.json, URL placeholders, examples, and command/model identifiers.
  • Added ko/pl to the relevant i18n coverage/mirror locale lists so parity checks match the app's supported locales.

Submission Checklist

If a section does not apply to this change, mark the item as N/A with a one-line reason. Do not delete items.

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy
  • Diff coverage >= 80% - N/A: translation-only chunk update; targeted i18n parity coverage was updated and run, full diff coverage was not run locally.
  • Coverage matrix updated - N/A: translation/i18n resource change only; no feature coverage matrix row added/removed/renamed.
  • All affected feature IDs from the matrix are listed in the PR description under ## Related - N/A: no feature matrix IDs affected.
  • 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-cut smoke surface changed.
  • Linked issue closed via Closes #NNN in the ## Related section - N/A: no linked issue provided.

Impact

  • Runtime/platform impact: desktop UI translations only; no runtime logic, storage, RPC, or platform behavior changes.
  • Compatibility: existing i18n keys remain complete with zero missing, extra, or drifted keys across supported locales.
  • Remaining English-identical values are intentionally preserved technical literals or short code-like labels.

Related

  • Closes: N/A
  • Follow-up PR(s)/TODOs: Continue translator review for low-priority or intentionally ambiguous short labels that remain English-identical.

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: fix/i18n-locale-coverage
  • Commit SHA: 3c8adb697284e2e12d38749f21e2e4d0469f5ec5

Validation Run

  • pnpm --filter openhuman-app format:check (via pre-push hook)
  • pnpm typecheck
  • Focused tests: pnpm debug unit src/lib/i18n/__tests__/coverage.test.ts; pnpm exec tsx scripts/i18n-coverage.ts --json --no-unused
  • Rust fmt/check (if changed): cargo fmt --manifest-path ../Cargo.toml --all --check (via app format:check pre-push hook)
  • Tauri fmt/check (if changed): cargo fmt --manifest-path src-tauri/Cargo.toml --all --check; cargo check --manifest-path src-tauri/Cargo.toml (via pre-push hook)

Validation Blocked

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

Behavior Changes

  • Intended behavior change: non-English app UI surfaces show native translated copy instead of English fallback copy where values had been mirrored from English.
  • User-visible effect: users on supported non-English locales see fewer English strings in Settings, MCP, memory, routines, task board, and related UI surfaces.

Parity Contract

  • Legacy behavior preserved: i18n key coverage remains complete, with no missing/extra/drifted locale keys.
  • Guard/fallback/dispatch parity checks: scripts/i18n-coverage.ts --json --no-unused reports missing=0, extra=0, drift=0 for all supported non-English locales.

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 30, 2026 04:07
@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@senamakel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 26 seconds. Learn how PR review limits work.

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

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd25a8ea-c573-4300-965e-d7f399f23ca9

📥 Commits

Reviewing files that changed from the base of the PR and between c3ee5d4 and d97c7e7.

📒 Files selected for processing (92)
  • .claude/memory.md
  • AGENTS.md
  • CLAUDE.md
  • app/src/lib/i18n/__tests__/coverage.test.ts
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/chunks/ar-1.ts
  • app/src/lib/i18n/chunks/ar-2.ts
  • app/src/lib/i18n/chunks/ar-3.ts
  • app/src/lib/i18n/chunks/ar-4.ts
  • app/src/lib/i18n/chunks/ar-5.ts
  • app/src/lib/i18n/chunks/bn-1.ts
  • app/src/lib/i18n/chunks/bn-2.ts
  • app/src/lib/i18n/chunks/bn-3.ts
  • app/src/lib/i18n/chunks/bn-4.ts
  • app/src/lib/i18n/chunks/bn-5.ts
  • app/src/lib/i18n/chunks/de-1.ts
  • app/src/lib/i18n/chunks/de-2.ts
  • app/src/lib/i18n/chunks/de-3.ts
  • app/src/lib/i18n/chunks/de-4.ts
  • app/src/lib/i18n/chunks/de-5.ts
  • app/src/lib/i18n/chunks/en-1.ts
  • app/src/lib/i18n/chunks/en-2.ts
  • app/src/lib/i18n/chunks/en-3.ts
  • app/src/lib/i18n/chunks/en-4.ts
  • app/src/lib/i18n/chunks/en-5.ts
  • app/src/lib/i18n/chunks/es-1.ts
  • app/src/lib/i18n/chunks/es-2.ts
  • app/src/lib/i18n/chunks/es-3.ts
  • app/src/lib/i18n/chunks/es-4.ts
  • app/src/lib/i18n/chunks/es-5.ts
  • app/src/lib/i18n/chunks/fr-1.ts
  • app/src/lib/i18n/chunks/fr-2.ts
  • app/src/lib/i18n/chunks/fr-3.ts
  • app/src/lib/i18n/chunks/fr-4.ts
  • app/src/lib/i18n/chunks/fr-5.ts
  • app/src/lib/i18n/chunks/hi-1.ts
  • app/src/lib/i18n/chunks/hi-2.ts
  • app/src/lib/i18n/chunks/hi-3.ts
  • app/src/lib/i18n/chunks/hi-4.ts
  • app/src/lib/i18n/chunks/hi-5.ts
  • app/src/lib/i18n/chunks/id-1.ts
  • app/src/lib/i18n/chunks/id-2.ts
  • app/src/lib/i18n/chunks/id-3.ts
  • app/src/lib/i18n/chunks/id-4.ts
  • app/src/lib/i18n/chunks/id-5.ts
  • app/src/lib/i18n/chunks/it-1.ts
  • app/src/lib/i18n/chunks/it-2.ts
  • app/src/lib/i18n/chunks/it-3.ts
  • app/src/lib/i18n/chunks/it-4.ts
  • app/src/lib/i18n/chunks/it-5.ts
  • app/src/lib/i18n/chunks/ko-1.ts
  • app/src/lib/i18n/chunks/ko-2.ts
  • app/src/lib/i18n/chunks/ko-3.ts
  • app/src/lib/i18n/chunks/ko-4.ts
  • app/src/lib/i18n/chunks/ko-5.ts
  • app/src/lib/i18n/chunks/pl-1.ts
  • app/src/lib/i18n/chunks/pl-2.ts
  • app/src/lib/i18n/chunks/pl-3.ts
  • app/src/lib/i18n/chunks/pl-4.ts
  • app/src/lib/i18n/chunks/pl-5.ts
  • app/src/lib/i18n/chunks/pt-1.ts
  • app/src/lib/i18n/chunks/pt-2.ts
  • app/src/lib/i18n/chunks/pt-3.ts
  • app/src/lib/i18n/chunks/pt-4.ts
  • app/src/lib/i18n/chunks/pt-5.ts
  • app/src/lib/i18n/chunks/ru-1.ts
  • app/src/lib/i18n/chunks/ru-2.ts
  • app/src/lib/i18n/chunks/ru-3.ts
  • app/src/lib/i18n/chunks/ru-4.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-2.ts
  • app/src/lib/i18n/chunks/zh-CN-3.ts
  • app/src/lib/i18n/chunks/zh-CN-4.ts
  • app/src/lib/i18n/chunks/zh-CN-5.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • package.json
  • scripts/apply-i18n-translations.ts
  • scripts/i18n-coverage.ts
  • scripts/i18n-find-english.ts
  • scripts/i18n-mirror-missing.mjs

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

senamakel added 5 commits May 29, 2026 21:10
…erage

# Conflicts:
#	app/src/lib/i18n/chunks/ar-1.ts
#	app/src/lib/i18n/chunks/ar-4.ts
#	app/src/lib/i18n/chunks/bn-1.ts
#	app/src/lib/i18n/chunks/bn-4.ts
#	app/src/lib/i18n/chunks/de-1.ts
#	app/src/lib/i18n/chunks/de-4.ts
#	app/src/lib/i18n/chunks/es-1.ts
#	app/src/lib/i18n/chunks/es-4.ts
#	app/src/lib/i18n/chunks/fr-1.ts
#	app/src/lib/i18n/chunks/fr-4.ts
#	app/src/lib/i18n/chunks/hi-1.ts
#	app/src/lib/i18n/chunks/hi-4.ts
#	app/src/lib/i18n/chunks/id-1.ts
#	app/src/lib/i18n/chunks/it-1.ts
#	app/src/lib/i18n/chunks/it-4.ts
#	app/src/lib/i18n/chunks/ko-1.ts
#	app/src/lib/i18n/chunks/ko-4.ts
#	app/src/lib/i18n/chunks/pt-1.ts
#	app/src/lib/i18n/chunks/pt-4.ts
#	app/src/lib/i18n/chunks/ru-1.ts
#	app/src/lib/i18n/chunks/ru-4.ts
#	app/src/lib/i18n/chunks/zh-CN-1.ts
#	app/src/lib/i18n/chunks/zh-CN-4.ts
…nslate leftovers

- Merge chunks/<locale>-{1..5}.ts into a single app/src/lib/i18n/<locale>.ts
  per locale (en.ts remains the source of truth). Removes 70 chunk files,
  the en.ts<->chunks drift guard, per-chunk drift detection, and the one-off
  mirror helper.
- Rewrite scripts/i18n-coverage.ts, apply-i18n-translations.ts and the Vitest
  coverage test for the single-file model.
- Translate remaining English-identical UI strings into all 13 non-English
  locales (~2,300 strings); preserve placeholders, brand names, model IDs,
  paths, commands and other technical literals.
- Update CLAUDE.md / AGENTS.md / .claude/memory.md i18n conventions.

Parity unchanged (missing=0, extra=0 all locales); untranslated counts drop
sharply, residue is intentional technical literals.
…etector

The coverage gate only flags values byte-identical to the current en string,
so it was blind to 'stale English' — values translated from an older en
string that since changed (e.g. settings.search.allowedSitesHint) and English
prose that simply differs from current en.

- Add scripts/i18n-find-english.ts (pnpm i18n:english:check): script-coverage
  detection for non-Latin locales, English-only function-word detection for
  Latin locales (vocabulary-ratio is unreliable due to cognates), with a
  reviewed INTENTIONAL_ENGLISH allowlist for brand names / commands / paths /
  units / cognates. Exits non-zero on any non-allowlisted English so it can
  gate CI.
- Translate the genuine English/stale-English values it surfaced across all 13
  locales (mcp.health.*, mcp.inventory.*, memorySources URLs, Knowledge Graph
  Centrality, Knowledge vaults, Configuration assistant, Invalid JSON, etc.).
- Document the new gate in CLAUDE.md.

Detector now reports 0 unexpected English for every locale.
…erage

# Conflicts:
#	app/src/lib/i18n/chunks/ar-2.ts
#	app/src/lib/i18n/chunks/bn-2.ts
#	app/src/lib/i18n/chunks/de-2.ts
#	app/src/lib/i18n/chunks/en-2.ts
#	app/src/lib/i18n/chunks/es-2.ts
#	app/src/lib/i18n/chunks/fr-2.ts
#	app/src/lib/i18n/chunks/hi-2.ts
#	app/src/lib/i18n/chunks/id-2.ts
#	app/src/lib/i18n/chunks/it-2.ts
#	app/src/lib/i18n/chunks/ko-2.ts
#	app/src/lib/i18n/chunks/pl-2.ts
#	app/src/lib/i18n/chunks/pt-2.ts
#	app/src/lib/i18n/chunks/ru-2.ts
#	app/src/lib/i18n/chunks/zh-CN-2.ts
Upstream added 23 agent-editor keys to en.ts; mirrored into all 13 locales
and translated the 21 non-technical ones. Parity, English-leftover detector,
typecheck and i18n tests all green.
@senamakel senamakel merged commit c7e9d85 into tinyhumansai:main May 30, 2026
27 checks passed
senamakel added a commit to senamakel/openhuman that referenced this pull request May 30, 2026
Resolves the i18n conflict from upstream tinyhumansai#3004 (chunked
chunks/<locale>-N.ts layout retired → single flat <locale>.ts files):
- Accept upstream's deletion of all chunks/* files.
- Re-home the conversations.subagent.* keys into en.ts (already auto-merged)
  and add them to every flat locale file with REAL translations (not English
  placeholders) — satisfies both i18n:check (parity) and i18n:english:check
  (no untranslated English).
- CLAUDE.md i18n rule updated: locale files must carry actual translations,
  never English placeholders.
staimoorulhassan pushed a commit to staimoorulhassan/openhuman that referenced this pull request May 30, 2026
…olithic locale files

Upstream (tinyhumansai#3004) deleted all i18n chunk files and merged them into
per-locale monolithic files (ar.ts, bn.ts, …). The mic.retryingTranscription
key added by this PR was in the now-deleted *-2.ts chunks; moved it to the
corresponding line (after mic.transcribing) in each of the 13 locale files.
en.ts already contained the key from the auto-merge.
senamakel added a commit to senamakel/openhuman that referenced this pull request Jun 6, 2026
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