代码块内的英文被过度翻译

Open
#700 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
49/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript

Research direction

Read the translation logic that handles README text and code blocks in the userscript; the issue does not name a file or test. Start by reproducing the reported translations of “and” and fenced code in the linked README, then trace how the suggested code, pre, .highlight, and notranslate exclusions could fit. Done means README English, code blocks, and English uses of “and” remain unchanged without breaking the plugin’s Chinese translations.

Written by the indexing model from the issue text.

Description

bug
问题/建议
问题描述
  1. README 中的英文 and 被翻译成中文顿号“和”
  2. 代码块内的英文被过度翻译
建议优化
  1. 增加 code、pre、.highlight 等标签的跳过逻辑
  2. 增加 notranslate class 支持,允许用户标记不翻译区域
  3. 对英文 README 整体跳过翻译,或增加白名单机制
步骤

https://github.com/jncie/unicom-jjjc-legal-easy-learning/tree/main#unicom-jjjc-legal-easy-learning

预期

GitHub README 中的英文句子应保持原样,不应被翻译

代码块(``` 包裹的内容)内的英文应保持原样

单词 and 在英文上下文中应保持为 and,不被翻译成“和”或“、”

专有技术词汇(如 auto like、cross-page navigation 等)应不被翻译,或由用户自行标记跳过

实际

我项目 README 中的英文描述被插件翻译,导致英文句子中出现中文顿号“和”

代码块内的英文也被翻译,破坏代码可读性

单词 and 被替换为“和”

附件

No response

浏览器名称

Google Chrome

浏览器版本

148.0.7778.217(正式版本) (64 位)

脚本管理器名称

篡改猴(Tampermonkey)

脚本管理器版本

5.4.1

插件版本

1.9.2-2026-05-21

Dominant language
JavaScript
Stars
35.1k
Forks
2k
Avg merge
2d 1h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from maboloshi/github-chinese

All issues in maboloshi/github-chinese

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.