Skip to content

Commit c970372

Browse files
committed
G7SensorKitUI needs its own LocalizedString implementation
1 parent 49cc98c commit c970372

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

G7SensorKit.xcodeproj/project.pbxproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@
5050
C17F5149291EB6B600555EB5 /* LocalizedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17F5148291EB6B600555EB5 /* LocalizedString.swift */; };
5151
C17F514B291EB6F000555EB5 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17F514A291EB6F000555EB5 /* HKUnit.swift */; };
5252
C17F514D291EB79E00555EB5 /* AlgorithmError.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17F514C291EB79E00555EB5 /* AlgorithmError.swift */; };
53-
C17F514E291EB86100555EB5 /* LocalizedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17F5148291EB6B600555EB5 /* LocalizedString.swift */; };
5453
C17F514F291EB87600555EB5 /* G7SensorKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C17F50C6291EAC3800555EB5 /* G7SensorKit.framework */; };
5554
C17F5156291EBD8600555EB5 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17F5155291EBD8600555EB5 /* Image.swift */; };
5655
C17F5157291EBD9900555EB5 /* TimeInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17F513F291EB27D00555EB5 /* TimeInterval.swift */; };
5756
C19C9F4529C9115B00A6D3D0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C19C9F4729C9115B00A6D3D0 /* Localizable.strings */; };
5857
C19C9F4A29C9117500A6D3D0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C19C9F4C29C9117500A6D3D0 /* Localizable.strings */; };
58+
C19C9F4E29C91C4C00A6D3D0 /* LocalizedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19C9F4D29C91C4C00A6D3D0 /* LocalizedString.swift */; };
5959
C1E71720292D84FE00DA646F /* G7ProgressBarState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1E7171F292D84FE00DA646F /* G7ProgressBarState.swift */; };
6060
/* End PBXBuildFile section */
6161

@@ -173,7 +173,7 @@
173173
C19277AE29C916C200311AB7 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
174174
C19277AF29C916C200311AB7 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
175175
C19C9F4629C9115B00A6D3D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
176-
C19C9F4B29C9117500A6D3D0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
176+
C19C9F4D29C91C4C00A6D3D0 /* LocalizedString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedString.swift; sourceTree = "<group>"; };
177177
C1AEF8AF29C916CA001F6F41 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
178178
C1AEF8B029C916CA001F6F41 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
179179
C1B6638F29C916EC001556A8 /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -307,6 +307,7 @@
307307
C17F50FF291EAC9D00555EB5 /* G7CGMManager */,
308308
C17F50FA291EAC9100555EB5 /* G7SensorKitUI.h */,
309309
C17F5126291EAF2F00555EB5 /* OSLog.swift */,
310+
C19C9F4D29C91C4C00A6D3D0 /* LocalizedString.swift */,
310311
);
311312
path = G7SensorKitUI;
312313
sourceTree = "<group>";
@@ -495,6 +496,7 @@
495496
BuildIndependentTargetsInParallel = 1;
496497
LastSwiftUpdateCheck = 1410;
497498
LastUpgradeCheck = 1410;
499+
ORGANIZATIONNAME = "LoopKit Authors";
498500
TargetAttributes = {
499501
C17F50C5291EAC3800555EB5 = {
500502
CreatedOnToolsVersion = 14.1;
@@ -634,14 +636,14 @@
634636
files = (
635637
C17F5108291EAC9D00555EB5 /* G7SettingsView.swift in Sources */,
636638
C17F5157291EBD9900555EB5 /* TimeInterval.swift in Sources */,
639+
C19C9F4E29C91C4C00A6D3D0 /* LocalizedString.swift in Sources */,
637640
C17F5156291EBD8600555EB5 /* Image.swift in Sources */,
638641
C139829829295D7D0047DB5F /* HKUnit.swift in Sources */,
639642
C1409A07291EC21C006BE8D0 /* OSLog.swift in Sources */,
640643
C17F510A291EAC9D00555EB5 /* G7UICoordinator.swift in Sources */,
641644
C17F5109291EAC9D00555EB5 /* G7CGMManager+UI.swift in Sources */,
642645
C17F5107291EAC9D00555EB5 /* G7StartupView.swift in Sources */,
643646
C1E71720292D84FE00DA646F /* G7ProgressBarState.swift in Sources */,
644-
C17F514E291EB86100555EB5 /* LocalizedString.swift in Sources */,
645647
C17F5106291EAC9D00555EB5 /* G7SettingsViewModel.swift in Sources */,
646648
);
647649
runOnlyForDeploymentPostprocessing = 0;
@@ -712,7 +714,6 @@
712714
C19C9F4C29C9117500A6D3D0 /* Localizable.strings */ = {
713715
isa = PBXVariantGroup;
714716
children = (
715-
C19C9F4B29C9117500A6D3D0 /* en */,
716717
C14BF96629C916560055FA98 /* ar */,
717718
C1F6C1FB29C9166000C74579 /* cs */,
718719
C12E6F0829C9166900E6FDBE /* da */,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// LocalizedString.swift
3+
// G7SensorKitUI
4+
//
5+
// Created by Pete Schwamb on 3/20/23.
6+
//
7+
8+
import Foundation
9+
10+
internal class FrameworkBundle {
11+
static let main = Bundle(for: FrameworkBundle.self)
12+
}
13+
14+
func LocalizedString(_ key: String, tableName: String? = nil, value: String? = nil, comment: String) -> String {
15+
if let value = value {
16+
return NSLocalizedString(key, tableName: tableName, bundle: FrameworkBundle.main, value: value, comment: comment)
17+
} else {
18+
return NSLocalizedString(key, tableName: tableName, bundle: FrameworkBundle.main, comment: comment)
19+
}
20+
}

G7SensorKitUI/en.lproj/Localizable.strings

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

0 commit comments

Comments
 (0)