home / skills / willsigmon / sigstack / localization-helper
This skill identifies hardcoded UI strings, inserts I18n.str calls, and creates localized keys for six languages in the Leavn app.
npx playbooks add skill willsigmon/sigstack --skill localization-helperReview the files below or copy the command above to add this skill to your agents.
---
name: Localization Helper
description: Find hardcoded strings in Leavn app, add I18n.str() calls, create localization keys for all 6 supported languages (en, es, de, zh-Hans, ar, he)
allowed-tools: Read, Edit, Grep, Glob
---
# Localization Helper
Replace hardcoded Text() strings with I18n pattern for 6 languages.
Pattern:
```swift
// BEFORE
Text("Verse of the Day")
// AFTER
Text(I18n.str("widget.verseOfDay", default: "Verse of the Day"))
```
Add keys to: `LeavnApp/Sources/Resources/{lang}.lproj/Localizable.strings`
Use when: Hardcoded strings found, adding UI text, widget/ChatterboxKit localization
This skill automates converting hardcoded UI strings into I18n.str() calls and generates localization keys for six supported languages (en, es, de, zh-Hans, ar, he). It scans TypeScript/Swift sources in the Leavn app, replaces Text() literals with the I18n pattern, and inserts keys into Localizable.strings files. The result is consistent, ready-to-translate resource files and minimal manual editing for UI text and widgets.
The tool searches source files for hardcoded Text() or similar UI string instances and proposes or applies replacements to the I18n.str("namespace.key", default: "Original text") pattern. It creates or updates entries in LeavnApp/Sources/Resources/{lang}.lproj/Localizable.strings for all six languages, populating the English value and placeholders for others. Changes are confined to localization calls and .strings files to keep code logic untouched.
Will the skill change logic or variable names?
No. It only replaces string literals used in UI text with I18n.str() calls and updates Localizable.strings files; code flow and variable names remain unchanged.
How are duplicate strings handled?
The tool suggests a key for each occurrence but you should consolidate duplicates manually by choosing a single key to reuse when context and meaning match.