agentleFS
pixel-cellarpixel-cellar/Claude-Code-Game-Studios/.claude/skills/localize/SKILL.md

localize

Skill338 starsChanged 8 months agoMITView on GitHub

运行本地化工作流:提取字符串、验证本地化就绪状态、检查硬编码文本,并生成可供翻译的字符串表。

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use asset-spec, create-control-manifest and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • cenconq25Skill

    asset-spec

    Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.

    Also in 5 projects that use this

  • cenconq25Skill

    create-control-manifest

    Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.

    Also in 5 projects that use this

  • +10 more from cenconq25

The file

Files
SKILL.md

当此技能被调用时:

  1. 解析子命令参数:
    • scan — 扫描本地化问题(硬编码字符串、缺失键)
    • extract — 提取新字符串并生成/更新字符串表
    • validate — 验证现有翻译的完整性和格式
    • status — 报告整体本地化状态
  2. 对于 scan:
    • 搜索 src/ 中的硬编码面向用户的字符串:
      • UI 代码中未被本地化函数包裹的字符串字面量
      • 应该参数化的拼接字符串
      • 使用位置占位符(%s、%d)而非命名占位符({playerName})的字符串
    • 搜索本地化反模式:
      • 未使用区域感知函数的日期/时间格式化
      • 未考虑区域设置的数字格式化
      • 嵌入在图片或纹理中的文本(标记资源文件)
      • 假设从左到右文本方向的字符串
    • 报告所有发现,包含文件路径和行号
  3. 对于 extract:
    • 扫描所有源文件中的本地化字符串引用
    • 与 assets/data/ 中的现有字符串表(如有)进行对比
    • 为尚未有键的字符串生成新条目
    • 按照命名约定建议键名:[category].[subcategory].[description]
    • 输出要添加到字符串表的新字符串的差异
  4. 对于 validate:
    • 读取 assets/data/ 中的所有字符串表文件
    • 检查每个条目的:
      • 缺失翻译(键存在但某区域没有翻译)
      • 占位符不匹配(源文本有 {name} 但翻译缺失)
      • 字符串长度违规(超过 UI 元素的字符限制)
      • 孤立键(翻译存在但代码中没有引用该键)
    • 按区域和严重级别分组报告验证结果
  5. 对于 status:
    • 统计可本地化字符串总数
    • 按区域:统计已翻译、未翻译和过时(源文本自翻译后已更改)的数量
    • 生成覆盖率矩阵:
## 本地化状态
生成日期:[日期]

| 区域 | 总计 | 已翻译 | 缺失 | 过时 | 覆盖率 |
|------|------|--------|------|------|--------|
| en (源) | [N] | [N] | 0 | 0 | 100% |
| [区域] | [N] | [N] | [N] | [N] | [X]% |

### 问题
- 源代码中发现 [N] 个硬编码字符串
- [N] 个字符串超出字符限制
- [N] 个占位符不匹配
- [N] 个孤立键(可清理)

规则

  • 英语 (en) 始终为源区域
  • 每个字符串表条目必须包含解释上下文的翻译者注释
  • 永远不要直接修改翻译文件 — 生成差异供审核
  • 字符限制必须按 UI 元素定义并自动执行
  • 从右到左 (RTL) 语言支持应从一开始就考虑,而非事后追加

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.