Translation Assistant

Other

Multilingual translation between Chinese and English with domain-specific terminology for finance, law, and technology, supporting format preservation and bi...

Install

openclaw skills install zcx-translation-assistant

Translation Assistant — 多语言翻译助手

Professional, domain-aware translation between Chinese (Simplified) and English, with optional side-by-side bilingual output and format preservation.

Supported Language Pairs

PairDirectionProficiency
zh-CN ↔ en双向⭐⭐⭐⭐⭐ 母语级
zh-TW ↔ en双向⭐⭐⭐⭐
zh-CN ↔ ja双向⭐⭐⭐
zh-CN ↔ ko双向⭐⭐⭐
en ↔ fr/de/es双向⭐⭐⭐⭐

Default: Chinese (Simplified) ↔ English. Other pairs require explicit user request.

Supported Domain Glossaries

DomainKey TerminologyExample
Finance / 金融期货(futures), 期权(options), 保证金(margin), 结算价(settlement price), 做多/做空(long/short), 持仓量(open interest), 交割(delivery), 套保(hedge)原油期货主力合约 → front-month crude oil futures contract
Legal / 法律甲方(Party A), 乙方(Party B), 不可抗力(force majeure), 保密(confidentiality), 管辖(governing law), 违约(breach of contract)终止协议 → termination agreement
Technology / 科技API, 微服务(microservices), 部署(deploy), 容器化(containerization), 持续集成(CI), 负载均衡(load balancing), 数据库(database/DB)灰度发布 → canary release
Medical / 医药临床试验(clinical trial), 适应症(indication), 不良反应(adverse event), 剂量(dosage)双盲随机对照试验 → double-blind randomized controlled trial

How to Translate

Step 1: Determine translation parameters

Ask the user (or infer from context):

  1. Source and target languages

    • Default: zh-CN → en for business/tech, en → zh-CN for learning
    • Reverse or other: confirm explicitly
  2. Domain

    • General / 通用 (default)
    • Finance / 金融 — Use glossary terms (保证金 → margin, not "deposit")
    • Legal / 法律 — Preserve legal precision, keep Latin terms (force majeure, mutatis mutandis)
    • Technology / 科技 — Keep English technical terms if more common in industry
    • Medical / 医药 — Use exact medical terminology
  3. Output format

    • Direct translation — Only target language, natural flow

    • Bilingual (side-by-side) — Original + translation, paragraph-level alignment:

      **原文**: [original text]
      **译文**: [translated text]
      
    • Bilingual (interlinear) — Sentence by sentence:

      [Original sentence 1]
      [Translation sentence 1]
      
      [Original sentence 2]
      [Translation sentence 2]
      
    • Format-preserving — Keep all Markdown, tables, code blocks, lists, headings intact (replace only text content)

Step 2: Classify text & apply rules

General / 通用翻译

  • Prioritize natural readability
  • Adjust sentence structure: Chinese topic-comment → English subject-verb-object
  • Handle culturally specific references: 身在曹营心在汉 → "to appear loyal while secretly working against"

Finance / 金融翻译

中文English (Correct)✗ Avoid
期货合约futures contractfuture contract (singular)
开仓open a positionopen position (ambiguous)
平仓close a positionclose position
爆仓forced liquidation / margin callexplode warehouse ✗
浮盈/浮亏unrealized P&Lfloating gain/loss
交割日delivery date / expiry
集运欧线container shipping (Europe route) / EC
期现套利cash-and-carry arbitrage

Legal / 法律翻译

  • Preserve sentence structure — legal language is precise
  • Official names: 中华人民共和国XXX法 → XXX Law of the People's Republic of China
  • Keep standard legal boilerplate terms:
    • 本协议 → this Agreement (capitalized)
    • 一方 → a Party / either Party
    • 包括但不限于 → including but not limited to
    • 自生效之日起 → as of the Effective Date
    • 具有法律约束力 → legally binding

Technology / 科技翻译

  • Keep proper nouns in original English (AWS, GitHub, Kubernetes, React)
  • Translate verbs and concepts, keep API names/tokens unchanged
  • Code blocks: never translate code content, only comments and strings
# BAD (translated code)
def 获取数据():  # ✗ Don't translate function names
    返回 "你好"

# GOOD (translate comments only)
def fetch_data():  # 获取数据
    return "hello"

Step 3: Check format preservation

For each element type:

ElementAction
Title / HeadingTranslate heading text, keep heading level
Bold / ItalicKeep formatting markers, translate content inside
Link textTranslate display text, keep URL unchanged
Image Translate alt text, keep URL
Code blockTranslate comments/strings only, keep code syntax untouched
TableTranslate cell content, keep column count and alignment
ListTranslate item content, keep list structure (ordered/unordered)
BlockquoteTranslate quoted text, keep > markers
Separator ---Keep as-is

Step 4: Output the translation

Follow the format the user requested (or default to bilingual side-by-side for accuracy-sensitive content, direct translation for readability).

Step 5: Optional quality check

If the user requested a quality review or if the content is complex:

  1. Readability — Does the translation read naturally in the target language?
  2. Terminology consistency — Same term translated the same way throughout?
  3. Numeric accuracy — Numbers, dates, amounts match exactly
  4. Omission check — No content skipped
  5. Hallucination check — No content added that wasn't in the original

Report any findings.

Special Cases

Markdown-heavy content (README, docs, wiki pages)

Always use format-preserving mode. Keep all Markdown structure, translate inline text only.

Financial statements / tables

Preserve all numeric values. Translate headers, footnotes, and metadata. Keep row/column structure identical.

Contracts and legal documents

Always use bilingual output. Translate every clause line by line. Preserve numbering and section structure. Flag ambiguous terms with [待确认].

Very long documents (>10,000 words)

Summarize the structure first, translate section by section, and offer to compile into a single output file.

Code comments and docstrings

Translate comment text, keep variable/function/class names, keep @param and @return/Args:/Returns: structure tags.

Reference: Common False Friends

Chinese TermCommon WrongCorrect
精密precision (mechanical)high-precision
敏感词sensitive wordcensorship keyword / banned term
干货dry goodsvaluable content / substance
痛点pain dotpain point
上线onlinego live / launch / deploy
下班off workget off work / leave for the day
你懂的you knowyou know what I mean (rely on context)
洪荒之力prehistoric powerwith all one's might / give it one's all

Special Notes

  • Accuracy over fluency — When in doubt, a slightly awkward but accurate translation is better than a fluent but wrong one
  • For business/formal contexts, use neutral, professional tone. For casual or marketing content, adjust tone naturally
  • Preserve all inline codevariable_names, functionCalls(), CSS classes, URLs, file paths — leave completely unchanged
  • When translating API documentation, keep every command, code sample, and JSON structure intact
  • If the user provides only a file path, read the file, translate, and write a new file with _translated or language suffix appended to the filename
  • Document length: For each major output section, pause and ask the user to continue if the total translation output is expected to be very long