Skip to content

fix(i18n): correct key/value semantic mismatch in chunk-5 locale files#2765

Merged
graycyrus merged 2 commits into
tinyhumansai:mainfrom
graycyrus:fix/i18n-fix-key-value-semantic-mismatch-in-2740
May 27, 2026
Merged

fix(i18n): correct key/value semantic mismatch in chunk-5 locale files#2765
graycyrus merged 2 commits into
tinyhumansai:mainfrom
graycyrus:fix/i18n-fix-key-value-semantic-mismatch-in-2740

Conversation

@graycyrus
Copy link
Copy Markdown
Contributor

@graycyrus graycyrus commented May 27, 2026

Summary

  • Fix 3 i18n keys in Polish locale chunk (pl-5.ts) where values were semantically inverted
  • settings.cron.jobs.paused showed "Włączone" (Enabled) instead of "Wstrzymane" (Paused)
  • webhooks.tunnels.enableEcho showed "Usuń Echo" (Remove) instead of "Włącz Echo" (Enable)
  • webhooks.tunnels.inactive showed "Aktywny" (Active) instead of "Nieaktywny" (Inactive)
  • All other locales were already fixed upstream; Polish was the only remaining mismatch

Problem

Solution

  • Changed the values (not keys) in pl-5.ts to match each key's semantic meaning
  • Confirmed correctness at all 3 call sites:
    • CoreJobList.tsx:70 — ternary uses paused in the !enabled branch
    • TunnelList.tsx:228 — ternary uses inactive in the !isActive branch
    • TunnelList.tsx:271 — ternary uses enableEcho in the !isEchoRegistered branch

Submission Checklist

  • N/A: Tests — pure string value changes in static i18n objects, no logic changed
  • N/A: Diff coverage — no executable code changed, only translation string literals
  • N/A: Coverage matrix — no features added/removed/renamed
  • N/A: Related feature IDs — no feature matrix rows affected
  • N/A: No new external network dependencies
  • N/A: Manual smoke checklist — no release-cut surfaces touched
  • Linked issue closed via Closes #2740

Impact

  • Desktop: corrects mislabeled toggle states in Polish locale for Cron Jobs settings and Webhook Tunnels UI
  • No performance, security, migration, or compatibility implications

Related


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

Linear Issue

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

Commit & Branch

  • Branch: fix/i18n-fix-key-value-semantic-mismatch-in-2740
  • Commit SHA: 8249402

Validation Run

  • pnpm --filter openhuman-app format:check — passes (only pl-5.ts changed)
  • pnpm typecheck — clean
  • Focused tests: N/A — no executable code changed
  • Rust fmt/check (if changed): N/A
  • Tauri fmt/check (if changed): N/A

Validation Blocked

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

Behavior Changes

  • Intended behavior change: Polish toggle labels now display the correct state text
  • User-visible effect: paused jobs show "Wstrzymane", inactive tunnels show "Nieaktywny", echo toggle shows "Włącz Echo"

Parity Contract

  • Legacy behavior preserved: key names unchanged, call sites unchanged
  • Guard/fallback/dispatch parity checks: N/A

Duplicate / Superseded PR Handling

  • Duplicate PR(s): none
  • Canonical PR: this one
  • Resolution: N/A

Summary by CodeRabbit

  • Localization
    • Updated Polish language labels for cron status displays
    • Improved Polish translations for webhook tunnel Echo toggle and related status indicators

Review Change Stack

@graycyrus graycyrus requested a review from a team May 27, 2026 13:49
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

📝 Walkthrough

Walkthrough

Polish locale chunk updates three translation strings for semantic alignment. The cron "paused" label, webhook Echo toggle text, and webhook "inactive" state label are all corrected to match the intended meaning of their keys.

Changes

Polish translation fixes

Layer / File(s) Summary
Polish translation semantic corrections
app/src/lib/i18n/chunks/pl-5.ts
Updates settings.cron.jobs.paused from prior value to "Wstrzymane"; updates webhooks.tunnels.enableEcho to "Włącz Echo" and webhooks.tunnels.inactive to "Nieaktywny".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • tinyhumansai/openhuman#2743: Applies the same i18n semantic corrections across multiple locale chunks for cron paused status and webhook tunnel Echo/inactive labels.
  • tinyhumansai/openhuman#2144: Addresses the same translation key semantic mismatch in the English locale source file.

Suggested reviewers

  • M3gA-Mind

Poem

🐰 A Polish tongue finds clarity,
Labels true to what they say—
Paused is paused, Echo's bright,
No more confusion in the way! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: correcting semantic mismatches between i18n keys and values in chunk-5 locale files.
Linked Issues check ✅ Passed The PR successfully addresses all three coding requirements from issue #2740: corrects paused/enableEcho/inactive values across all affected locale chunks and maintains semantic consistency with key names.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the semantic mismatches identified in issue #2740; only translation strings in i18n chunk-5 files were modified, with no unrelated code alterations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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


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

@coderabbitai coderabbitai Bot added feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team. bug labels May 27, 2026
Copy link
Copy Markdown
Contributor Author

@graycyrus graycyrus left a comment

Choose a reason for hiding this comment

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

@graycyrus CI is pending so I'll hold the APPROVE for now. Spotted a few things while reviewing:

Change Summary

Area Files What changed
i18n fix 12 locale chunk-5 files, en.ts 3 inverted translation values corrected (closes #2740)
New feature DevWorkflowPanel.tsx, Settings.tsx, DeveloperOptionsPanel.tsx, useSettingsNavigation.ts Dev Workflow settings panel for autonomous GitHub agent config
API layer composioApi.ts, types.ts listGithubRepos() + supporting types added
Rust provider.rs, sync.rs, tests.rs, tools.rs Composio action slugs corrected to match catalog; 3 deprecated tools removed

Issues

[major] listGithubRepos in composioApi.ts is dead code. The panel imports execute as composioExecute and calls it directly with GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USERlistGithubRepos is never imported or called anywhere. Either wire the panel to use it (and drop the inline composioExecute call), or remove it. Shipping an unused export that wraps a different RPC method than what the panel actually uses is going to cause confusion.

[major] loadSavedConfig() casts JSON.parse(raw) directly to DevWorkflowConfig without any field validation. If the stored schema diverges from the current interface (shape change, added required fields, etc.), the app silently gets undefined values where strings are expected. A quick guard checking the required fields is enough.

[major] No tests for DevWorkflowPanel. 525 lines, multiple async paths (repo load, fork detection, branch fetch), three distinct error states. At minimum: happy path (repo select → branches load → save persists to localStorage) and the NOT_CONNECTED error path. The checklist marking tests N/A only applies to the i18n fix — not to the new component.

[minor] The active config summary includes a hard-coded "Phase 2: This will automatically create a cron job..." note. That's a WIP placeholder shipping in production UI. Remove or replace with something that isn't a development note.

The i18n fix itself is clean — correct values, all 12 locales covered, it-5.ts left alone as documented. The Rust slug corrections are straightforward and the tests updated to match. Those parts are good to go. Resolve the three majors and get CI green and I'll approve.

AI Summary

What it does: Fixes 3 semantically inverted translation values across 12 locale chunk files (closes #2740); adds a DevWorkflow settings panel that lets users configure an autonomous GitHub issue-to-PR agent via their Composio GitHub connection; corrects Composio action slugs in Rust to match the current catalog and removes 3 deprecated tool entries.

Breaking risk: Low. Key names unchanged, new route additive, Rust slug renames fix incorrect names (active syncs will immediately use correct slugs, which is the intent).

Security risk: Low. DevWorkflowPanel persists repo name/branch/schedule to localStorage — no tokens or credentials. All GitHub data flows through the existing Composio connection layer.

Bottom line: Safe to merge once CI passes and the dead export, JSON cast validation, and missing tests are addressed.

Comment thread app/src/lib/composio/composioApi.ts Outdated
Comment thread app/src/components/settings/panels/DevWorkflowPanel.tsx Outdated
Comment thread app/src/components/settings/panels/DevWorkflowPanel.tsx Outdated
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: 5

🧹 Nitpick comments (1)
app/src/components/settings/panels/DevWorkflowPanel.tsx (1)

4-7: ⚡ Quick win

Use the new typed listGithubRepos() wrapper instead of tool-exec parsing.

This panel still shells through composio_execute and shape-probing, even though a dedicated openhuman.composio_list_github_repos wrapper now exists. Using the wrapper removes brittle parsing and keeps this panel aligned with the new API contract.

Suggested direction
-import {
-  execute as composioExecute,
-  listConnections,
-} from '../../../lib/composio/composioApi';
+import {
+  execute as composioExecute,
+  listConnections,
+  listGithubRepos,
+} from '../../../lib/composio/composioApi';
+import type { ComposioGithubRepo } from '../../../lib/composio/types';
...
-interface ComposioGhRepo {
-  owner: string;
-  repo: string;
-  fullName: string;
-  private?: boolean;
-  defaultBranch?: string;
-  htmlUrl?: string;
-}
...
-const [repos, setRepos] = useState<ComposioGhRepo[]>([]);
+const [repos, setRepos] = useState<ComposioGithubRepo[]>([]);
...
-const res = await composioExecute('GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER', {});
-// shape probing...
-setRepos(repoList);
+const res = await listGithubRepos(ghConn.id);
+setRepos(res.repositories ?? []);

Also applies to: 16-24, 116-157

🤖 Prompt for 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.

In `@app/src/components/settings/panels/DevWorkflowPanel.tsx` around lines 4 - 7,
Replace the ad-hoc shell/parse flow that calls execute as composioExecute and
inspects shapes with the typed wrapper listGithubRepos
(openhuman.composio_list_github_repos); locate where composioExecute is
imported/used in DevWorkflowPanel (and any code blocks between the indicated
regions ~lines 16-24 and 116-157) and swap the logic to call listGithubRepos(),
handle its typed response (repos array/error) instead of parsing stdout, and
remove brittle shape-probing code; ensure imports are updated to pull in
listGithubRepos and adjust downstream state updates and error handling to match
the wrapper's returned types.
🤖 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/components/settings/panels/DevWorkflowPanel.tsx`:
- Around line 49-54: The hard-coded user-visible strings in DevWorkflowPanel
(e.g., the cronOptions array entries like 'Every 30 minutes', 'Every hour',
etc., and other literals between lines 162-173 and 355-517) must be replaced
with useT() keys; update the component to call const t = useT() and use t('key')
for each label/button/status/option string (referencing the cronOptions variable
and any button text or status text in DevWorkflowPanel and related constants),
then add matching keys and English text to app/src/lib/i18n/en.ts in this PR so
localization loads correctly.
- Around line 46-74: The current ad-hoc localStorage usage (STORAGE_KEY,
loadSavedConfig, saveConfig, clearConfig) must be replaced by a Redux Toolkit
slice persisted via redux-persist: create a devWorkflow slice in the app store
(e.g., devWorkflowSlice) that holds DevWorkflowConfig and implements
reducers/actions for load/save/clear, wire it into the store persistence config,
and update DevWorkflowPanel to read and dispatch via useSelector/useDispatch
instead of calling loadSavedConfig/saveConfig/clearConfig; remove direct
localStorage calls and ensure initial state uses the persisted slice selector so
state flows through redux-persist.
- Around line 105-113: The mount useEffect calls loadSavedConfig() and then
calls multiple setters (setSavedConfig, setSelectedRepo, setForkInfo,
setTargetBranch, setSchedule), which triggers the
react-hooks/set-state-in-effect warning; instead initialize component state
lazily from loadSavedConfig by moving that logic into useState lazy initializers
(or consolidate into a single state object) so the effect is no longer required
for initial population—update the useState calls that back savedConfig,
selectedRepo, forkInfo, targetBranch, and schedule to accept a function that
calls loadSavedConfig() and derives initial values, and remove or simplify the
mounting useEffect accordingly.

In `@app/src/lib/i18n/chunks/en-5.ts`:
- Around line 181-185: The new i18n keys
settings.developerMenu.devWorkflow.title,
settings.developerMenu.devWorkflow.desc, and
settings.developerMenu.devWorkflow.panelDesc were added to en-5.ts but not to
the other locale chunk-5 files; add these three keys to every non-English
chunk-5 (ar-5.ts, bn-5.ts, de-5.ts, es-5.ts, fr-5.ts, hi-5.ts, id-5.ts, it-5.ts,
ko-5.ts, pt-5.ts, ru-5.ts, zh-CN-5.ts) and to the English locale chunk file(s)
that correspond, using the exact English strings from en-5.ts as placeholders so
parity is maintained and runtime fallbacks are avoided.

In `@app/src/lib/i18n/en.ts`:
- Around line 2972-2976: Add the three missing i18n keys
('settings.developerMenu.devWorkflow.title',
'settings.developerMenu.devWorkflow.desc',
'settings.developerMenu.devWorkflow.panelDesc') to each non-English chunk-5 file
(ar-5.ts, bn-5.ts, de-5.ts, es-5.ts, fr-5.ts, hi-5.ts, id-5.ts, it-5.ts,
ko-5.ts, pt-5.ts, ru-5.ts, zh-CN-5.ts) so chunk parity matches
app/src/lib/i18n/en.ts; use the English strings from en.ts as placeholders if
translations aren’t available, placing them alongside the other exported
key/value pairs in the same file format and export structure used by each chunk
file to ensure build-time lookup succeeds.

---

Nitpick comments:
In `@app/src/components/settings/panels/DevWorkflowPanel.tsx`:
- Around line 4-7: Replace the ad-hoc shell/parse flow that calls execute as
composioExecute and inspects shapes with the typed wrapper listGithubRepos
(openhuman.composio_list_github_repos); locate where composioExecute is
imported/used in DevWorkflowPanel (and any code blocks between the indicated
regions ~lines 16-24 and 116-157) and swap the logic to call listGithubRepos(),
handle its typed response (repos array/error) instead of parsing stdout, and
remove brittle shape-probing code; ensure imports are updated to pull in
listGithubRepos and adjust downstream state updates and error handling to match
the wrapper's returned types.
🪄 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: fc9cc409-1f3a-4742-80fb-c9efec18425b

📥 Commits

Reviewing files that changed from the base of the PR and between fcb6dcf and ea13c51.

📒 Files selected for processing (23)
  • app/src/components/settings/hooks/useSettingsNavigation.ts
  • app/src/components/settings/panels/DevWorkflowPanel.tsx
  • app/src/components/settings/panels/DeveloperOptionsPanel.tsx
  • app/src/lib/composio/composioApi.ts
  • app/src/lib/composio/types.ts
  • app/src/lib/i18n/chunks/ar-5.ts
  • app/src/lib/i18n/chunks/bn-5.ts
  • app/src/lib/i18n/chunks/de-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/ko-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
  • app/src/pages/Settings.tsx
  • src/openhuman/memory_sync/composio/providers/github/provider.rs
  • src/openhuman/memory_sync/composio/providers/github/sync.rs
  • src/openhuman/memory_sync/composio/providers/github/tests.rs
  • src/openhuman/memory_sync/composio/providers/github/tools.rs

Comment thread app/src/components/settings/panels/DevWorkflowPanel.tsx Outdated
Comment thread app/src/components/settings/panels/DevWorkflowPanel.tsx Outdated
Comment thread app/src/components/settings/panels/DevWorkflowPanel.tsx Outdated
Comment thread app/src/lib/i18n/chunks/en-5.ts Outdated
Comment thread app/src/lib/i18n/en.ts Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 27, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 27, 2026
Three keys had values inverted relative to their key names:
- `settings.cron.jobs.paused`: 'Włączone' (Enabled) → 'Wstrzymane' (Paused)
- `webhooks.tunnels.enableEcho`: 'Usuń Echo' (Remove) → 'Włącz Echo' (Enable)
- `webhooks.tunnels.inactive`: 'Aktywny' (Active) → 'Nieaktywny' (Inactive)

Other locales were already fixed upstream. Polish was the only remaining
locale with these mismatches.

Closes tinyhumansai#2740
@graycyrus graycyrus force-pushed the fix/i18n-fix-key-value-semantic-mismatch-in-2740 branch from 24db746 to 8249402 Compare May 27, 2026 14:11
@graycyrus graycyrus merged commit 2b1e22a into tinyhumansai:main May 27, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 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: fix key/value semantic mismatch in en-5.ts (paused/enableEcho/inactive)

1 participant