Browse Source

" g", " U", " U/hr" will now be localized.

Jon Mårtensson 5 years ago
parent
commit
09cffd63f3
1 changed files with 4 additions and 3 deletions
  1. 4 3
      FreeAPS/Sources/Modules/DataTable/DataTableDataFlow.swift

+ 4 - 3
FreeAPS/Sources/Modules/DataTable/DataTableDataFlow.swift

@@ -77,11 +77,12 @@ enum DataTable {
 
 
             switch type {
             switch type {
             case .carbs:
             case .carbs:
-                return numberFormater.string(from: amount as NSNumber)! + " g"
+                return numberFormater.string(from: amount as NSNumber)! + NSLocalizedString(" g", comment: "gram of carbs")
             case .bolus:
             case .bolus:
-                return numberFormater.string(from: amount as NSNumber)! + " U"
+                return numberFormater.string(from: amount as NSNumber)! + NSLocalizedString(" U", comment: "Insulin unit")
             case .tempBasal:
             case .tempBasal:
-                return numberFormater.string(from: amount as NSNumber)! + " U/hr"
+                return numberFormater
+                    .string(from: amount as NSNumber)! + NSLocalizedString(" U/hr", comment: "Unit insulin per hour")
             case .tempTarget:
             case .tempTarget:
                 var converted = amount
                 var converted = amount
                 if units == .mmolL {
                 if units == .mmolL {