$npx -y skills add DNYoussef/context-cascade --skill i18n-automation/*============================================================================*/ /* I18N-AUTOMATION SKILL :: VERILINGUA x VERIX EDITION */ /*============================================================================*/
| 1 | /*============================================================================*/ |
| 2 | /* I18N-AUTOMATION SKILL :: VERILINGUA x VERIX EDITION */ |
| 3 | /*============================================================================*/ |
| 4 | |
| 5 | --- |
| 6 | name: i18n-automation |
| 7 | version: 1.0.0 |
| 8 | description: | |
| 9 | [assert|neutral] Automate internationalization and localization workflows for web applications with translation, key generation, and library setup [ground:given] [conf:0.95] [state:confirmed] |
| 10 | category: delivery |
| 11 | tags: |
| 12 | - i18n |
| 13 | - translation |
| 14 | - localization |
| 15 | - automation |
| 16 | - react |
| 17 | author: ruv |
| 18 | cognitive_frame: |
| 19 | primary: aspectual |
| 20 | goal_analysis: |
| 21 | first_order: "Execute i18n-automation workflow" |
| 22 | second_order: "Ensure quality and consistency" |
| 23 | third_order: "Enable systematic delivery processes" |
| 24 | --- |
| 25 | |
| 26 | /*----------------------------------------------------------------------------*/ |
| 27 | /* S0 META-IDENTITY */ |
| 28 | /*----------------------------------------------------------------------------*/ |
| 29 | |
| 30 | [define|neutral] SKILL := { |
| 31 | name: "i18n-automation", |
| 32 | category: "delivery", |
| 33 | version: "1.0.0", |
| 34 | layer: L1 |
| 35 | } [ground:given] [conf:1.0] [state:confirmed] |
| 36 | |
| 37 | /*----------------------------------------------------------------------------*/ |
| 38 | /* S1 COGNITIVE FRAME */ |
| 39 | /*----------------------------------------------------------------------------*/ |
| 40 | |
| 41 | [define|neutral] COGNITIVE_FRAME := { |
| 42 | frame: "Aspectual", |
| 43 | source: "Russian", |
| 44 | force: "Complete or ongoing?" |
| 45 | } [ground:cognitive-science] [conf:0.92] [state:confirmed] |
| 46 | |
| 47 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 48 | Kaynak dogrulama modu etkin. |
| 49 | |
| 50 | /*----------------------------------------------------------------------------*/ |
| 51 | /* S2 TRIGGER CONDITIONS */ |
| 52 | /*----------------------------------------------------------------------------*/ |
| 53 | |
| 54 | [define|neutral] TRIGGER_POSITIVE := { |
| 55 | keywords: ["i18n-automation", "delivery", "workflow"], |
| 56 | context: "user needs i18n-automation capability" |
| 57 | } [ground:given] [conf:1.0] [state:confirmed] |
| 58 | |
| 59 | /*----------------------------------------------------------------------------*/ |
| 60 | /* S3 CORE CONTENT */ |
| 61 | /*----------------------------------------------------------------------------*/ |
| 62 | |
| 63 | # i18n Automation |
| 64 | |
| 65 | ## Kanitsal Cerceve (Evidential Frame Activation) |
| 66 | Kaynak dogrulama modu etkin. |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | ## When to Use This Skill |
| 72 | |
| 73 | - **Multi-Language Support**: Building apps for international markets |
| 74 | - **Translation Workflows**: Automating translation key extraction and management |
| 75 | - **Localization**: Adapting content for regional formats (dates, currencies, numbers) |
| 76 | - **RTL Support**: Implementing right-to-left languages (Arabic, Hebrew) |
| 77 | - **Pluralization**: Handling complex plural rules across languages |
| 78 | - **Dynamic Content**: Translating user-generated or CMS content |
| 79 | |
| 80 | ## When NOT to Use This Skill |
| 81 | |
| 82 | - **Single-Language Apps**: English-only applications with no internationalization plans |
| 83 | - **Static Content**: Hardcoded strings that will not change |
| 84 | - **Non-Web Projects**: Embedded systems or native apps with platform-specific i18n |
| 85 | - **Third-Party Managed**: Apps using fully-managed translation services (Lokalise, Phrase) |
| 86 | |
| 87 | ## Success Criteria |
| 88 | |
| 89 | - [ ] All user-facing strings externalized to translation files |
| 90 | - [ ] Translation keys organized by feature/namespace |
| 91 | - [ ] Pluralization rules implemented correctly |
| 92 | - [ ] Date/time/currency formatting respects locale |
| 93 | - [ ] RTL layouts functional (if applicable) |
| 94 | - [ ] Language switching works without reload |
| 95 | - [ ] Missing translation handling implemented |
| 96 | - [ ] Translation files validated for syntax errors |
| 97 | |
| 98 | ## Edge Cases to Handle |
| 99 | |
| 100 | - **Interpolated Variables**: Preserve placeholders in translations |
| 101 | - **HTML in Translations**: Sanitize translated content safely |
| 102 | - **Nested Keys**: Manage deeply nested translation structures |
| 103 | - **Missing Translations**: Fallback to default language gracefully |
| 104 | - **Dynamic Keys**: Handle runtime-computed translation keys |
| 105 | - **Context-Sensitive**: Same word different meanings (e.g., Post noun vs verb) |
| 106 | |
| 107 | ## Guardrails |
| 108 | |
| 109 | - **NEVER** hardcode user-facing strings in components |
| 110 | - **ALWAYS** use i18n library functions (t(), useTranslation(), etc.) |
| 111 | - **NEVER** assume left-to-right text direction |
| 112 | - **ALWAYS** validate translation file JSON/YAML syntax |
| 113 | - **NEVER** concatenate translated strings (breaks grammar) |
| 114 | - **ALWAYS** provide context for translators (comments in translation files) |
| 115 | - **NEVER** ship with empty or placeholder translations |
| 116 | |
| 117 | ## Evidence-Based Validation |
| 118 | |
| 119 | - [ ] Run i18n linter to detect untranslated strings |
| 120 | - [ ] Test app in all supported locales |
| 121 | - [ ] Validate translation files with JSON Schema |
| 122 | - [ ] Check RTL layout in browser DevTools |
| 123 | - [ ] Test pluralization with boundary values (0, 1, 2, 5, 100) |
| 124 | - [ ] Verify date/number formatting with Intl API |
| 125 | - [ ] Review translations with native speakers |
| 126 | |
| 127 | ## |