AGENT SKILL

localize

Run the localization workflow: extract strings, validate localization readiness, check for hardcoded text, and generate translation-ready string tables.

License 许可
MIT
最近更新
2026-11-12
Stars
★ 3
Forks
1

01 前言 Front Matter

name
localize
description
Run the localization workflow: extract strings, validate localization readiness, check for hardcoded text, and generate translation-ready string tables.
allowed-tools
Read, Glob, Grep, Write, Bash
argument-hint
[scan|extract|validate|status]
user-invocable
true

03 SKILL.md 正文

When this skill is invoked:

  1. Parse the subcommand from the argument:

    • scan — Scan for localization issues (hardcoded strings, missing keys)
    • extract — Extract new strings and generate/update string tables
    • validate — Validate existing translations for completeness and format
    • status — Report overall localization status
  2. For scan:

    • Search src/ for hardcoded user-facing strings:
      • String literals in UI code that are not wrapped in a localization function
      • Concatenated strings that should be parameterized
      • Strings with positional placeholders (%s, %d) instead of named ones ({playerName})
    • Search for localization anti-patterns:
      • Date/time formatting not using locale-aware functions
      • Number formatting without locale awareness
      • Text embedded in images or textures (flag asset files)
      • Strings that assume left-to-right text direction
    • Report all findings with file paths and line numbers
  3. For extract:

    • Scan all source files for localized string references
    • Compare against the existing string table (if any) in assets/data/
    • Generate new entries for strings that don't have keys yet
    • Suggest key names following the convention: [category].[subcategory].[description]
    • Output a diff of new strings to add to the string table
  4. For validate:

    • Read all string table files in assets/data/
    • Check each entry for:
      • Missing translations (key exists but no translation for a locale)
      • Placeholder mismatches (source has {name} but translation is missing it)
      • String length violations (exceeds character limits for UI elements)
      • Orphaned keys (translation exists but nothing references the key in code)
    • Report validation results grouped by locale and severity
  5. For status:

    • Count total localizable strings
    • Per locale: count translated, untranslated, and stale (source changed since translation)
    • Generate a coverage matrix:
    ## Localization Status
    Generated: [Date]
    
    | Locale | Total | Translated | Missing | Stale | Coverage |
    |--------|-------|-----------|---------|-------|----------|
    | en (source) | [N] | [N] | 0 | 0 | 100% |
    | [locale] | [N] | [N] | [N] | [N] | [X]% |
    
    ### Issues
    - [N] hardcoded strings found in source code
    - [N] strings exceeding character limits
    - [N] placeholder mismatches
    - [N] orphaned keys (can be cleaned up)
    

Rules

  • English (en) is always the source locale
  • Every string table entry must include a translator comment explaining context
  • Never modify translation files directly — generate diffs for review
  • Character limits must be defined per-UI-element and enforced automatically
  • Right-to-left (RTL) language support should be considered from the start, not bolted on later

04 同仓库更多 Skills

welflau
welflau/ai-dev-system

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

测试与质量前端开发
★ 3
welflau
welflau/ai-dev-system

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

邮件与沟通
★ 3
welflau
welflau/ai-dev-system

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

前端开发
★ 3
welflau
welflau/ai-dev-system

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

设计师前端开发视觉设计
★ 3
welflau
welflau/ai-dev-system

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

视觉设计
★ 3
welflau
welflau/ai-dev-system

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

视觉设计
★ 3