with one click
testcase-i18n
多语言 JSON 校验与处理 - 负责 key-value 校验、缺失检测、语言一致性检查、输出问题列表与修复建议
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
多语言 JSON 校验与处理 - 负责 key-value 校验、缺失检测、语言一致性检查、输出问题列表与修复建议
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
QA 项目内置知识库管理能力(基于 llm-wiki 框架)。 触发条件:用户明确提到"知识库"、"wiki"、"消化素材"、"查询知识"、"知识结晶"等, 或通过 `/qa` 命令选择「知识库管理」选项。
解析 Axure RP 导出的 HTML - 提取页面结构、元件、注释和交互说明,供测试用例生成使用
读取 Figma 设计稿数据 - 提取文案、组件结构、设计标注和交互说明,供测试用例生成使用
测试用例工程化处理 - 负责转换为模板结构、调用脚本生成 Excel、更新索引,与 Python scripts 对接
从需求文档/PRD/页面/接口说明生成结构化测试用例 - 负责需求解析、模块识别、平台拆分、测试点设计、输出结构化用例
Fetch any URL and convert to markdown using Chrome CDP. Saves the rendered HTML snapshot alongside the markdown, uses an upgraded Defuddle pipeline with better web-component handling and YouTube transcript extraction, and automatically falls back to the pre-Defuddle HTML-to-Markdown pipeline when needed. If local browser capture fails entirely, it can fall back to the hosted defuddle.md API. Supports two modes - auto-capture on page load, or wait for user signal (for pages requiring login). Use when user wants to save a webpage as markdown.
| name | testcase-i18n |
| description | 多语言 JSON 校验与处理 - 负责 key-value 校验、缺失检测、语言一致性检查、输出问题列表与修复建议 |
固定 7 种标准语言:
| 语言代码 | 语言名称 |
|---|---|
en-us | 英语 |
id-id | 印尼语 |
pt-pt | 葡萄牙语 |
es-es | 西班牙语 |
bn-bn | 孟加拉语 |
tr-tr | 土耳其语 |
fp-fp | 菲律宾语 |
多语言校验 JSON 必须符合以下结构:
{
"name": "模块 - 功能名称",
"url": "页面 URL(可选)",
"preScriptPath": "前置脚本路径(可选)",
"options": {
"matchRule": "normalized-exact",
"captureRegion": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
}
},
"entries": [
{
"key": "UI_BUTTON_SUBMIT",
"languages": {
"en-us": "Submit",
"id-id": "Kirim",
"pt-pt": "Enviar",
"es-es": "Enviar",
"bn-bn": "জমা দিন",
"tr-tr": "Gönder",
"fp-fp": "Ipasa"
}
}
]
}
name 字段必填entries 数组必填languages 对象languages 必须包含 7 种标准语言检查每个 key 是否都包含完整 7 种语言:
检查是否有语言值为空字符串:
警告:以下条目的语言值为空
- UI_BUTTON_SUBMIT: id-id 为空
- UI_LABEL_NAME: bn-bn 为空
检查同一 key 在不同语言中的语义是否一致:
▎ 多语言校验结果
文件:outputs/i18n/<模块>/<模块>-<功能>.json
条目数量:XX 个
✓ 所有条目语言完整
✓ 无空值
✓ 格式校验通过
▎ 多语言校验结果
文件:outputs/i18n/<模块>/<模块>-<功能>.json
条目数量:XX 个
【问题清单】
1. 语言缺失(共 X 个)
- UI_BUTTON_SUBMIT: 缺少 id-id, bn-bn
- UI_LABEL_NAME: 缺少 tr-tr
2. 空值问题(共 X 个)
- UI_HINT_PLACEHOLDER: fp-fp 为空字符串
3. 一致性警告(共 X 个)
- UI_MESSAGE_LONG: en-us 长度为 50,bn-bn 长度为 150(差异过大)
【修复建议】
1. 补充缺失语言翻译
2. 填写空值字段
3. 检查过长翻译是否准确
当需求、附件或对话中包含以下内容时,自动触发多语言处理:
多语言 、国际化 、i18n、 翻译、Translation、Localizationen-us、id-id、pt-pt、es-es、bn-bn、tr-tr、fp-fpUI_、Key_、STR_、文案 、 文本生成多语言校验 JSON,并更新多语言索引。
输出缺失清单,不生成 JSON:
▎ 检测到需求中包含多语言文案
- 已提取 XX 个多语言条目
- 语言不完整,缺少:hi-in, th-th (非标准语言已忽略)
- 标准 7 种语言检查:
- 有 YY 个条目缺少 zz 语言
- 暂不生成 JSON,请补充缺失语言后重试
多语言索引条目维护以下字段:
| 字段 | 说明 |
|---|---|
id | 唯一标识 |
group_key | 分组键 |
title | 标题 |
module | 模块 |
module_ids | 模块 ID 列表 |
topic | 主题 |
language_codes | 语言代码列表 |
format | 文件格式 |
rel_path | 相对路径 |
template | 使用的模板 |
source_refs | 来源引用 |
tags | 标签 |
status | 状态(draft/published) |
created_at | 创建时间 |
updated_at | 更新时间 |
# 校验多语言 JSON
python3 engine/scripts/validate_i18n_json.py \
outputs/i18n/<模块>/<模块>-<功能>.json
# 校验多语言索引
python3 engine/scripts/validate_i18n_index.py \
outputs/i18n-index.json
../../references/engineering/testcase-store.md - 工作区索引约定testcase-generate - 从需求生成测试用例(含多语言自动检测)testcase-format - 导出 Excel 与索引更新