Skip to content

Localize CLI presentation while preserving native adapter contracts - #1

Merged
LIghtJUNction merged 6 commits into
mainfrom
feat/cli-i18n-readme
Nov 20, 2026
Merged

LIghtJUNction merged 6 commits into
mainfrom
feat/cli-i18n-readme

Conversation

@LIghtJUNction

@LIghtJUNction LIghtJUNction commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Why

The original i18n branch conflicted with the current native Pi and CC Switch implementation. Applying its old main.rs would remove commands and permission/transaction boundaries added since the branch was opened.

What changed

  • Resolve lib/main conflicts on main b0587b0, preserving [A10] 校验 OAuth 锁权限并统一个人目录解析 #3 credential-store changes, native adapters, managed distribution plans, receipts, Pi settings inspection and refusal of mixed adapter arguments.
  • Embed English/Simplified Chinese catalogs for help and terminal output, extending coverage to the current native adapters (261 keys).
  • Keep machine JSON and original protocol values independent of display language. Exact canonical adapter errors recover typed messages only at presentation boundaries; external text is never interpreted as a template.
  • Preserve original locale precedence, fallback, non-Unicode handling and one-pass named placeholders.
  • Cover new command help, untranslated JSON equality, unattended adapter refusals and the credential command's no-JSON contract.
  • Preserve the complementary documentation and checker improvements for Document current CLI behavior in English and Chinese and complete i18n checks #2, which is being integrated separately without overwriting current capability documentation.

Validation

Isolated development checkout, pinned mise Rust 1.100.0, Cargo jobs=1:

  • python3 scripts/check-i18n.py: 2 catalogs, 261 keys passed.
  • mise exec -- cargo fmt --all -- --check: passed.
  • mise exec -- cargo test --locked --jobs 1: 127 passed, 0 failed; 2 existing opt-in Linux Secret Service migration checks ignored.
  • mise exec -- cargo clippy --locked --all-targets --all-features -- -D warnings: passed.
  • git diff --cached --check: passed.

Validated/published tree: 106f8a0016df303fee9a1f7eaf28bfd9b1b401c9. No live credential-store acceptance, real account authorization, application configuration, production change or release was performed.

Resolve lib/main conflicts while preserving current Pi and CC Switch commands, argument validation, grants, receipts and credential isolation. Keep machine JSON canonical and localize presentation. Extend catalog and scope regression coverage.

Draft checkpoint: catalog validation passes with 261 keys; complete Rust validation follows in isolated development checkout.
@LIghtJUNction LIghtJUNction changed the title feat: CLI 国际化与双语 README Localize CLI presentation while preserving native adapter contracts Nov 20, 2026
Keep fallback text lifetimes local and convert the complete native application result at the CLI boundary. Format the conflict resolution with the pinned toolchain.

Local mise Rust 1.100.0: 127 tests pass, 2 existing opt-in isolated Secret Service checks ignored; full-target/all-feature Clippy -D warnings, rustfmt and 261-key catalog check pass.
@LIghtJUNction
LIghtJUNction marked this pull request as ready for review November 20, 2026 14:21
@LIghtJUNction
LIghtJUNction merged commit 166bd76 into main Nov 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-20T14:23:26.534839Z 5a3ee6a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

LIghtJUNction added a commit that referenced this pull request Nov 20, 2026
Preserve #1's current native adapters and canonical JSON behavior. Retain this branch's documentation, checker fixture tests, untrusted-path regression, and UTF-8 callback response language/length validation. Move detailed current Chinese scope into a usage guide and mirror current features in English.

Local mise Rust 1.100.0: 129 tests passed, 2 existing isolated Secret Service checks ignored; 11 Python validator tests, fmt, all-target/all-feature Clippy -D warnings, catalog and source-package file 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.

2 participants