- Home
- Skills
- Tddworks
- Claude Skills
- Tuist App Localization
tuist-app-localization_skill
- HTML
22
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill tddworks/claude-skills --skill tuist-app-localization- SKILL.md7.2 KB
Overview
This skill manages iOS/macOS localization for Tuist-based projects that use .strings files and generated TuistStrings accessors. It streamlines adding and syncing translation keys, validating placeholders and duplicates, running AI-powered translations from English to other locales, and updating Swift code to use type-safe localized accessors. The goal is consistent, maintainable localization across modules and languages.
How this skill works
The skill inspects module Resources/*.lproj/Localizable.strings files and Sources for hardcoded strings, then validates keys across locales for missing, duplicate, or placeholder mismatches. It can generate or sync missing keys as placeholders, run AI-assisted translations from the English source while preserving placeholders, and provide transformations to replace hardcoded Swift strings with Tuist-generated accessors. It also produces reports and invokes validation scripts to catch issues before build.
When to use it
- Adding new translation keys to a module and ensuring all locales have entries
- Validating .strings files for missing keys, duplicates, or placeholder mismatches
- Syncing translations across locales and creating placeholder entries for missing keys
- AI-assisted translation from English to target locales while preserving placeholders
- Refactoring Swift code to replace hardcoded strings with TuistStrings accessors
- Generating localization reports for reviewers or translators
Best practices
- Add keys first to English (primary) and mirror key names across all locales before translating
- Use domain-focused key naming (domain.context.element) to reflect user intent
- Preserve all placeholders exactly (%@, %d, %ld, %1$@, etc.) and use positional parameters when word order differs
- Run tuist generate after editing .strings to update type-safe accessors and then replace hardcoded strings in Swift
- Validate .strings files with the provided scripts to catch missing or duplicate keys and mismatched placeholders before building
Example use cases
- Find hardcoded Text/label/title/placeholder strings in a module and replace them with generated accessors
- Add a new UI string: add key to en.lproj and corresponding keys to other locales, then run tuist generate
- Detect and report missing translations and sync placeholders across locales using the sync script
- Translate an English .strings file to zh-Hans, ja, de, etc., using AI while preserving placeholders and context
- Validate placeholder consistency across all locales to avoid runtime formatting errors
- Generate a localization report listing untranslated or duplicate keys for reviewers
FAQ
Add the key to Localizable.strings, run tuist generate to create TuistStrings accessors, then replace occurrences (e.g., Text("Title") → Text(ModuleStrings.Section.title).
How are placeholders handled during translation?
Always preserve placeholder tokens exactly. Use positional parameters (%1$@, %2$d) when target-language word order differs to ensure correct formatting.