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-14
Stars
★ 9
Forks
0

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

LongLeo287
LongLeo287/OmniClaw

UI-UX Pro Max

Advanced UI/UX analysis and generation skills with data-driven patterns. Python scripts (core.py, search.py) for systematic UI pattern extraction, design system generation, and component search from curated data sources.

★ 9
LongLeo287
LongLeo287/OmniClaw

shadcn-ui

Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.

★ 9
LongLeo287
LongLeo287/OmniClaw

zustand_store_ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

★ 9
LongLeo287
LongLeo287/OmniClaw

zustand

Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.

★ 9
LongLeo287
LongLeo287/OmniClaw

youtube_summarizer

Automatically fetch YouTube video transcripts, generate structured summaries, and send full transcripts to messaging platforms. Detects YouTube URLs and provides metadata, key insights, and downloadable transcripts.

★ 9
LongLeo287
LongLeo287/OmniClaw

youtube_clipper

YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video

★ 9