wordpress-mobile / wordpress-mobile/WordPress-iOS
Localization: extract SwiftUI `Text("…")` strings (after a `Text(verbatim:)` cleanup pass)
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 3.9k
- Forks
- 1.2k
- Avg merge
- 23h 51m
- Merged PRs (30d)
- 58
Description
The build-free String Catalog generation lane (generate_strings_catalog, added in #25688) can extract SwiftUI Text("literal") strings via xcstringstool extract --SwiftUI-Text, but it's gated behind a swiftui: parameter and off by default. This issue tracks turning it on.
Why it's off today
The app currently has ~94 Text("…") literals but only 16 Text(verbatim:). With --SwiftUI-Text on, xcstringstool would extract every Text("…") literal — including non-translatable ones like single glyphs/characters (Text("Aa"), Text("A")) — and feed them to translators as garbage. So it's a deliberate coverage expansion that needs a cleanup pass first.
What's needed
- Audit the
Text("…")literals and convert the non-translatable ones (glyphs, single characters, symbols, non-words) toText(verbatim:), so they're correctly excluded from extraction. - Enable extraction — pass
swiftui: truetogenerate_strings_catalog(flips--SwiftUI-Texton inextract_stringsdata).
References
- Code:
fastlane/lanes/localization_catalog.rb— theswiftui:flag and theextract_stringsdatacomment. - PR: #25688
Until this lands, SwiftUI Text("…") strings are not extracted or localized by the catalog pipeline (the legacy genstrings / AppLocalizedString paths are unaffected).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in fastlane/lanes/localization_catalog.rb to inspect the swiftui flag and the extract_stringsdata comment, then audit the app's SwiftUI Text("…") literals for glyphs, single characters, symbols, and other non-words. Convert those cases to Text(verbatim:), enable swiftui: true, and verify that the catalog pipeline extracts translatable strings without the excluded literals.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system, localization, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100