Skip to content

fix: skip Chinese technical paragraphs already in the target language - #909

Merged
Bistutu merged 3 commits into
mainfrom
codex/chinese-technical-language-20261009
Oct 9, 2026
Merged

Bistutu merged 3 commits into
mainfrom
codex/chinese-technical-language-20261009

Conversation

@Bistutu

@Bistutu Bistutu commented Oct 9, 2026

Copy link
Copy Markdown
Member

Chinese technical paragraphs containing lowercase terms, code identifiers and operator expressions were classified as mixed language and translated back into Chinese. This reproduces with the four paragraphs in #906. The shared detector now accepts short terms only with credible Chinese and local technical context; real foreign sentences, quotations and uncertain text still translate.

The full-page/hover precheck can read protected inline Latin code for language evidence without sending or replacing that code. It preserves hidden/notranslate/candidate boundaries and rejects Chinese inside protected code as evidence for neighboring English or Han-only Japanese. Existing function-word strings are extracted into a byte-identical data module and compressed through the existing userscript data pipeline to keep the build within its inherited size budget. This PR uses #906 only as reproduction material and does not replace its HTTP retry work.

Validation:

  • 1,739 targeted language/client/slot/runtime/userscript tests pass; 1,442 scoped coverage tests pass with 100% statements, branches, functions and lines for the five affected core modules.
  • Production Chrome MV3 in isolated Edge: all four paragraphs, both plain and code/strong DOM, produce zero Chinese requests/wrappers. Neighboring English, restore/retranslate, dynamic replacement and switching the target to English pass. Tests use a loopback provider fixture.
  • Type checking, Chrome/Firefox/userscript builds, userscript verifier, test audit and docs build pass. Userscript is 1,963,619 bytes under the existing 1,964,000-byte budget; no dependencies or budget changed.
  • Architecture checks retain one independently reproduced baseline failure: transcription.worker.ts is simultaneously listed as coverage-exempt composition and strict business coverage. Other selected architecture/focus/header checks pass.

Reproduction and saved evidence: docs/reports/chinese-technical-pr-906-20261009/README.md. Online provider quality and Firefox browser interaction were not validated by this scoped fix.

@Bistutu
Bistutu merged commit c2c6072 into main Oct 9, 2026
2 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.

1 participant