Преглед изворни кода

Localize the Garmin and Watch configuration

Jon Mårtensson пре 3 година
родитељ
комит
6d7ba80a15

+ 36 - 0
FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings

@@ -398,6 +398,42 @@ Enact a temp Basal or a temp target */
 /*  */
 "Pump" = "Pump";
 
+/* */
+"Watch" = "Watch";
+
+/* */
+"Watch Configuration" = "Watch Configuration";
+
+/* */
+"Apple Watch" = "Apple Watch";
+
+/* */
+"Display on Watch" = "Display on Watch";
+
+/* */
+"Garmin Watch" = "Garmin Watch";
+
+/* */
+"Add devices" = "Add devices";
+
+/* */
+"Glucose Target" = "Glucose Target";
+
+/* */
+"Heart Rate" = "Heart Rate";
+
+/* */
+"Steps" = "Steps";
+
+/* */
+"ISF" = "ISF";
+
+/* */
+"The app Garmin Connect must be installed to use for iAPS.\n Go to App Store to download it" = "The app Garmin Connect must be installed to use for iAPS.\n Go to App Store to download it";
+
+/* */
+"Garmin is not available" = "Garmin is not available";
+
 /*  */
 "Services" = "Services";
 

+ 36 - 0
FreeAPS/Sources/Localizations/Main/sv.lproj/Localizable.strings

@@ -398,6 +398,42 @@ Enact a temp Basal or a temp target */
 /*  */
 "Pump" = "Pump";
 
+/* */
+"Watch" = "Klocka";
+
+/* */
+"Watch Configuration" = "Inställningar för klocka";
+
+/* */
+"Apple Watch" = "Apple Watch";
+
+/* */
+"Display on Watch" = "Visa på klocka";
+
+/* */
+"Garmin Watch" = "Garmin Watch";
+
+/* */
+"Add devices" = "Lägg till enhet";
+
+/* */
+"Glucose Target" = "Målvärde för glukos";
+
+/* */
+"Heart Rate" = "Puls";
+
+/* */
+"Steps" = "Steg";
+
+/* */
+"ISF" = "ISF";
+
+/* */
+"The app Garmin Connect must be installed to use for iAPS.\n Go to App Store to download it" = "Appen 'Garmin Connect' måste  vara installerad för att kunna användas med iAPS.\n Gå till App Store för att ladda ner";
+
+/* */
+"Garmin is not available" = "Garmin är inte tillgänglig";
+
 /*  */
 "Services" = "Tjänster";
 

+ 1 - 1
FreeAPS/Sources/Modules/Settings/View/SettingsRootView.swift

@@ -21,7 +21,7 @@ extension Settings {
                 Section(header: Text("Devices")) {
                     Text("Pump").navigationLink(to: .pumpConfig, from: self)
                     Text("CGM").navigationLink(to: .cgm, from: self)
-                    Text("Watch Devices").navigationLink(to: .watch, from: self)
+                    Text("Watch").navigationLink(to: .watch, from: self)
                 }
 
                 Section(header: Text("Services")) {

+ 4 - 4
FreeAPS/Sources/Modules/WatchConfig/WatchConfigStateModel.swift

@@ -11,13 +11,13 @@ enum AwConfig: String, JSON, CaseIterable, Identifiable, Codable {
     var displayName: String {
         switch self {
         case .BGTarget:
-            return "Glucose Target"
+            return NSLocalizedString("Glucose Target", comment: "")
         case .HR:
-            return "Heart Rate"
+            return NSLocalizedString("Heart Rate", comment: "")
         case .steps:
-            return "Steps"
+            return NSLocalizedString("Steps", comment: "")
         case .isf:
-            return "ISF"
+            return NSLocalizedString("ISF", comment: "")
         }
     }
 }

+ 5 - 2
FreeAPS/Sources/Services/WatchManager/GarminManager.swift

@@ -154,9 +154,12 @@ final class BaseGarminManager: NSObject, GarminManager, Injectable {
 
 extension BaseGarminManager: IQUIOverrideDelegate {
     func needsToInstallConnectMobile() {
-        debug(.apsManager, "Garmin is not available")
+        debug(.apsManager, NSLocalizedString("Garmin is not available", comment: ""))
         let messageCont = MessageContent(
-            content: "The app Garmin Connect must be installed to use for iAPS.\n Go to App Store to download it",
+            content: NSLocalizedString(
+                "The app Garmin Connect must be installed to use for iAPS.\n Go to App Store to download it",
+                comment: ""
+            ),
             type: .warning
         )
         router.alertMessage.send(messageCont)