Skip to content

fix(i18n): localize settings developer menu#2250

Merged
senamakel merged 3 commits into
tinyhumansai:mainfrom
aqilaziz:codex/OH-2225-settings-i18n
May 20, 2026
Merged

fix(i18n): localize settings developer menu#2250
senamakel merged 3 commits into
tinyhumansai:mainfrom
aqilaziz:codex/OH-2225-settings-i18n

Conversation

@aqilaziz
Copy link
Copy Markdown
Contributor

@aqilaziz aqilaziz commented May 19, 2026

Summary

  • Localizes the Settings home labels for Appearance and Mascot menu entries.
  • Localizes every Developer Options menu title and description instead of hard-coding English strings.
  • Adds matching i18n keys across locale chunks so the key coverage check stays balanced.
  • Adds focused zh-CN regression coverage for Settings home and Developer Options menu rendering.

Problem

Solution

  • Replaced Developer Options menu literals with translation keys and resolved labels through useTranslation.
  • Added Settings home translation keys for Appearance and Mascot menu labels/descriptions.
  • Added the new keys to English and locale chunk files, with Simplified Chinese values for the reported screen.
  • Updated focused tests to assert Simplified Chinese rendering for the affected Settings surfaces.

Submission Checklist

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy
  • Diff coverage >= 80% - N/A: pnpm test:coverage was not run locally; focused Vitest coverage for the changed Settings/i18n surfaces passes.
  • Coverage matrix updated - N/A: no feature row was added, removed, or renamed.
  • All affected feature IDs from the matrix are listed in the PR description under ## Related - N/A: no coverage-matrix feature ID 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: translation-only Settings UI change.
  • Linked issue closed via Closes #NNN in the ## Related section

Impact

  • Desktop/web Settings UI now shows localized labels for the affected menu entries.
  • No persistence, migration, security, performance, or network behavior changes.

Related


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

Linear Issue

  • Key: N/A - GitHub issue only.
  • URL: N/A - GitHub issue only.

Commit & Branch

  • Branch: codex/OH-2225-settings-i18n
  • Commit SHA: d430a84

Validation Run

  • Direct Prettier check for changed files: node_modules\.bin\prettier.cmd --check src/components/settings/SettingsHome.tsx src/components/settings/__tests__/SettingsHome.test.tsx src/components/settings/panels/DeveloperOptionsPanel.tsx src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx src/lib/i18n/en.ts src/lib/i18n/chunks/*-5.ts
  • pnpm typecheck
  • Focused tests: pnpm --filter openhuman-app test -- src/lib/i18n/__tests__/coverage.test.ts src/components/settings/__tests__/SettingsHome.test.tsx src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx
  • pnpm i18n:check
  • pnpm --filter openhuman-app compile
  • Direct ESLint for changed app files: node_modules\.bin\eslint.cmd src/components/settings/SettingsHome.tsx src/components/settings/__tests__/SettingsHome.test.tsx src/components/settings/panels/DeveloperOptionsPanel.tsx src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx src/lib/i18n/en.ts src/lib/i18n/chunks --ext .ts,.tsx --cache
  • Rust fmt/check (if changed): N/A - no Rust changes.
  • Tauri fmt/check (if changed): N/A - no Tauri changes.

Validation Blocked

  • command: pnpm --filter openhuman-app format:check

  • error: Repo-wide Prettier check reports 846 pre-existing files needing formatting; direct Prettier check for changed files passes.

  • impact: Formatting validation for this PR's changed files is covered, but the full repo check remains blocked by existing unrelated formatting drift.

  • command: pnpm --filter openhuman-app lint -- ...

  • error: The app lint script runs the full app and fails on existing unrelated lint errors; direct ESLint for changed files passes.

  • impact: Lint validation for this PR's changed files is covered, but the full app lint gate remains blocked by existing unrelated lint debt.

  • command: pnpm test:coverage

  • error: Not run locally due full-suite scope; focused Vitest regression tests and i18n coverage check were run.

  • impact: Diff coverage is left to CI; changed Settings/i18n behavior has focused regression coverage.

Behavior Changes

  • Intended behavior change: Settings Developer Options, Appearance, and Mascot menu labels can render through locale resources.
  • User-visible effect: Simplified Chinese users see translated labels for the reported Settings entries.

Parity Contract

  • Legacy behavior preserved: English strings remain equivalent through the English locale resources.
  • Guard/fallback/dispatch parity checks: Existing i18n fallback behavior is unchanged; i18n coverage check passes.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): None found for aqilaziz:codex/OH-2225-settings-i18n.
  • Canonical PR: This PR.
  • Resolution (closed/superseded/updated): N/A.

Summary by CodeRabbit

  • New Features

    • Settings now use i18n for Appearance and Mascot menu content; a new Developer Menu section is localized.
    • Translation packs expanded for Arabic, Bengali, Spanish, French, Hindi, Indonesian, Italian, Portuguese, Russian, and Chinese (Chinese also updates appearance theme strings).
  • Tests

    • Added locale-aware tests verifying localized labels render (including Chinese).

Review Change Stack

@aqilaziz aqilaziz requested a review from a team May 19, 2026 21:20
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6c820ee-cb7e-4727-9740-d84dcc7e6cdc

📥 Commits

Reviewing files that changed from the base of the PR and between 18f6b15 and 4048ff5.

📒 Files selected for processing (1)
  • app/src/lib/i18n/en.ts
✅ Files skipped from review due to trivial changes (1)
  • app/src/lib/i18n/en.ts

📝 Walkthrough

Walkthrough

Replaces hardcoded English strings in SettingsHome and DeveloperOptionsPanel with i18n keys, adds corresponding translation entries across multiple language chunks, and updates tests to render components with locale-aware providers and preloaded locale state.

Changes

Settings UI i18n Integration

Layer / File(s) Summary
SettingsHome appearance and mascot i18n integration
app/src/components/settings/SettingsHome.tsx, app/src/components/settings/__tests__/SettingsHome.test.tsx
Appearance and Mascot menu items now use t('settings.appearance.*') and t('settings.mascot.*') for localized text. Test helpers accept locale and withI18n, and a new test verifies Chinese localization via I18nProvider + preloaded Redux locale state.
DeveloperOptionsPanel i18n refactor and testing
app/src/components/settings/panels/DeveloperOptionsPanel.tsx, app/src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx
All developerItems entries refactored to use titleKey/descriptionKey; rendering now calls t(item.titleKey) / t(item.descriptionKey). New test renders the panel with zh-CN locale and asserts localized labels.
Base English translation keys for developer menu and appearance
app/src/lib/i18n/en.ts, app/src/lib/i18n/chunks/en-5.ts
Added new English translation strings covering settings.developerMenu.* (developer menu titles/descriptions), settings.appearance.menuDesc, and settings.mascot.menuTitle/settings.mascot.menuDesc.
Translated chunks for all languages
app/src/lib/i18n/chunks/{ar,bn,es,fr,hi,id,it,pt,ru,zh-CN}-5.ts
Extended each language chunk with settings.developerMenu.*, settings.appearance.menuDesc, and mascot menu keys. zh-CN chunk also replaces existing settings.appearance.* theme/mode labels and descriptions with Chinese translations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

feature

Suggested reviewers

  • graycyrus

Poem

🐰 I hopped through strings both short and long,

Now Settings sings a local song.
Appearance, Mascot, Developer too—
Speak in Chinese, French, and you.
Hooray! Translations dancing through!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(i18n): localize settings developer menu' is specific and directly describes the main change of localizing hardcoded English strings in the settings developer menu.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from issue #2225: replaces hardcoded English strings in DeveloperOptionsPanel with i18n keys, adds i18n keys for Appearance and Mascot, provides Chinese translations, and includes test coverage.
Out of Scope Changes check ✅ Passed All changes directly support the objectives in issue #2225, including component updates, i18n keys, translations across all supported locales, and test coverage for the affected Settings screens.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot added the working A PR that is being worked on by the team. label May 19, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/lib/i18n/chunks/ar-5.ts`:
- Around line 164-201: The Arabic locale chunk contains untranslated English
values for the developer/mascot/appearance menu keys; replace the English
strings with proper Arabic translations for the listed keys (e.g.
settings.developerMenu.ai.title, settings.developerMenu.ai.desc,
settings.developerMenu.screenAwareness.title,
settings.developerMenu.screenAwareness.desc,
settings.developerMenu.messagingChannels.title,
settings.developerMenu.messagingChannels.desc,
settings.developerMenu.tools.title, settings.developerMenu.tools.desc,
settings.developerMenu.agentChat.title, settings.developerMenu.agentChat.desc,
settings.developerMenu.cronJobs.title, settings.developerMenu.cronJobs.desc,
settings.developerMenu.localModelDebug.title,
settings.developerMenu.localModelDebug.desc,
settings.developerMenu.webhooks.title, settings.developerMenu.webhooks.desc,
settings.developerMenu.intelligence.title,
settings.developerMenu.intelligence.desc,
settings.developerMenu.notificationRouting.title,
settings.developerMenu.notificationRouting.desc,
settings.developerMenu.composeioTriggers.title,
settings.developerMenu.composeioTriggers.desc,
settings.developerMenu.composioRouting.title,
settings.developerMenu.composioRouting.desc,
settings.developerMenu.integrationTriggers.title,
settings.developerMenu.integrationTriggers.desc, settings.appearance.menuDesc)
preserving the exact key names and string formatting/quoting; update only the
string values with accurate Arabic translations and run a quick locale
lint/preview to confirm no syntax or encoding issues.

In `@app/src/lib/i18n/chunks/bn-5.ts`:
- Around line 167-204: The new Bengali locale entries for keys like
'settings.developerMenu.ai.title', 'settings.developerMenu.ai.desc',
'settings.developerMenu.screenAwareness.title',
'settings.developerMenu.screenAwareness.desc',
'settings.developerMenu.messagingChannels.title',
'settings.developerMenu.messagingChannels.desc',
'settings.developerMenu.tools.title', 'settings.developerMenu.tools.desc',
'settings.developerMenu.agentChat.title',
'settings.developerMenu.agentChat.desc',
'settings.developerMenu.cronJobs.title', 'settings.developerMenu.cronJobs.desc',
'settings.developerMenu.localModelDebug.title',
'settings.developerMenu.localModelDebug.desc',
'settings.developerMenu.webhooks.title', 'settings.developerMenu.webhooks.desc',
'settings.developerMenu.intelligence.title',
'settings.developerMenu.intelligence.desc',
'settings.developerMenu.notificationRouting.title',
'settings.developerMenu.notificationRouting.desc',
'settings.developerMenu.composeioTriggers.title',
'settings.developerMenu.composeioTriggers.desc',
'settings.developerMenu.composioRouting.title',
'settings.developerMenu.composioRouting.desc',
'settings.developerMenu.integrationTriggers.title',
'settings.developerMenu.integrationTriggers.desc', and
'settings.appearance.menuDesc' are still in English; replace each English string
with the correct Bengali translation so the bn-5.ts locale file is fully
localized (apply same fix for the entries around lines 212–213 mentioned in the
review). Ensure translations preserve intent and any punctuation and update only
the string values for those keys.

In `@app/src/lib/i18n/chunks/es-5.ts`:
- Around line 170-207: The new Spanish locale entries under keys like
'settings.developerMenu.ai.title', 'settings.developerMenu.ai.desc',
'settings.developerMenu.screenAwareness.title', etc. are still in English;
translate each English string into proper Spanish and replace the values in
es-5.ts for all entries shown (including the ones noted at the end: the entries
at lines referenced as 215–216), ensuring the keys remain unchanged and
punctuation/formatting (line breaks, quotes, commas) is preserved.

In `@app/src/lib/i18n/chunks/fr-5.ts`:
- Around line 172-209: The French locale file fr-5.ts contains English values
for multiple keys (e.g. settings.developerMenu.ai.title,
settings.developerMenu.ai.desc, settings.developerMenu.screenAwareness.title,
settings.developerMenu.messagingChannels.title,
settings.developerMenu.tools.desc, settings.developerMenu.agentChat.desc,
settings.developerMenu.cronJobs.desc,
settings.developerMenu.localModelDebug.desc,
settings.developerMenu.webhooks.desc, settings.developerMenu.intelligence.desc,
settings.developerMenu.notificationRouting.desc,
settings.developerMenu.composeioTriggers.desc,
settings.developerMenu.composioRouting.desc,
settings.developerMenu.integrationTriggers.desc, settings.appearance.menuDesc
and the items noted at lines 217-218); replace each English string with an
accurate French translation while keeping the exact keys unchanged, preserving
punctuation and intent (concise UI phrasing), and ensure any remaining lines
referenced (217-218) are similarly translated to French before committing.

In `@app/src/lib/i18n/chunks/hi-5.ts`:
- Around line 168-205: The Hindi locale file contains English strings for new
keys (e.g. settings.developerMenu.* keys such as
'settings.developerMenu.ai.title',
'settings.developerMenu.screenAwareness.desc',
'settings.developerMenu.composeioTriggers.desc', and
'settings.appearance.menuDesc' among others); replace those English values with
their correct Hindi translations so the Hindi chunk hi-5.ts fully localizes the
Developer, Appearance and Mascot menu content, updating every key in the shown
block (lines containing settings.developerMenu.* and
settings.appearance.menuDesc) to Hindi equivalents while keeping the keys
unchanged.

In `@app/src/lib/i18n/chunks/id-5.ts`:
- Around line 168-205: Replace the English placeholders in this Indonesian
locale file by translating the developer-menu and nearby labels into Indonesian:
update all keys from 'settings.developerMenu.ai.title' through
'settings.developerMenu.composioRouting.desc' to Indonesian-language strings
(each '.title' and '.desc' pair), and also translate
'settings.appearance.menuDesc' and the mascot/other labels referenced around the
same block; keep the key names identical and only change the string values so
the Settings UI shows full Indonesian text.

In `@app/src/lib/i18n/chunks/it-5.ts`:
- Around line 170-207: The new Italian locale entries are still in
English—translate the developer menu and mascot strings into Italian by
replacing the English values for the listed keys (e.g.
settings.developerMenu.ai.title, settings.developerMenu.ai.desc,
settings.developerMenu.screenAwareness.title,
settings.developerMenu.screenAwareness.desc,
settings.developerMenu.messagingChannels.*, settings.developerMenu.tools.*,
settings.developerMenu.agentChat.*, settings.developerMenu.cronJobs.*,
settings.developerMenu.localModelDebug.*, settings.developerMenu.webhooks.*,
settings.developerMenu.intelligence.*,
settings.developerMenu.notificationRouting.*,
settings.developerMenu.composeioTriggers.*,
settings.developerMenu.composioRouting.*,
settings.developerMenu.integrationTriggers.*, and settings.appearance.menuDesc
plus the mascot labels referenced around lines 215-216) with proper Italian
translations, preserving punctuation and any contextual hints; ensure tone and
terminology match existing it-5.ts conventions and verify no English strings
remain.

In `@app/src/lib/i18n/chunks/pt-5.ts`:
- Around line 171-208: Several new settings keys (e.g.,
'settings.developerMenu.ai.title', 'settings.developerMenu.ai.desc',
'settings.developerMenu.screenAwareness.title',
'settings.developerMenu.screenAwareness.desc',
'settings.developerMenu.messagingChannels.*', 'settings.developerMenu.tools.*',
'settings.developerMenu.agentChat.*', 'settings.developerMenu.cronJobs.*',
'settings.developerMenu.localModelDebug.*', 'settings.developerMenu.webhooks.*',
'settings.developerMenu.intelligence.*',
'settings.developerMenu.notificationRouting.*',
'settings.developerMenu.composeioTriggers.*',
'settings.developerMenu.composioRouting.*',
'settings.developerMenu.integrationTriggers.*' and the entries around 216-217)
are still in English; replace each English string with an accurate Portuguese
translation (matching tone and length of existing pt-5.ts entries), keep the
same key names, preserve punctuation, and run a quick CI/lint check to ensure no
trailing commas or syntax errors after updating the values.

In `@app/src/lib/i18n/chunks/ru-5.ts`:
- Around line 168-205: The new Russian locale file ru-5.ts contains English text
for the Developer Menu and Mascot menu keys; replace the English values with
proper Russian translations for the listed keys (e.g.,
'settings.developerMenu.ai.title', 'settings.developerMenu.ai.desc',
'settings.developerMenu.screenAwareness.title',
'settings.developerMenu.screenAwareness.desc',
'settings.developerMenu.messagingChannels.title',
'settings.developerMenu.messagingChannels.desc',
'settings.developerMenu.tools.title', 'settings.developerMenu.tools.desc',
'settings.developerMenu.agentChat.title',
'settings.developerMenu.agentChat.desc',
'settings.developerMenu.cronJobs.title', 'settings.developerMenu.cronJobs.desc',
'settings.developerMenu.localModelDebug.title',
'settings.developerMenu.localModelDebug.desc',
'settings.developerMenu.webhooks.title', 'settings.developerMenu.webhooks.desc',
'settings.developerMenu.intelligence.title',
'settings.developerMenu.intelligence.desc',
'settings.developerMenu.notificationRouting.title',
'settings.developerMenu.notificationRouting.desc',
'settings.developerMenu.composeioTriggers.title',
'settings.developerMenu.composeioTriggers.desc',
'settings.developerMenu.composioRouting.title',
'settings.developerMenu.composioRouting.desc',
'settings.developerMenu.integrationTriggers.title',
'settings.developerMenu.integrationTriggers.desc', and also the mascot/menu
entries around lines 213-214); locate these keys in ru-5.ts and replace each
English string with the correct Russian translation, keeping punctuation and
formatting consistent with other locale entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bc21c9a2-cba8-4cb3-b5ef-f0d02dd01e2c

📥 Commits

Reviewing files that changed from the base of the PR and between 62a9633 and d430a84.

📒 Files selected for processing (16)
  • app/src/components/settings/SettingsHome.tsx
  • app/src/components/settings/__tests__/SettingsHome.test.tsx
  • app/src/components/settings/panels/DeveloperOptionsPanel.tsx
  • app/src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx
  • app/src/lib/i18n/chunks/ar-5.ts
  • app/src/lib/i18n/chunks/bn-5.ts
  • app/src/lib/i18n/chunks/en-5.ts
  • app/src/lib/i18n/chunks/es-5.ts
  • app/src/lib/i18n/chunks/fr-5.ts
  • app/src/lib/i18n/chunks/hi-5.ts
  • app/src/lib/i18n/chunks/id-5.ts
  • app/src/lib/i18n/chunks/it-5.ts
  • app/src/lib/i18n/chunks/pt-5.ts
  • app/src/lib/i18n/chunks/ru-5.ts
  • app/src/lib/i18n/chunks/zh-CN-5.ts
  • app/src/lib/i18n/en.ts

Comment thread app/src/lib/i18n/chunks/ar-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/bn-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/es-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/fr-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/hi-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/id-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/it-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/pt-5.ts Outdated
Comment thread app/src/lib/i18n/chunks/ru-5.ts Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 19, 2026
# Conflicts:
#	app/src/components/settings/SettingsHome.tsx
#	app/src/components/settings/panels/DeveloperOptionsPanel.tsx
@coderabbitai coderabbitai Bot added the feature Net-new user-facing capability or product behavior. label May 19, 2026
@senamakel senamakel merged commit 82df98f into tinyhumansai:main May 20, 2026
28 of 31 checks passed
mtkik pushed a commit to mtkik/openhuman-meet that referenced this pull request May 21, 2026
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
CodeGhost21 pushed a commit to CodeGhost21/openhuman that referenced this pull request May 22, 2026
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
AusAgentSmith pushed a commit to AusAgentSmith/openhuman that referenced this pull request May 23, 2026
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n: Settings UI contains hardcoded English strings (DeveloperOptionsPanel + Appearance/Mascot)

2 participants