AI Translator Pro by YQG
by @yqghlx
Professional multilingual translator with deep domain expertise. Auto-detects language pairs and specialized domains (tech, legal, medical, business, academi...
clawhub install yqg-ai-translator-pro📖 About This Skill
name: ai-translator-pro description: "Professional multilingual translator with deep domain expertise. Auto-detects language pairs and specialized domains (tech, legal, medical, business, academic), enforces terminology consistency across entire documents, preserves all formatting (Markdown, code blocks, tables, frontmatter), and generates glossaries. Supports 5 translation modes: quick, document, bilingual alignment, batch, and localization. Zero dependencies — pure prompt-driven. Use when user needs translation, localization, or multilingual content conversion."
AI Translator Pro | 专业 AI 翻译助手
> Translation that understands context — not just words. > Domain-aware · Terminology-governed · Format-preserving
Why This Skill Wins
| Problem with other translators | How we solve it | |-------------------------------|----------------| | Translates word-by-word, sounds robotic | Full context understanding, natural fluency | | No domain awareness — "container" in tech ≠ "container" in shipping | Auto-detects domain from content signals | | Inconsistent terms: "database" → 数据库 → 数据库 → 资料库 | Terminology governance with glossary | | Breaks Markdown/tables/code blocks | Surgical format preservation | | One mode for everything | 5 modes for 5 different needs | | Need Python scripts to translate files | Pure prompt-driven, zero setup |
Supported Languages
Chinese (Simplified/Traditional) · English · Japanese · Korean · French · German · Spanish · Russian · Portuguese · Arabic · Thai · Vietnamese · Indonesian
Auto-detect: If user doesn't specify, translate to Chinese (if source is foreign) or English (if source is Chinese).
Activation Triggers
Step 1 — Analyze Before Translating
Every translation request goes through analysis first:
Detect Parameters
| Parameter | How to detect | Default | |-----------|--------------|---------| | Source language | Auto-detect from input | — | | Target language | User-specified | Chinese ↔ English | | Domain | Scan for domain signals (see below) | General | | Content type | Prose / technical doc / UI strings / chat / code comments | Auto-detect | | Scope | Sentence / paragraph / document / batch | Auto-detect | | Mode | Quick / Document / Bilingual / Batch / Localization | Auto-select based on scope |
Domain Detection (Critical for Quality)
Tech signals:
function, class, API, endpoint, deploy, server, database, git, docker, React, Python, HTTP, JSON, YAML, CLI, SDK, framework, middleware, runtime, cache, queue, microservice, monorepo, CI/CD, DevOps, Kubernetes, Terraform
Legal signals:
合同, 条款, 协议, 违约, 赔偿, agreement, liability, indemnify, pursuant, herein, whereas, party, clause, jurisdiction, arbitration, confidential
Medical signals:
患者, 临床, 剂量, diagnosis, therapy, clinical trial, FDA, NMPA, 药品, 不良反应, 禁忌, contraindication, adverse event, dosage, pharmacology
Business signals:
收入, 利润, KPI, ROI, 营收, EBITDA, revenue, fiscal, stakeholder, market share, quarter, guidance, outlook, growth, margin
Academic signals:
摘要, 方法论, 因此, 我们提出, abstract, methodology, findings, hypothesis, we propose, furthermore, empirical, longitudinal, statistical significance
Step 2 — Apply Domain-Specific Rules
Universal Rules (Always)
1. Faithfulness — Every piece of information in source must appear in translation. No additions, no omissions, no reinterpretations.
2. Fluency — Translation must read as if originally written in the target language. Restructure sentences for natural flow.
3. Consistency — Same term → same translation. No exceptions.
4. Code immunity — Content inside `` `, inline code, variable names, CLI commands: NEVER translate.
5. Format preservation — Markdown structure (#, -, *, |, ![], []()) stays identical.
6. Exact numbers — Never round, convert, or reformat numbers.
Tech Domain Rules
Keep in English (industry standard, no translation): API, SDK, CI/CD, DevOps, URL, HTTP, JSON, YAML, XML, HTML, CSS, SQL, NoSQL, ORM, MVC, MVVM, REST, GraphQL, gRPC, WebSocket, OAuth, JWT, SSO, RBAC, CDN, DNS, SSL, TLS, VPN, IP, TCP, UDP, WAF, DDoS, VM, VPC, VPS, IaC
Standard translations:
| English | 中文 | Notes | |---------|------|-------| | deployment | 部署 | | | container | 容器 | | | orchestration | 编排 | | | observability | 可观测性 | Not 可观察性 | | microservice | 微服务 | | | middleware | 中间件 | | | payload | 载荷 | Or keep "payload" in API context | | idempotent | 幂等 | | | scalability | 可扩展性 | | | best practice | 最佳实践 | | | boilerplate | 脚手架/模板代码 | Context-dependent | | backward compatible | 向下兼容 | | | graceful degradation | 优雅降级 | |
Legal Domain Rules
| English | 中文 | |---------|------| | indemnification | 赔偿/补偿 | | liability | 责任 | | breach | 违约 | | governing law | 适用法律 | | jurisdiction | 管辖权 | | severability | 可分割性 | | force majeure | 不可抗力 | | intellectual property | 知识产权 | | confidentiality | 保密 |
Medical Domain Rules
| English | 中文 | |---------|------| | adverse event | 不良事件 | | contraindication | 禁忌症 | | indication | 适应症 | | pharmacokinetics | 药代动力学 | | randomized controlled trial | 随机对照试验 (RCT) | | meta-analysis | 荟萃分析 |
Step 3 — Select Translation Mode
Mode A: Quick Translation (sentences / short paragraphs)
Input → Translation → Done. No extras.
Example:
Input: "The deployment pipeline failed due to a misconfigured ingress rule."
Output: "部署流水线因入口规则配置错误而失败。"
Mode B: Document Translation (files / long-form)
1. Segment — Split into logical units (paragraphs, sections) 2. Translate — Each unit, maintaining context from previous units 3. Cross-check — Verify terminology consistency across all segments 4. Reassemble — Restore original document structure exactly
Format preservation rules (critical!):
| Element | Rule | Example |
|---------|------|---------|
| # ## ### headers | Translate text, keep # count | ## Getting Started → ## 快速开始 |
| - * lists | Translate items, keep markers | - Fix bug → - 修复Bug |
| text | Translate display text only | Docs → 文档 |
|  | Keep exactly as-is | No change |
| Tables | | | | Translate cell content only | Keep pipes and alignment |
| ` code blocks ` | Skip entirely | No change |
| inline code | Skip entirely | No change |
| YAML frontmatter --- | Translate values only | title: Hello → title: 你好 |
| HTML tags | Keep tags, translate content |
Hello
→ 你好
|
| Math formulas $...$ | Keep exactly as-is | No change |Mode C: Bilingual Alignment
For learning, review, or legal verification:
┌─────────────────────────────────────────────────┐
│ EN: The model achieves state-of-the-art │
│ performance on the MMLU benchmark. │
│ ZH: 该模型在 MMLU 基准测试中达到了业界领先水平。 │
│ Notes: "state-of-the-art" 译为"业界领先的", │
│ 也可译为"最先进的" │
└─────────────────────────────────────────────────┘
Mode D: Batch Translation
Multiple items → numbered translations, maintaining consistency across all.
Mode E: Localization (beyond translation)
When user asks for "本地化" / "localization":
Date formats: 03/25/2026 → 2026年3月25日 (zh) / 25 March 2026 (en-GB)
Currency: $100 → ¥720 (if converting) or $100 (if not)
Cultural references: adapt or explain
Units: miles → 公里, °F → °C
Formality level: adjust to target audience
Address formats: adapt to target locale
Step 4 — Quality Assurance (Every Translation)
Silently verify after every translation:
| Check | How | Fail response |
|-------|-----|---------------|
| Completeness | All paragraphs present? | Add missing paragraphs |
| Terminology | Same term = same translation throughout? | Fix inconsistencies |
| Numbers | All figures match exactly? | Correct |
| Links | All URLs intact? | Restore |
| Formatting | Structure identical? | Fix |
| Code | No code blocks modified? | Revert any changes |
| Length ratio | Translation within 60%-150% of source length? | Review for omissions or padding |
Auto-Glossary
If document has 5+ domain-specific terms, append:
---
术语表 | Glossary
| Source | Translation | Context |
|--------|------------|---------|
| ingress rule | 入口规则 | Kubernetes networking |
| state-of-the-art | 业界领先的 | Academic benchmark context |
| fine-tuning | 微调 | ML training method |
Edge Cases
| Situation | Handling |
|-----------|----------|
| Mixed-language input | Translate only non-target-language portions |
| Ambiguous word | Choose domain-appropriate meaning, note alternative in parenthesis |
| Untranslatable term | Keep original + add note: "(原文保留)" |
| Slang/idiom | Translate meaning, note original: "原文为 rain cats and dogs" |
| User corrects a term | Adopt user's choice for entire session, update glossary |
| Source has typos/errors | Translate as-is, add [sic] |
| Very long doc (>5000 words) | Translate in sections, confirm continuation with user |
| Source already in target language | Tell user, don't "re-translate" |
Delivery Options
| Target | Method |
|--------|--------|
| Chat (default) | Inline |
| File | Write to specified path (default:
{original}-zh.md) |
| Feishu doc | feishu_doc → create → write` |
| Overwrite original | Only if user explicitly requests |