Parcourir la source

String interpolation to make SwiftUI localize the string.
Insulin required and insulin recommended.

(cherry picked from commit f24432f2c20d740664f24660170e480901bc0312)

Jon Mårtensson il y a 5 ans
Parent
commit
cf19049838
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      FreeAPS/Sources/Modules/Bolus/View/BolusRootView.swift

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

@@ -25,7 +25,7 @@ extension Bolus {
                         HStack {
                             Text("Insulin required").foregroundColor(.secondary)
                             Spacer()
-                            Text(formatter.string(from: viewModel.inslinRequired as NSNumber)! + " U").foregroundColor(.secondary)
+                            Text("\(formatter.string(from: viewModel.inslinRequired as NSNumber)!) U").foregroundColor(.secondary)
                         }.contentShape(Rectangle())
                             .onTapGesture {
                                 viewModel.amount = viewModel.inslinRecommended
@@ -33,7 +33,7 @@ extension Bolus {
                         HStack {
                             Text("Insulin recommended")
                             Spacer()
-                            Text(formatter.string(from: viewModel.inslinRecommended as NSNumber)! + " U")
+                            Text("\(formatter.string(from: viewModel.inslinRecommended as NSNumber)!) U")
                         }.contentShape(Rectangle())
                             .onTapGesture {
                                 viewModel.amount = viewModel.inslinRecommended