From 2ca48610c9bd3116679382583eb8d944ebd41a4a Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Tue, 15 Sep 2026 22:19:04 +1000 Subject: [PATCH] Add string catalog scaffolding for UI targets Empty Localizable.xcstrings per UI package and for the app target, defaultLocalization on the package, en-GB as a known region, and the test plans pinned to en so hosted tests never follow the runner's language. Co-Authored-By: Claude Opus 5 --- Brew-UI.xctestplan | 2 ++ Brew-Unit.xctestplan | 2 ++ Homebrew.xcodeproj/project.pbxproj | 1 + Homebrew/Localizable.xcstrings | 7 ++++++ Package.swift | 22 ++++++++++++++++++- .../Resources/Localizable.xcstrings | 7 ++++++ .../Resources/Localizable.xcstrings | 7 ++++++ .../Resources/Localizable.xcstrings | 7 ++++++ .../Resources/Localizable.xcstrings | 7 ++++++ .../Resources/Localizable.xcstrings | 7 ++++++ .../Resources/Localizable.xcstrings | 7 ++++++ .../Resources/Localizable.xcstrings | 7 ++++++ 12 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 Homebrew/Localizable.xcstrings create mode 100644 Sources/BrewFeatureConfig/Resources/Localizable.xcstrings create mode 100644 Sources/BrewFeatureConsole/Resources/Localizable.xcstrings create mode 100644 Sources/BrewFeatureDiscover/Resources/Localizable.xcstrings create mode 100644 Sources/BrewFeatureDoctor/Resources/Localizable.xcstrings create mode 100644 Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings create mode 100644 Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings create mode 100644 Sources/BrewUIComponents/Resources/Localizable.xcstrings diff --git a/Brew-UI.xctestplan b/Brew-UI.xctestplan index ae97f27..e140f47 100644 --- a/Brew-UI.xctestplan +++ b/Brew-UI.xctestplan @@ -9,6 +9,8 @@ } ], "defaultOptions" : { + "language" : "en", + "region" : "US", "screenshotDestination" : "testRunnerAndAttachments", "testExecutionOrdering" : "random", "testTimeoutsEnabled" : true, diff --git a/Brew-Unit.xctestplan b/Brew-Unit.xctestplan index 48e0b8b..b6d6ba3 100644 --- a/Brew-Unit.xctestplan +++ b/Brew-Unit.xctestplan @@ -9,6 +9,8 @@ } ], "defaultOptions" : { + "language" : "en", + "region" : "US", "testTimeoutsEnabled" : true }, "testTargets" : [ diff --git a/Homebrew.xcodeproj/project.pbxproj b/Homebrew.xcodeproj/project.pbxproj index f89b863..3661f92 100644 --- a/Homebrew.xcodeproj/project.pbxproj +++ b/Homebrew.xcodeproj/project.pbxproj @@ -344,6 +344,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + "en-GB", Base, ); mainGroup = EEC39EB62F5AB4B900269514; diff --git a/Homebrew/Localizable.xcstrings b/Homebrew/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Homebrew/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +} diff --git a/Package.swift b/Package.swift index 5ce0c76..075142e 100644 --- a/Package.swift +++ b/Package.swift @@ -3,6 +3,7 @@ import PackageDescription let package = Package( name: "BrewKit", + defaultLocalization: "en", platforms: [ .macOS("26.0"), ], @@ -86,9 +87,10 @@ let package = Package( ), .target( name: "BrewUIComponents", - dependencies: ["BrewAccessibilityID", "BrewCore"], + dependencies: ["BrewAccessibilityID", "BrewCore", "BrewRepositoryInterfaces"], resources: [ .process("Resources/Media.xcassets"), + .process("Resources/Localizable.xcstrings"), ], swiftSettings: [ .defaultIsolation(MainActor.self), @@ -170,6 +172,9 @@ let package = Package( "BrewRepositoryInterfaces", "BrewAppEnvironment", ], + resources: [ + .process("Resources/Localizable.xcstrings"), + ], swiftSettings: [ .defaultIsolation(MainActor.self), .swiftLanguageMode(.v6), @@ -183,6 +188,9 @@ let package = Package( "BrewUIComponents", "BrewRepositoryInterfaces", ], + resources: [ + .process("Resources/Localizable.xcstrings"), + ], swiftSettings: [ .defaultIsolation(MainActor.self), .swiftLanguageMode(.v6), @@ -197,6 +205,9 @@ let package = Package( "BrewRepositoryInterfaces", "BrewAppEnvironment", ], + resources: [ + .process("Resources/Localizable.xcstrings"), + ], swiftSettings: [ .defaultIsolation(MainActor.self), .swiftLanguageMode(.v6), @@ -211,6 +222,9 @@ let package = Package( "BrewRepositoryInterfaces", "BrewAppEnvironment", ], + resources: [ + .process("Resources/Localizable.xcstrings"), + ], swiftSettings: [ .defaultIsolation(MainActor.self), .swiftLanguageMode(.v6), @@ -225,6 +239,9 @@ let package = Package( "BrewRepositoryInterfaces", "BrewAppEnvironment", ], + resources: [ + .process("Resources/Localizable.xcstrings"), + ], swiftSettings: [ .defaultIsolation(MainActor.self), .swiftLanguageMode(.v6), @@ -239,6 +256,9 @@ let package = Package( "BrewRepositoryInterfaces", "BrewAppEnvironment", ], + resources: [ + .process("Resources/Localizable.xcstrings"), + ], swiftSettings: [ .defaultIsolation(MainActor.self), .swiftLanguageMode(.v6), diff --git a/Sources/BrewFeatureConfig/Resources/Localizable.xcstrings b/Sources/BrewFeatureConfig/Resources/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Sources/BrewFeatureConfig/Resources/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +} diff --git a/Sources/BrewFeatureConsole/Resources/Localizable.xcstrings b/Sources/BrewFeatureConsole/Resources/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Sources/BrewFeatureConsole/Resources/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +} diff --git a/Sources/BrewFeatureDiscover/Resources/Localizable.xcstrings b/Sources/BrewFeatureDiscover/Resources/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Sources/BrewFeatureDiscover/Resources/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +} diff --git a/Sources/BrewFeatureDoctor/Resources/Localizable.xcstrings b/Sources/BrewFeatureDoctor/Resources/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Sources/BrewFeatureDoctor/Resources/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +} diff --git a/Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings b/Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +} diff --git a/Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings b/Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Sources/BrewFeatureSelfUpgrade/Resources/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +} diff --git a/Sources/BrewUIComponents/Resources/Localizable.xcstrings b/Sources/BrewUIComponents/Resources/Localizable.xcstrings new file mode 100644 index 0000000..d1fe347 --- /dev/null +++ b/Sources/BrewUIComponents/Resources/Localizable.xcstrings @@ -0,0 +1,7 @@ +{ + "sourceLanguage" : "en", + "strings" : { + + }, + "version" : "1.0" +}