wordpress-mobile / wordpress-mobile/WordPress-iOS

Localization: extract SwiftUI `Text("…")` strings (after a `Text(verbatim:)` cleanup pass)

Open
#25,700 1 comment 0 reactions 0 assignees View on GitHub

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
  1. Audit the Text("…") literals and convert the non-translatable ones (glyphs, single characters, symbols, non-words) to Text(verbatim:), so they're correctly excluded from extraction.
  2. Enable extraction — pass swiftui: true to generate_strings_catalog (flips --SwiftUI-Text on in extract_stringsdata).
References
  • Code: fastlane/lanes/localization_catalog.rb — the swiftui: flag and the extract_stringsdata comment.
  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.