Loading...
Loading...
iOS/macOS app localization management for Tuist-based projects with .strings files. Use when: (1) Adding new translation keys to modules, (2) Validating .strings files for missing/duplicate keys, (3) Syncing translations across languages, (4) AI-powered translation from English to other locales, (5) Checking placeholder consistency (%@, %d), (6) Generating localization reports, (7) Updating Swift code to use localized strings instead of hardcoded text.
npx skill4agent add tddworks/claude-skills app-localization<ModuleName>/
├── Resources/
│ ├── en.lproj/Localizable.strings # Primary language (English)
│ ├── <locale>.lproj/Localizable.strings # Additional locales
│ └── ...
├── Derived/
│ └── Sources/
│ └── TuistStrings+<ModuleName>.swift # Generated by Tuist
└── Sources/
└── **/*.swift # Uses <ModuleName>Strings.Section.keytuist generate# Find Text("...") patterns with hardcoded strings
grep -rn 'Text("[A-Z]' <ModuleName>/Sources/
grep -rn 'title: "[A-Z]' <ModuleName>/Sources/
grep -rn 'label: "[A-Z]' <ModuleName>/Sources/
grep -rn 'placeholder: "[A-Z]' <ModuleName>/Sources//* Section description */
"section.key.name" = "English value";
"section.key.withParam" = "Value with %@";"section.key.name" = "<translated value>";
"section.key.withParam" = "<translated> %@";tuist generateDerived/Sources/TuistStrings+<ModuleName>.swift<ModuleName>Strings.Section.keyName<ModuleName>Strings.Section.keyWithParam(value)| Hardcoded Pattern | Localized Pattern |
|---|---|
| |
| |
| |
| |
Text("Settings")
.font(.headline)
TextField("Enter your name", text: $name)
Button("Submit") { ... }
Text("Hello, \(userName)!")Text(<Module>Strings.Section.settings)
.font(.headline)
TextField(<Module>Strings.Field.namePlaceholder, text: $name)
Button(<Module>Strings.Action.submit) { ... }
Text(<Module>Strings.Greeting.hello(userName))"search.noResults" = "No results for \"%@\""// Before
Text("No results for \"\(searchText)\"")
// After
Text(<Module>Strings.Search.noResults(searchText))// Keys:
// "item.count" = "%d item"
// "item.countPlural" = "%d items"
// Swift:
let label = count == 1
? <Module>Strings.Item.count(count)
: <Module>Strings.Item.countPlural(count)"message.detail" = "%@ uploaded %d files"Text(<Module>Strings.Message.detail(userName, fileCount))python scripts/validate_strings.py /path/to/<ModuleName>search.noResultspython scripts/validate_strings.py /path/to/<ModuleName>python scripts/sync_translations.py /path/to/<ModuleName> --reportpython scripts/sync_translations.py /path/to/<ModuleName> --sync"domain.context.element"<Module>Strings.Domain.Context.element| User Mental Model | Key Pattern | Generated Accessor |
|---|---|---|
| "I'm looking at my profile" | | |
| "I'm testing a build" | | |
| "I'm adding a tester" | | |
| "Something went wrong with sync" | | |
| Bad (Technical) | Good (Domain-Focused) |
|---|---|
| |
| |
| |
| |
| |
| |
/* Profile Section */
"profile.title" = "Profile";
"profile.name" = "Name";
"profile.save" = "Save Changes";
"profile.saveSuccess" = "Profile updated";
/* Beta Builds */
"betaBuild.title" = "Beta Builds";
"betaBuild.whatToTest" = "What to Test";
"betaBuild.submitForReview" = "Submit for Review";
"betaBuild.expireConfirm" = "Expire this build?";
/* Tester Groups */
"testerGroup.create" = "Create Group";
"testerGroup.addTester" = "Add Tester";
"testerGroup.empty" = "No testers yet";betaBuild.submitForReview/* Comment describing the section */
"key.name" = "Value";
"key.with.parameter" = "Hello, %@!";
"key.with.number" = "%d items";
"key.with.multiple" = "%1$@ has %2$d items";\"