— No reviews yet
0 installs
9 views
0.0% view→install
Install
$ agentstack add skill-bwkyd-wps-skills-wps-i18n ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Are you the author of Wps I18n? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
文档中英双语工具
中文文档 → 中英双语对照版。外企、外贸、国际合作必备。
When to Use
- 需要中英文对照版本的文档
- 合同/报告需要英文版
- 需要双语排版(左中右英)
- 用户说"做个双语版""中英文对照"
When NOT to Use
- 纯翻译(不需要排版)→ 直接对话翻译
- 校对中文文档 → 使用
wps-proofread
双语排版模式
[1] 段落对照 → 中文段落下方紧跟英文翻译
[2] 左右分栏 → 左列中文 右列英文
[3] 表格对照 → 中文列 | 英文列
[4] 替换模式 → 生成纯英文版本
工作流程
Step 1: 读取源文档
from docx import Document
from docx.shared import Pt, Cm, Inches
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
import os
def read_document_text(doc_path):
"""读取文档段落"""
doc = Document(doc_path)
paragraphs = []
for para in doc.paragraphs:
if para.text.strip():
paragraphs.append({
'text': para.text,
'style': para.style.name,
'alignment': para.alignment,
})
return paragraphs
Step 2: 生成双语文档
def create_bilingual_doc(original_paras, translations, mode='段落对照',
output_path=None):
"""生成双语文档"""
doc = Document()
section = doc.sections[0]
section.top_margin = Cm(2.54)
section.bottom_margin = Cm(2.54)
def set_font(run, name, size, bold=False, italic=False):
run.font.size = Pt(size)
run.font.name = name
run._element.rPr.rFonts.set(qn('w:eastAsia'), name)
run.bold = bold
run.italic = italic
if mode == '段落对照':
for orig, trans in zip(original_paras, translations):
# 中文段落
p = doc.add_paragraph()
if 'Heading' in orig.get('style', ''):
run = p.add_run(orig['text'])
set_font(run, '黑体', 14, True)
else:
p.paragraph_format.first_line_indent = Pt(24)
run = p.add_run(orig['text'])
set_font(run, '宋体', 12)
# 英文翻译
p = doc.add_paragraph()
if 'Heading' in orig.get('style', ''):
run = p.add_run(trans)
set_font(run, 'Times New Roman', 14, True, True)
else:
p.paragraph_format.first_line_indent = Pt(24)
run = p.add_run(trans)
set_font(run, 'Times New Roman', 11, italic=True)
from docx.shared import RGBColor
run.font.color.rgb = RGBColor(0x55, 0x55, 0x55)
doc.add_paragraph() # 段间空行
elif mode == '表格对照':
table = doc.add_table(rows=1, cols=2)
table.style = 'Table Grid'
# 表头
table.cell(0, 0).text = '中文'
table.cell(0, 1).text = 'English'
for orig, trans in zip(original_paras, translations):
row = table.add_row()
row.cells[0].text = orig['text']
row.cells[1].text = trans
if not output_path:
output_path = '双语文档.docx'
doc.save(output_path)
return os.path.abspath(output_path)
Step 3: 翻译质量建议
专业文档翻译注意:
1. 专业术语保持一致(建立术语表)
2. 法律/合同条款需要法律翻译审核
3. 数字、日期格式转换(2026年3月 → March 2026)
4. 货币单位转换标注(人民币/RMB/CNY)
5. 人名地名使用官方翻译
Step 4: 交付
- 生成双语对照文档
- 标注需要人工复核的专业术语
- 建议专业文档由翻译人员审核
示例
# 段落对照
/wps-i18n 给report.docx生成中英双语对照版
# 合同双语
/wps-i18n 把这份合同做成中英文对照格式
# 英文版
/wps-i18n 生成这份产品介绍的英文版本
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Bwkyd
- Source: Bwkyd/wps-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.