Skip to content

fix(i18n): align desktop zh/zh-hant allowSession wording with CLI - #64002

Open
dx2102 wants to merge 1 commit into
NousResearch:mainfrom
dx2102:fix/i18n-desktop-allow-session-zh
Open

dx2102 wants to merge 1 commit into
NousResearch:mainfrom
dx2102:fix/i18n-desktop-allow-session-zh

Conversation

@dx2102

@dx2102 dx2102 commented Jul 13, 2026

Copy link
Copy Markdown

What does this PR do?

Improves the zh/zh-hant translation of the desktop "Allow this session" button to match the CLI's existing wording.

English sources

# apps/desktop/src/i18n/en.ts:2300   (button label)
allowSession: 'Allow this session'

# locales/en.yaml:22                  (confirmation line)
allowed_session: "      ✓ Allowed for this session"

The intended reading of "Allow this session" is "allow (this command) for this session", not "allow the session itself". The session is the scope of the allow, not the object being allowed. The CLI's "Allowed for this session" makes the same scope reading explicit by keeping the preposition.

Current Chinese (desktop) — mistranslates the scope as the object

  • zh.ts: 允许本会话 (reads as "allow the session itself")
  • zh-hant.ts: 允許本工作階段 (same ambiguity)

CLI already ships the correct scope-adverbial wording

Key approval.allowed_session:

  • zh.yaml: 本次会话内允许
  • zh-hant.yaml: 本次工作階段內允許

This PR brings the desktop labels in line. Both surfaces (button vs. confirmation) describe the same scope; Chinese should express it uniformly. No behavior change.

Type of Change

  • 🐛 Bug fix

Changes Made

  • apps/desktop/src/i18n/zh.ts: allowSession本次会话内允许
  • apps/desktop/src/i18n/zh-hant.ts: allowSession本次工作階段內允許

How to Test

Switch desktop to Simplified / Traditional Chinese, trigger an approval prompt, open the "▼" menu next to Run. The middle item now matches the CLI approval prompt.

Checklist

Code

  • I've read the Contributing Guide
  • Conventional Commits (fix(i18n): ...)
  • Searched for duplicates — none
  • PR contains only related changes
  • pytest tests/ -q — N/A (TypeScript catalog string)
  • Added tests — N/A (compile-time typed catalog covers key parity)
  • Tested on: N/A

Documentation & Housekeeping

  • Docs — N/A
  • cli-config.yaml.example — N/A
  • CONTRIBUTING.md / AGENTS.md — N/A
  • Cross-platform impact — N/A (UI copy)
  • Tool descriptions/schemas — N/A

The current "允许本会话" reads as "allow (the session itself)": 本会话 sits in object position after 允许, not as a scope adverb.
"本次会话内允许" moves the scope up front, matching the CLI's approval.allowed_session.
@alt-glitch alt-glitch added type/bug Something isn't working comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have labels Jul 13, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Summary

Verdict: LGTM (reviewer's token is read-only — submitted as COMMENT instead of APPROVE; maintainer can formally approve).

Pure i18n string alignment — changes two catalog strings in apps/desktop/src/i18n/zh.ts and zh-hant.ts so the desktop button label allowSession matches the CLI's existing allowed_session scope-adverbial phrasing (本次会话内允许 / 本次工作階段內允許).

The diff is minimal and well-scoped: 2 lines changed across 2 files, no behavior change, no test surface needed for catalog strings. The PR description documents the rationale clearly (scope-as-adverbial reading) and the source-of-truth for the new wording (locales/en.yaml:22, locales/{zh,zh-hant}.yaml).

Looks good.


Reviewed by Hermes Agent

@teknium1 teknium1 added the sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users label Jul 16, 2026
@dx2102

dx2102 commented Jul 18, 2026

Copy link
Copy Markdown
Author

cc @JimLiu, would love your take!

@JimLiu

JimLiu commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

cc @JimLiu, would love your take!

LGTM, but I can't approve or merge :D

@teknium1 teknium1 added the area/i18n Localization, locales, translations label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/i18n Localization, locales, translations comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants