nexsjournal/app-i18n-l10n-skillGit
App 国际化本地化端到端技能
交付可上线的新语言工程配置、商店元数据与宣传文案。
使用前,准备这些
输入素材:代码库、技术环境与任务验收条件
- 在下方原始文档中确认支持的 AI 工具、模型和运行依赖。
- 打开原仓库,按作者的安装说明完成配置;模型 API 或外部服务可能需要单独开通。
- 用自己的素材试运行,再检查事实、版式与输出文件。
许可证:MIT
来源快照:2026-09-15。README ↗
原项目许可证与版权声明
MIT License Copyright (c) 2026 app-i18n-l10n-skill contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
可以这样开始
使用这个 Skill 完成「App 国际化本地化端到端技能」:交付可上线的新语言工程配置、商店元数据与宣传文案。 请先确认必要输入,再交付一份可直接使用的结果。
app-i18n-l10n-skill
Agent Skill:为移动 App 端到端增加新语言版本——应用内字符串翻译与工程接入、App Store Connect / Google Play 元数据、宣传截图文案、字符限制校验。
当前 v1 主攻 iOS(Swift + String Catalog / xcstrings);Android 等平台预留扩展点。
支持两种语言消费模式:仅系统语言(system_only)与 应用内设置页切换(in_app_switch,含 AppLanguage、AppleLanguages、三层运行时消费链)。
能做什么
用户一句话:「帮我增加日语版本」,Agent 将:
- 读取项目
l10n.profile.yaml(或自动探测工程结构) - 审计全部待翻译字符串(xcstrings、InfoPlist、硬编码等)
- 写入新 locale 翻译并接入语言切换 / Xcode 配置
- 生成 App Store Connect 元数据文档(含 ASO 关键词规则)
- 生成宣传截图文案
- 运行脚本校验字符上限
快速开始
1. 安装 Skill
Cursor / Claude Code(项目级)
git clone https://github.com/nexsjournal/app-i18n-l10n-skill.git
cp -r app-i18n-l10n-skill/skill .cursor/skills/app-i18n-l10n
# 或 Claude Code:
cp -r app-i18n-l10n-skill/skill ~/.claude/skills/app-i18n-l10n
Skills CLI(若已发布到 GitHub)
npx skills add nexsjournal/app-i18n-l10n-skill -y
2. 在 App 项目中创建配置文件
复制模板并按项目修改:
mkdir -p .l10n
cp path/to/app-i18n-l10n-skill/skill/templates/l10n.profile.yaml .l10n/profile.yaml
必填:app.name、ios.string_catalog、ios.language_enum、store.apple.privacy_policy_url 等。
参考完整示例:examples/altitudeshot/l10n.profile.yaml
3. 触发
在 Agent 对话中说:
使用 app-i18n-l10n skill,帮我增加韩语版本
仓库结构
app-i18n-l10n-skill/
├── README.md
├── LICENSE
├── skill/ # Agent Skill 本体(复制此目录安装)
│ ├── SKILL.md
│ ├── reference.md
│ ├── platforms/ios-swift.md
│ └── templates/
│ ├── l10n.profile.yaml
│ └── app-store-metadata.md
├── scripts/ # 可独立运行的 CLI 工具
│ ├── validate_metadata.py
│ ├── apply_locale_localizations.py
│ ├── audit_catalog.py
│ ├── audit_runtime_l10n.py
│ └── export_catalog_keys.py
└── examples/
└── altitudeshot/ # 真实项目配置示例
脚本用法
# 校验 App Store 元数据字符限制
python3 scripts/validate_metadata.py --file docs/localization/ja-app-store-metadata.md
# 审计 xcstrings 各 locale 完整度
python3 scripts/audit_catalog.py --catalog path/to/Localizable.xcstrings
# 审计 SwiftUI 运行时本地化(持久化 key、AppleLanguages、动态文案等)
python3 scripts/audit_runtime_l10n.py --source-dir path/to/MyApp
python3 scripts/audit_runtime_l10n.py --source-dir path/to/MyApp --require-in-app-switch
# 导出 key 清单(供翻译)
python3 scripts/export_catalog_keys.py --catalog path/to/Localizable.xcstrings -o keys.json
# 批量写入新 locale(translations 为 JSON:{ "key": "翻译" })
python3 scripts/apply_locale_localizations.py \
--catalog path/to/Localizable.xcstrings \
--locale ja \
--translations translations/ja.json \
--settings-key settings_language_japanese \
--labels translations/labels/settings_language_japanese.json
通用化设计
| 层级 | 职责 |
|---|---|
| Skill(通用) | 工作流、ASO 规则、交付物模板、平台无关检查清单 |
l10n.profile.yaml(每项目) | 路径、Bundle ID、品牌术语、已有语言、截图结构 |
platforms/ios-swift.md | iOS 特有:AppLanguage、knownRegions、InfoPlist.strings |
examples/ | 参考实现,不进入 Skill 正文 |
新增 App 时只需维护 profile,无需 fork Skill。
与单项目 Skill 的关系
若 App 有非常特殊的业务(如 AltitudeNow 的「山峰护照」ASO 词库),可在项目内保留薄层 overlay:
.agents/skills/myapp-l10n/SKILL.md # 仅 20 行:加载 profile + 链接本 skill + 项目术语表
.l10n/profile.yaml
.l10n/glossary.yaml # 可选:品牌术语锁定
License
MIT — 见 LICENSE