Skip to content

Commit 5778339

Browse files
committed
Stop shipping widget configuration translations for iOS 17
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.
1 parent 0463d83 commit 5778339

37 files changed

Lines changed: 31 additions & 397 deletions

File tree

Modules/Sources/JetpackStatsWidgetsCore/AppIntents/SelectSiteIntent.swift

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,34 @@ import AppIntents
1212
/// `ios-widget.` prefix, and the downloaded translations land in the app's
1313
/// `Localizable.strings` under those prefixed keys.
1414
///
15-
/// The keys must resolve in two bundles, because the OS picks a different one depending on
16-
/// version (verified on simulators): iOS 26 resolves the widget configuration UI's strings
17-
/// against the app bundle (whose GlotPress-managed `Localizable.strings` carries the prefixed
18-
/// keys in every locale), while iOS 17 resolves against the widget extension bundle, which
19-
/// ships static copies of the same prefixed keys in
20-
/// `Sources/JetpackStatsWidgets/Resources/<locale>.lproj/Localizable.strings`.
21-
/// A nested SPM package resource bundle is never consulted, so the strings cannot live in
22-
/// this package.
15+
/// iOS 18 and later resolve the widget configuration UI's strings against the app bundle,
16+
/// whose GlotPress-managed `Localizable.strings` carries the prefixed keys in every locale
17+
/// (verified on simulators; a nested SPM package resource bundle is never consulted).
18+
/// iOS 17 resolves against the widget extension bundle only, with no fallback to the app
19+
/// bundle, so it shows the English default values; we accept English there rather than
20+
/// shipping per-locale copies in the extension.
2321
public struct SelectSiteIntent: WidgetConfigurationIntent, CustomIntentMigratedAppIntent {
2422
public static let intentClassName = "SelectSiteIntent"
2523

26-
public static let title = LocalizedStringResource("ios-widget.gpCwrM", defaultValue: "Select Site")
24+
public static let title = LocalizedStringResource(
25+
"ios-widget.gpCwrM",
26+
defaultValue: "Select Site",
27+
table: "Localizable",
28+
comment: "Title shown when choosing a site for a widget."
29+
)
2730

2831
// The legacy intent was ineligible for Siri suggestions; keep this
2932
// configuration-only intent out of Shortcuts and Spotlight the same way.
3033
public static let isDiscoverable = false
3134

32-
@Parameter(title: LocalizedStringResource("ios-widget.ILcGmf", defaultValue: "Site"))
35+
@Parameter(
36+
title: LocalizedStringResource(
37+
"ios-widget.ILcGmf",
38+
defaultValue: "Site",
39+
table: "Localizable",
40+
comment: "Label for the site picker when configuring a widget."
41+
)
42+
)
3343
public var site: SiteEntity?
3444

3545
public init() {}

Modules/Sources/JetpackStatsWidgetsCore/AppIntents/SiteEntity.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ import Foundation
77
/// the `identifier` of the legacy SiriKit `Site` object so that widget configurations created
88
/// before the App Intents migration keep resolving to the same site.
99
///
10-
/// The "ios-widget.ILcGmf" localization key resolves against the app bundle on iOS 26 and
11-
/// the widget extension bundle on iOS 17; see `SelectSiteIntent` for the details.
10+
/// The "ios-widget.ILcGmf" localization key resolves against the app bundle on iOS 18 and
11+
/// later; see `SelectSiteIntent` for the details.
1212
public struct SiteEntity: AppEntity {
1313
public static let typeDisplayRepresentation = TypeDisplayRepresentation(
14-
name: LocalizedStringResource("ios-widget.ILcGmf", defaultValue: "Site")
14+
name: LocalizedStringResource(
15+
"ios-widget.ILcGmf",
16+
defaultValue: "Site",
17+
table: "Localizable",
18+
comment: "Name of the site entity used by widgets and App Intents."
19+
)
1520
)
1621

1722
public static var defaultQuery: SiteEntityQuery { SiteEntityQuery() }

Sources/JetpackStatsWidgets/Resources/ar.lproj/Localizable.strings

Lines changed: 0 additions & 12 deletions
This file was deleted.

Sources/JetpackStatsWidgets/Resources/bg.lproj/Localizable.strings

Lines changed: 0 additions & 12 deletions
This file was deleted.

Sources/JetpackStatsWidgets/Resources/cs.lproj/Localizable.strings

Lines changed: 0 additions & 12 deletions
This file was deleted.

Sources/JetpackStatsWidgets/Resources/cy.lproj/Localizable.strings

Lines changed: 0 additions & 9 deletions
This file was deleted.

Sources/JetpackStatsWidgets/Resources/da.lproj/Localizable.strings

Lines changed: 0 additions & 9 deletions
This file was deleted.

Sources/JetpackStatsWidgets/Resources/de.lproj/Localizable.strings

Lines changed: 0 additions & 12 deletions
This file was deleted.

Sources/JetpackStatsWidgets/Resources/en-AU.lproj/Localizable.strings

Lines changed: 0 additions & 12 deletions
This file was deleted.

Sources/JetpackStatsWidgets/Resources/en-CA.lproj/Localizable.strings

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)