Browse Source

" U" in amount of insulin added without bolusing will now be localized

Jon Mårtensson 5 years ago
parent
commit
eeec50fc43
1 changed files with 2 additions and 1 deletions
  1. 2 1
      FreeAPS/Sources/Modules/Bolus/View/BolusRootView.swift

+ 2 - 1
FreeAPS/Sources/Modules/Bolus/View/BolusRootView.swift

@@ -76,7 +76,8 @@ extension Bolus {
                 }
                 }
             }
             }
             .alert(isPresented: $isAddInsulinAlertPresented) {
             .alert(isPresented: $isAddInsulinAlertPresented) {
-                let amount = formatter.string(from: viewModel.amount as NSNumber)! + " U"
+                let amount = formatter
+                    .string(from: viewModel.amount as NSNumber)! + NSLocalizedString(" U", comment: "Insulin unit")
                 return Alert(
                 return Alert(
                     title: Text("Are your sure?"),
                     title: Text("Are your sure?"),
                     message: Text("Add \(amount) without bolusing"),
                     message: Text("Add \(amount) without bolusing"),