.cursor/skills/localize/SKILL.md
Localize ryOS apps and components by extracting hardcoded strings, replacing with translation keys, and syncing across languages. Use when localizing an app, adding i18n support, translating UI text, or working with translation files.
npx skillsauth add ryokun6/ryos localizeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
- [ ] 1. Extract hardcoded strings
- [ ] 2. Replace with t() calls in source files
- [ ] 3. Add English translations to en/translation.json
- [ ] 4. Sync translations across languages
- [ ] 5. Machine translate [TODO] keys
- [ ] 6. Validate coverage
bun run scripts/extract-strings.ts --pattern [PATTERN]
For each component:
import { useTranslation } from "react-i18next";const { t } = useTranslation();t("apps.[appName].category.key")t to dependency arrays for useMemo/useCallbackapps.[appName].menu.* # Menu labels
apps.[appName].dialogs.* # Dialog titles/descriptions
apps.[appName].status.* # Status messages
apps.[appName].ariaLabels.* # Accessibility labels
apps.[appName].help.* # Help items (auto-translated)
// Basic
t("apps.ipod.menu.file")
// With variables
t("apps.ipod.status.trackCount", { count: 5 })
// Conditional
isPlaying ? t("pause") : t("play")
// With symbol prefix
`✓ ${t("apps.ipod.menu.shuffle")}`
Add to src/lib/locales/en/translation.json:
{
"apps": {
"ipod": {
"menu": { "file": "File", "addSong": "Add Song..." },
"dialogs": { "clearLibraryTitle": "Clear Library" },
"status": { "shuffleOn": "Shuffle ON" }
}
}
}
bun run scripts/sync-translations.ts --mark-untranslated
Adds missing keys to all language files, marked with [TODO].
bun run scripts/machine-translate.ts
Requires GOOGLE_GENERATIVE_AI_API_KEY env variable.
bun run scripts/find-untranslated-strings.ts
| Component | What to translate |
|-----------|-------------------|
| Menu bars | All labels, items, submenus |
| Dialogs | Titles, descriptions, button labels |
| Status | showStatus() calls, toasts |
| Help items | Auto-translated via useTranslatedHelpItems |
apps.[appName].help.[key].title/descriptiont in dependency arrays when used in useMemo/useCallbackdevelopment
Update ryOS documentation by analyzing the codebase and syncing docs with current implementation. Use when updating docs, syncing documentation, or when docs are outdated.
content-media
Design and style UI components for ryOS following the 4 OS themes (System 7, macOS Aqua, Windows XP, Windows 98). Use when creating UI components, styling elements, working with themes, adding visual effects, or implementing retro OS aesthetics.
development
Create new applications for ryOS following established patterns and conventions. Use when building a new app, adding an application to the desktop, creating app components, or scaffolding app structures.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.