$npx -y skills add tranhieutt/software_development_department --skill localizeGenerates or updates i18n localization files, translation keys, and locale configurations. Use when adding a new language, updating translation strings, or when the user mentions localization, i18n, translation, or l10n.
| 1 | When this skill is invoked: |
| 2 | |
| 3 | 1. **Parse the subcommand** from the argument: |
| 4 | - `scan` — Scan for localization issues (hardcoded strings, missing keys) |
| 5 | - `extract` — Extract new strings and generate/update string tables |
| 6 | - `validate` — Validate existing translations for completeness and format |
| 7 | - `status` — Report overall localization status |
| 8 | |
| 9 | 2. **For `scan`**: |
| 10 | - Search `src/` for hardcoded user-facing strings: |
| 11 | - String literals in UI code that are not wrapped in a localization function |
| 12 | - Concatenated strings that should be parameterized |
| 13 | - Strings with positional placeholders (`%s`, `%d`) instead of named ones (`{playerName}`) |
| 14 | - Search for localization anti-patterns: |
| 15 | - Date/time formatting not using locale-aware functions |
| 16 | - Number formatting without locale awareness |
| 17 | - Text embedded in images or textures (flag asset files) |
| 18 | - Strings that assume left-to-right text direction |
| 19 | - Report all findings with file paths and line numbers |
| 20 | |
| 21 | 3. **For `extract`**: |
| 22 | - Scan all source files for localized string references |
| 23 | - Compare against the existing string table (if any) in `assets/data/` |
| 24 | - Generate new entries for strings that don't have keys yet |
| 25 | - Suggest key names following the convention: `[category].[subcategory].[description]` |
| 26 | - Output a diff of new strings to add to the string table |
| 27 | |
| 28 | 4. **For `validate`**: |
| 29 | - Read all string table files in `assets/data/` |
| 30 | - Check each entry for: |
| 31 | - Missing translations (key exists but no translation for a locale) |
| 32 | - Placeholder mismatches (source has `{name}` but translation is missing it) |
| 33 | - String length violations (exceeds character limits for UI elements) |
| 34 | - Orphaned keys (translation exists but nothing references the key in code) |
| 35 | - Report validation results grouped by locale and severity |
| 36 | |
| 37 | 5. **For `status`**: |
| 38 | - Count total localizable strings |
| 39 | - Per locale: count translated, untranslated, and stale (source changed since translation) |
| 40 | - Generate a coverage matrix: |
| 41 | |
| 42 | ```markdown |
| 43 | ## Localization Status |
| 44 | Generated: [Date] |
| 45 | |
| 46 | | Locale | Total | Translated | Missing | Stale | Coverage | |
| 47 | |--------|-------|-----------|---------|-------|----------| |
| 48 | | en (source) | [N] | [N] | 0 | 0 | 100% | |
| 49 | | [locale] | [N] | [N] | [N] | [N] | [X]% | |
| 50 | |
| 51 | ### Issues |
| 52 | - [N] hardcoded strings found in source code |
| 53 | - [N] strings exceeding character limits |
| 54 | - [N] placeholder mismatches |
| 55 | - [N] orphaned keys (can be cleaned up) |
| 56 | ``` |
| 57 | |
| 58 | ### Rules |
| 59 | - English (en) is always the source locale |
| 60 | - Every string table entry must include a translator comment explaining context |
| 61 | - Never modify translation files directly — generate diffs for review |
| 62 | - Character limits must be defined per-UI-element and enforced automatically |
| 63 | - Right-to-left (RTL) language support should be considered from the start, not bolted on later |