Ver código fonte

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

Jon Mårtensson 4 anos atrás
pai
commit
09cffd63f3

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

@@ -77,11 +77,12 @@ enum DataTable {
 
             switch type {
             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:
-                return numberFormater.string(from: amount as NSNumber)! + " U"
+                return numberFormater.string(from: amount as NSNumber)! + NSLocalizedString(" U", comment: "Insulin unit")
             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:
                 var converted = amount
                 if units == .mmolL {