Skip to content

App Intents: extract localizable strings from code at code freeze#25766

Open
crazytonyli wants to merge 3 commits into
trunkfrom
task/new-siri-integration-simplify-localization
Open

App Intents: extract localizable strings from code at code freeze#25766
crazytonyli wants to merge 3 commits into
trunkfrom
task/new-siri-integration-simplify-localization

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Relates to #25753.

The deleted Localizable.strings files were added in #25753. They were added because, on iOS 17, the App Intents strings looks up the strings tables in the extension bundle, not the app bundle. But from iOS 18, they can look up from the app bundle. This discrepancy is validated on simulators. I'm not sure if that's the case on real devices too. I don't have an iOS 17 device.

This PR simplified the localizable strings, by dropping the strings tables in the extension bundle (again, which is newly added in #25753). That means iOS 17 don't get the translated strings. I think this is an okay compromise, because we don't have many users on iOS 17 and we are going to drop it in two months.

To make sure the App Intents strings (used via LocalizedStringResource) are translated, the code freeze now extracts the LocalizedStringResource call sites with xcstringstool (genstrings cannot parse them) and merges them into the GlotPress upload.

iOS 18 and later resolve the widget configuration UI's App Intents strings against the app bundle, whose GlotPress-managed Localizable.strings already carries the ios-widget. keys in every locale, so the static copies in the extension bundle only served iOS 17 (verified on 17.5/18.6/26.5 simulators, including that iOS 17 has no fallback to the app bundle). The iOS 17 user base no longer justifies maintaining 34 hand-refreshed translation snapshots, so its widget configuration UI now shows the English defaults.
genstrings cannot parse LocalizedStringResource, so the App Intents strings reached GlotPress through a hand-maintained mirror of the defaultValues in code, which could silently drift and ship a new string English-only. The code freeze now extracts the call sites with xcstringstool (which understands LocalizedStringResource, including comments) and merges them into the upload like the plural originals, making code the single source of truth. Translator comments move into the code via the comment: parameter, and the mirror file is deleted.
@dangermattic

Copy link
Copy Markdown
Collaborator
2 Warnings
⚠️ Translation files *.lproj/Localizable.strings should only be updated on a release branch.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number33087
VersionPR #25766
Bundle IDorg.wordpress.alpha
Commitd523a8f
Installation URL5s6ipli0vi3ho
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number33087
VersionPR #25766
Bundle IDcom.jetpack.alpha
Commitd523a8f
Installation URL0adrn5f4sq0sg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

app_intents_entries duplicated current_english_values' fresh-catalog sync inline, which also pushed its ABC size past the RuboCop threshold flagged on the PR. Both now delegate to a shared synced_throwaway_catalog helper, and the empty-stringsdata guard now applies to both callers.
@crazytonyli crazytonyli requested review from jkmassel and mokagio July 9, 2026 02:19
@crazytonyli crazytonyli added this to the 27.1 milestone Jul 9, 2026
@crazytonyli crazytonyli marked this pull request as ready for review July 9, 2026 02:19
@crazytonyli crazytonyli requested a review from a team as a code owner July 9, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants