Przeglądaj źródła

Localize Profiles

Jon Mårtensson 3 lat temu
rodzic
commit
f596e98690

+ 61 - 1
FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings

@@ -1186,8 +1186,68 @@ Enact a temp Basal or a temp target */
 /* */
 /* */
 "Disable SMBs" = "Disable SMBs";
 "Disable SMBs" = "Disable SMBs";
 
 
+/* Your normal Profile. Use a short string */
+"Normal Profile" = "Normal Profile";
+
+/* Custom but unsaved Profile */
+"Custom Profile" = "Custom Profile";
+
 /* */
 /* */
-"Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage.\n\nIf you toggle off the override every profile setting will return to normal." = "Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage.\n\nIf you toggle off the override every profile setting will return to normal.";
+"Profiles" = "Profiles";
+
+/* */
+"More options" = "More options";
+
+/* */
+"Schedule when SMBs are Off" = "Schedule when SMBs are Off";
+
+/* */
+"Change ISF and CR" = "Change ISF and CR";
+
+/* */
+"Change ISF" = "Change ISF";
+
+/* */
+"Change CR" = "Change CR";
+
+/* */
+"SMB Minutes" = "SMB Minutes";
+
+/* */
+"UAM SMB Minutes" = "UAM SMB Minutes";
+
+/* */
+"Start new Profile" = "Start new Profile";
+
+/* */
+"Save as Profile" = "Save as Profile";
+
+/* */
+"Return to Normal" = "Return to Normal";
+
+/* Alert */
+"Return to Normal?" = "Return to Normal?";
+
+/* */
+"This will change settings back to your normal profile" = "This will change settings back to your normal profile";
+
+/* Start Profile Alert */
+"Start Profile" = "Start Profile";
+
+/* */
+"Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage.\n\nIf you toggle off the override every profile setting will return to normal." = "Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage.";
+
+/* */
+"Starting this override will change your Profiles and/or your Target Glucose used for looping during the entire selected duration. Tapping ”Start Profile” will start your new profile or edit your current active profile." = "Starting this override will change your Profiles and/or your Target Glucose used for looping during the entire selected duration. Tapping ”Start Profile” will start your new profile or edit your current active profile.";
+
+/* Change Target glucose in profile settings */
+"Override Profile Target" = "Override Profile Target";
+
+/* Alert string. Keep spaces. */
+" SMBs are disabled either by schedule or during the entire duration." = " SMBs are disabled either by schedule or during the entire duration.";
+
+/* Alert strings. Keep spaces */
+" infinite duration." = " infinite duration.";
 
 
 /* Service Section */
 /* Service Section */
 "App Icons" = "App Icons";
 "App Icons" = "App Icons";

+ 62 - 1
FreeAPS/Sources/Localizations/Main/sv.lproj/Localizable.strings

@@ -1179,8 +1179,69 @@ Enact a temp Basal or a temp target */
 /* */
 /* */
 "Disable SMBs" = "Stäng av autobolusar (SMBs)";
 "Disable SMBs" = "Stäng av autobolusar (SMBs)";
 
 
+/* Your normal Profile. Use a short string */
+"Normal Profile" = "Normal Profil";
+
+/* Custom but unsaved Profile */
+"Custom Profile" = "Anpassad Profil";
+
+/* */
+"Profiles" = "Profiler";
+
+/* */
+"More options" = "Fler alternativ";
+
+/* */
+"Schedule when SMBs are Off" = "Schemalägg när autobolusar ska vara av ";
+
+/* */
+"Change ISF and CR" = "Ändra ISF and CR";
+
+/* */
+"Change ISF" = "Ändra ISF";
+
+/* */
+"Change CR" = "Ändra CR";
+
+/* */
+"SMB Minutes" = "SMB-minuter";
+
+/* */
+"UAM SMB Minutes" = "UAM-SMB-minuter";
+
+/* */
+"Start new Profile" = "Starta ny profil";
+
+/* */
+"Save as Profile" = "Spara som profil";
+
 /* */
 /* */
-"Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage.\n\nIf you toggle off the override every profile setting will return to normal." = "Din vanliga basal kommer att justeras procentuellt enligt ovan, medan din normala korrektionsfaktor och insulinkvot CR kommer att justeras omvänt.\n\nOm du stänger av undantaget kommer varje inställning att återgå till det normala.";
+"Return to Normal" = "Tillbaka till normal profil";
+
+/* Alert */
+"Return to Normal?" = "Tillbaka till normal profil?";
+
+/* */
+"This will change settings back to your normal profile" = "Detta kommer att ändra tillbaka till dina normala inställningar ";
+
+/* Start Profile Alert */
+"Start Profile" = "Starta profil";
+
+
+/* */
+"Your profile basal insulin will be adjusted with the override percentage and your profile ISF and CR will be inversly adjusted with the percentage." = "Din vanliga basal kommer att justeras procentuellt enligt ovan, medan din normala korrektionsfaktor och insulinkvot CR kommer att justeras omvänt.";
+
+/* */
+"Starting this override will change your Profiles and/or your Target Glucose used for looping during the entire selected duration. Tapping ”Start Profile” will start your new profile or edit your current active profile." = "Om du klickar 'Starta profil' kommer detta att tillfälligt att ändra dina normala inställningar för under hela perioden som du valt";
+
+/* Change Target glucose in profile settings */
+"Override Profile Target" = "Ändra målvärde";
+
+/* Alert string. Keep spaces. */
+" SMBs are disabled either by schedule or during the entire duration." = " Autobolusar är helt eller delvis av.";
+
+/* Alert strings. Keep spaces */
+" infinite duration." = " aktiv tillsvidare.";
 
 
 /* Service Section */
 /* Service Section */
 "App Icons" = "Ikoner";
 "App Icons" = "Ikoner";

+ 15 - 4
FreeAPS/Sources/Modules/OverrideProfilesConfig/View/OverrideProfilesRootView.swift

@@ -193,17 +193,28 @@ extension OverrideProfilesConfig {
                                                 .formatted(.number.grouping(.never).rounded().precision(.fractionLength(0))) +
                                                 .formatted(.number.grouping(.never).rounded().precision(.fractionLength(0))) +
                                                 " min."
                                                 " min."
                                         ) :
                                         ) :
-                                        " infinite duration."
+                                        NSLocalizedString(" infinite duration.", comment: "")
                                 ) +
                                 ) +
                                 (
                                 (
                                     (state.target == 0 || !state.override_target) ? "" :
                                     (state.target == 0 || !state.override_target) ? "" :
                                         (" Target: " + state.target.formatted() + " " + state.units.rawValue + ".")
                                         (" Target: " + state.target.formatted() + " " + state.units.rawValue + ".")
                                 )
                                 )
-                                + (state.smbIsOff ? " SMBs are disabled." : "")
+                                +
+                                (
+                                    state
+                                        .smbIsOff ?
+                                        NSLocalizedString(
+                                            " SMBs are disabled either by schedule or during the entire duration.",
+                                            comment: ""
+                                        ) : ""
+                                )
                                 +
                                 +
                                 "\n\n"
                                 "\n\n"
                                 +
                                 +
-                                "Starting this override will change your Profiles and/or your Target Glucose used for looping during the entire selected duration. Tapping ”Start” will start your new overide or edit your current active override."
+                                NSLocalizedString(
+                                    "Starting this override will change your Profiles and/or your Target Glucose used for looping during the entire selected duration. Tapping ”Start Profile” will start your new profile or edit your current active profile.",
+                                    comment: ""
+                                )
                         }
                         }
                         .disabled(
                         .disabled(
                             (state.percentage == 100 && !state.override_target && !state.smbIsOff) ||
                             (state.percentage == 100 && !state.override_target && !state.smbIsOff) ||
@@ -218,7 +229,7 @@ extension OverrideProfilesConfig {
                             isPresented: $showAlert,
                             isPresented: $showAlert,
                             actions: {
                             actions: {
                                 Button("Cancel", role: .cancel) { state.isEnabled = false }
                                 Button("Cancel", role: .cancel) { state.isEnabled = false }
-                                Button("Start Override", role: .destructive) {
+                                Button("Start Profile", role: .destructive) {
                                     if state._indefinite { state.duration = 0 }
                                     if state._indefinite { state.duration = 0 }
                                     state.isEnabled.toggle()
                                     state.isEnabled.toggle()
                                     state.saveSettings()
                                     state.saveSettings()