As iOS lead of a SwiftUI app shipping in English, German and Arabic, what String Catalog pipeline and release checks do you set, and who owns new strings?
answer
- one source of truth per module
- engineers write keys, translators write values
- review rules keep strings flowing in
- pseudolanguages before real translations
- decide what blocks a release
basics
~20 sMake String Catalogs, one per module, the only source of strings: engineers add commented keys in code, translators work from exports, review enforces localizable types and leading or trailing layout, and releases gate on untranslated counts, pseudolanguage and right-to-left runs.
solid answer
~40 sI make the String Catalog the single source of truth, one per module, with packages loading theirs through `bundle: .module`. Engineers add copy only through `LocalizedStringKey` literals, `LocalizedStringResource` or `String(localized:)`, each with a `comment:`; Xcode extracts keys on build and catalog diffs show up in review. Translators work from exported catalogs, never in code, and stale keys get pruned. Review rejects `String`-typed copy, `verbatim:` on user-facing text, fragmented sentences and plural logic in code. Before release: a CI count of untranslated or needs-review strings per language, a double-length pseudolanguage pass for truncation, and a right-to-left pass with a named owner for Arabic. The open call is what blocks a release; I would block on the booking and payment flows and allow English fallback elsewhere.
go deeper
Recall that the String Catalog holds every key and translation and that Xcode fills it from code when you build.
Explain how keys reach the catalog, how plural variations and comments help translators, and why packages need their own bundle.
Show the checks that catch real defects before users do: untranslated counts, pseudolanguage truncation and right-to-left walkthroughs.
Argue the tradeoffs: key style, catalog ownership per module, translation lead time, and exactly which missing strings block a release.
## The decision a lead owns Shipping a SwiftUI travel app in English, German and Arabic is less about APIs than about **where strings live, who may add them, and what blocks a release**. There is no single right pipeline; the choices below trade translation cost, release speed and the risk of shipping English or broken layouts to paying users. ## The String Catalog as the source of truth Since Xcode 15, a **String Catalog** (`.xcstrings`) holds every key, its translations, plural and device variations, translator comments and a **state** for each entry (new, needs review, translated, stale). Xcode adds keys it extracts from code when the target builds and marks keys no longer found as stale. Key decisions: - **One catalog per module.** Each Swift package feature module keeps its own catalog and loads it with `bundle: .module`; the app target keeps the app-wide strings. Ownership follows the code, and a module can be translated and reviewed on its own. - **Key style.** Source-text keys (`"Free cancellation"`) are readable and fall back to English for free. Semantic keys with a default value, such as `LocalizedStringResource("booking.cta", defaultValue: "Book", comment: "Button that starts payment")`, stay stable when copy changes and separate homonyms like "Book" the verb and "Book" the noun. Many teams use source text by default and semantic keys where meaning collides. - **Catalog diffs in review.** The catalog is JSON in the repository, so a pull request that adds UI copy shows the new keys; reviewers check that each one has a comment. ## Who adds strings, and how 1. **Engineers add copy in code** through `LocalizedStringKey` literals, `LocalizedStringResource` values or `String(localized:)`, always with a `comment:`. Nobody edits translations by hand in the catalog. 2. **Extraction happens on build**, so the catalog is always current with the code. 3. **Translators receive an export** of the catalog per language and return it; the import updates states. Whether that is an agency, in-house reviewers or a vendor platform is a budget decision, not a SwiftUI one. 4. **Stale keys are removed** on a schedule, so translators do not pay for dead copy. ## Rules enforced in code review - No interface copy through `String`-typed component parameters or view model properties. - No `Text(verbatim:)` for anything a user should read in their language. - No sentences assembled from fragments, and no plural logic in code; counts are numeric arguments with plural variations in the catalog. - Layout uses leading and trailing only; directional images opt in to mirroring explicitly. - Deprecation warnings from localized interpolation fail the review. ## Checks before a release | Check | What it catches | Cost | |---|---|---| | Untranslated or needs-review count per language, read from the catalog | Missing German or Arabic strings | A small script in CI | | Double-length pseudolanguage run | Truncation and clipped buttons, before translations exist | Minutes per screen | | Right-to-left pseudolanguage or a real Arabic run | Mirroring mistakes, unflipped arrows, hard-coded positions | A walkthrough per release | | Previews with `.environment(\.layoutDirection, .rightToLeft)` | Regressions while building a screen | Near zero once written | | Screens captured in each language | Visual drift across releases | Test infrastructure, covered with the testing material | ## The tradeoffs to argue - **Block or fall back.** Blocking a release on a missing Arabic string protects quality; shipping with the English fallback protects the release train. A common middle is to block only on strings in core booking and payment flows. - **Translation lead time.** Freezing copy a week before release gives translators room but slows product changes; continuous translation needs budget and a fast vendor loop. - **Right-to-left ownership.** Without a named owner and a native-speaker review, Arabic quality decays quietly, because developers who do not read Arabic cannot tell a wrong plural from a right one. A strong answer names the catalog as the single source, the code rules that keep strings flowing into it, and an explicit release gate the team can defend.
- Source-text keys or semantic keys: which do you standardise on?Source text by default, because it is readable in code and falls back to English when a translation is missing. Semantic keys with a `defaultValue` where meaning collides or copy changes often, for example `LocalizedStringResource("booking.cta", defaultValue: "Book", comment: …)`. Mixing is fine if the rule for choosing is written down.
- How do you keep Arabic quality from decaying between releases?Name an owner who reads Arabic, budget a native review of new strings and plural forms, and keep right-to-left previews on every screen with directional content. Developers who do not read the language cannot judge a wrong plural, so the check has to be a person, not only a script.
- Translators should edit strings directly in the Swift code
- Pseudolocalization is pointless until real translations arrive
- A single English pass proves the Arabic layout works
- Stale catalog entries are harmless and never need pruning
- Developers who do not read Arabic can verify Arabic plurals by eye