Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,34 @@ import AppIntents
/// `ios-widget.` prefix, and the downloaded translations land in the app's
/// `Localizable.strings` under those prefixed keys.
///
/// The keys must resolve in two bundles, because the OS picks a different one depending on
/// version (verified on simulators): iOS 26 resolves the widget configuration UI's strings
/// against the app bundle (whose GlotPress-managed `Localizable.strings` carries the prefixed
/// keys in every locale), while iOS 17 resolves against the widget extension bundle, which
/// ships static copies of the same prefixed keys in
/// `Sources/JetpackStatsWidgets/Resources/<locale>.lproj/Localizable.strings`.
/// A nested SPM package resource bundle is never consulted, so the strings cannot live in
/// this package.
/// iOS 18 and later resolve the widget configuration UI's strings against the app bundle,
/// whose GlotPress-managed `Localizable.strings` carries the prefixed keys in every locale
/// (verified on simulators; a nested SPM package resource bundle is never consulted).
/// iOS 17 resolves against the widget extension bundle only, with no fallback to the app
/// bundle, so it shows the English default values; we accept English there rather than
/// shipping per-locale copies in the extension.
public struct SelectSiteIntent: WidgetConfigurationIntent, CustomIntentMigratedAppIntent {
public static let intentClassName = "SelectSiteIntent"

public static let title = LocalizedStringResource("ios-widget.gpCwrM", defaultValue: "Select Site")
public static let title = LocalizedStringResource(
"ios-widget.gpCwrM",
defaultValue: "Select Site",
table: "Localizable",
comment: "Title shown when choosing a site for a widget."
)

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

@Parameter(title: LocalizedStringResource("ios-widget.ILcGmf", defaultValue: "Site"))
@Parameter(
title: LocalizedStringResource(
"ios-widget.ILcGmf",
defaultValue: "Site",
table: "Localizable",
comment: "Label for the site picker when configuring a widget."
)
)
public var site: SiteEntity?

public init() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ import Foundation
/// the `identifier` of the legacy SiriKit `Site` object so that widget configurations created
/// before the App Intents migration keep resolving to the same site.
///
/// The "ios-widget.ILcGmf" localization key resolves against the app bundle on iOS 26 and
/// the widget extension bundle on iOS 17; see `SelectSiteIntent` for the details.
/// The "ios-widget.ILcGmf" localization key resolves against the app bundle on iOS 18 and
/// later; see `SelectSiteIntent` for the details.
public struct SiteEntity: AppEntity {
public static let typeDisplayRepresentation = TypeDisplayRepresentation(
name: LocalizedStringResource("ios-widget.ILcGmf", defaultValue: "Site")
name: LocalizedStringResource(
"ios-widget.ILcGmf",
defaultValue: "Site",
table: "Localizable",
comment: "Name of the site entity used by widgets and App Intents."
)
)

public static var defaultQuery: SiteEntityQuery { SiteEntityQuery() }
Expand Down
12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/ar.lproj/Localizable.strings

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/bg.lproj/Localizable.strings

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/cs.lproj/Localizable.strings

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/de.lproj/Localizable.strings

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/en.lproj/Localizable.strings

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/es.lproj/Localizable.strings

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/fr.lproj/Localizable.strings

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/he.lproj/Localizable.strings

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/id.lproj/Localizable.strings

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/it.lproj/Localizable.strings

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/ja.lproj/Localizable.strings

This file was deleted.

12 changes: 0 additions & 12 deletions Sources/JetpackStatsWidgets/Resources/ko.lproj/Localizable.strings

This file was deleted.

Loading