Просмотр исходного кода

Formatting of data table. And localization of "Manual"

Jon Mårtensson 2 лет назад
Родитель
Сommit
fbffdf9811

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

@@ -1112,7 +1112,7 @@ Enact a temp Basal or a temp target */
 "Error" = "Fel";
 
 /* Manual temp basal mode */
-"Manual" = "Manuellt";
+"Manual" = "Manuell";
 
 /* Status highlight when manual temp basal is running. */
 "Manual Basal" = "Manuell temporär basal";

+ 1 - 1
FreeAPS/Sources/Modules/DataTable/DataTableDataFlow.swift

@@ -137,7 +137,7 @@ enum DataTable {
             case .bolus:
                 return numberFormatter
                     .string(from: amount as NSNumber)! + NSLocalizedString(" U", comment: "Insulin unit") +
-                    "\(isSMB ?? false ? " SMB" : "")"
+                    ((isSMB ?? false) ? " 🤖" : " " + NSLocalizedString("Manual", comment: "Manual Bolus"))
             case .tempBasal:
                 return numberFormatter
                     .string(from: amount as NSNumber)! + NSLocalizedString(" U/hr", comment: "Unit insulin per hour")

+ 1 - 1
FreeAPS/Sources/Modules/DataTable/View/DataTableRootView.swift

@@ -113,7 +113,7 @@ extension DataTable {
                 Image(systemName: "circle.fill").foregroundColor(item.color)
                 Text(dateFormatter.string(from: item.date))
                     .moveDisabled(true)
-                Text((item.isSMB ?? false) ? "🤖" : item.type.name)
+                Text((item.isSMB ?? false) ? "SMB" : item.type.name)
                 Text(item.amountText).foregroundColor(.secondary)
 
                 if let duration = item.durationText {