H5p translate
npx -y skills add samumist/h5p-translation-claude --skill h5p-translateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.6 KB, as published. Nobody here has run it
H5P Translate Skill
Translates H5P content type language files into Chinese variants.
Invokation
/h5p-translate
What it does
Generates 5 Chinese translation files from an H5P .en.json English source:
- zh.json - Simplified Chinese (base translation)
- zh-cn.json - Simplified Chinese (China variant) - copy of zh.json
- zh-hans.json - Simplified Chinese (Hans variant) - copy of zh.json
- zh-tw.json - Traditional Chinese (Taiwan variant)
- zh-hant.json - Traditional Chinese (Han variant) - copy of zh-tw.json
Workflow
Step 1: Confirm source file and detect existing zh.json
Ask the user for the path to the H5P project's language/.en.json file.
- If not provided, look for it in the current working directory at
language/.en.json
Check if language/zh.json already exists. If it does:
- Read the existing zh.json
- Scan for Traditional Chinese characters: 電, 軟, 滑, 網, 場, 互, 標, 載, 搜, 編, 刪, 設, 按, 顯, 隱, 態, etc.
- If Traditional Chinese characters are found (suggesting it's mislabeled or was translated incorrectly):
- Use AskUserQuestion to ask: "A zh.json already exists but appears to contain Traditional Chinese characters. It should contain Simplified Chinese. What would you like to do?"
- Options: [Overwrite] (default), [Keep existing], [Merge]
- If no Traditional Chinese found but file exists, ask: "A zh.json already exists. Overwrite it?"
- Options: [Overwrite] (default), [Keep existing]
Step 2: Read the English source
Read the .en.json file and understand its structure (usually {"semantics": [...]}).
Step 3: Create or update Simplified Chinese (zh.json)
If user chose "Merge", combine existing translations with new ones, preferring existing work.
Translate all strings to Simplified Chinese using Mainland China vocabulary:
- 计算机 not 電腦
- 软件 not 軟體
- 鼠标 not 滑鼠
- 网络 not 網路
- 服务器 not 伺服器
- 数据 not 資料
Preserve the exact JSON structure and key order from the source.
Step 4: Create zh-cn.json and zh-hans.json
Copy zh.json to create these two variants. They are identical to the base Simplified Chinese.
Step 5: Create Traditional Chinese (zh-tw.json)
Convert zh.json from Simplified to Traditional using Taiwan/HK vocabulary:
- 電腦 not 计算机
- 軟體 not 软件
- 滑鼠 not 鼠标
- 網路 not 网络
- 伺服器 not 服务器
- 資料 not 数据
- 資訊 not 信息
- 顯示 not 显示
- 隱藏 not 隐藏
- 載入 not 加载
- 搜尋 not 搜索
- 編輯 not 编辑
- 刪除 not 删除
- 按鈕 not 按钮
- 標籤 not 标签
- 場景 not 场景
- 互動 not 交互
- 代碼 not 代码
- 行為 not 行为
- 設定 not 设置
Preserve the same JSON structure.
Step 6: Create zh-hant.json
Copy zh-tw.json to create zh-hant.json. They are identical.
Step 7: Verify
Confirm the translations with the user before finalizing.
Output
Creates or updates the following files in the language/ directory:
zh.json(Simplified Chinese)zh-cn.json(Simplified Chinese - China)zh-hans.json(Simplified Chinese - Hans)zh-tw.json(Traditional Chinese - Taiwan)zh-hant.json(Traditional Chinese - Han)
All files should be valid JSON with the same structure as the source.
Important notes
- Always use the English source file (
.en.json) as the base for translation - Keep all JSON keys, structure, and empty fields (e.g.,
{}) exactly as in the source - Preserve any existing
defaultvalues without translation - Do not invent new keys or modify the semantics structure
- When merging, preserve all existing translations that are valid (no Traditional Chinese in Simplified files)