From 42d9ddce5528eeae4d7518c8abd23334d405c693 Mon Sep 17 00:00:00 2001 From: michele-theleftbit Date: Wed, 13 May 2026 16:46:30 +0200 Subject: [PATCH 1/3] Add injectable localization hook for InterfaceKit strings --- .../BSWInterfaceKit/Extensions/Localizable.swift | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Sources/BSWInterfaceKit/Extensions/Localizable.swift b/Sources/BSWInterfaceKit/Extensions/Localizable.swift index 67d4d300..d3da3c25 100644 --- a/Sources/BSWInterfaceKit/Extensions/Localizable.swift +++ b/Sources/BSWInterfaceKit/Extensions/Localizable.swift @@ -3,6 +3,20 @@ import Foundation extension String { var localized: String { - return NSLocalizedString(self, bundle: Bundle.main, comment: "") + LocalizationService.localized(self) + } +} + +public enum LocalizationService { + /// Default localization hook used by InterfaceKit strings. + /// + /// On Apple platforms, looking up strings from `Bundle.main` works because the + /// host app owns the main bundle and ships its localized resources there. + /// Other runtimes do not necessarily have an equivalent app bundle lookup. + /// Android/Skip apps, in particular, should inject this closure from the host + /// app so strings are resolved through the app localization system, resources, + /// or any runtime translation provider. + public static nonisolated(unsafe) var localized: (String) -> String = { + NSLocalizedString($0, bundle: .main, comment: "") } } From 98055ab051e1f09d05288d6cf15fd47e2747b3d3 Mon Sep 17 00:00:00 2001 From: michele-theleftbit Date: Wed, 13 May 2026 16:57:29 +0200 Subject: [PATCH 2/3] update simulator --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 6e9cabd3..4f5b9923 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -11,7 +11,7 @@ jobs: with: lfs: true - name: Test BSWInterfaceKit iOS - run: set -o pipefail && xcodebuild -scheme BSWInterfaceKit -destination "platform=iOS Simulator,name=iPhone 17,OS=26.4.1" test | xcbeautify --renderer github-actions + run: set -o pipefail && xcodebuild -scheme BSWInterfaceKit -destination "platform=iOS Simulator,name=iPhone 17,OS=26.5" test | xcbeautify --renderer github-actions macos-build: runs-on: mobile From 716dcd2a766ba0cf4f697f9aaa2edb4fb3a0d947 Mon Sep 17 00:00:00 2001 From: Pierluigi Cifani Date: Wed, 13 May 2026 17:14:16 +0200 Subject: [PATCH 3/3] Apply suggestion from @piercifani --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 4f5b9923..3e8d6028 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -11,7 +11,7 @@ jobs: with: lfs: true - name: Test BSWInterfaceKit iOS - run: set -o pipefail && xcodebuild -scheme BSWInterfaceKit -destination "platform=iOS Simulator,name=iPhone 17,OS=26.5" test | xcbeautify --renderer github-actions + run: set -o pipefail && xcodebuild -scheme BSWInterfaceKit -destination "platform=iOS Simulator,name=iPhone 17,OS=latest" test | xcbeautify --renderer github-actions macos-build: runs-on: mobile