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

Missing source string. More formatting

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

+ 3 - 0
FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings

@@ -49,6 +49,9 @@
 /* Headline in suggested pop up (at: at what time) */
 "Suggested at" = "Suggested at";
 
+/* Headline in enacted pop up (at: at what time) */
+"Error at" = "Error at";
+
 /* Home title */
 "Home" = "Home";
 

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

@@ -49,6 +49,9 @@
 /* Headline in suggested pop up (at: at what time) */
 "Suggested at" = "Föreslaget klockan";
 
+/* Headline in enacted pop up (at: at what time) */
+"Error at" = "Fel klockan";
+
 /* Home title */
 "Home" = "Hem";
 

+ 4 - 10
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -438,16 +438,10 @@ extension Home {
                     }
 
                     Text(
-                        NSLocalizedString("All", comment: "")
-                    ).font(.caption2).foregroundColor(.secondary)
+                        "\(NSLocalizedString("All", comment: "")) \(targetFormatter.string(from: (state.statistics?.GlucoseStorage_Days ?? 0) as NSNumber) ?? "") \(NSLocalizedString("days", comment: ""))"
+                    )
+                    .font(.caption2).foregroundColor(.secondary)
 
-                    Text(
-                        targetFormatter
-                            .string(from: (state.statistics?.GlucoseStorage_Days ?? 0) as NSNumber) ?? ""
-                    ).font(.caption2).foregroundColor(.secondary)
-                    Text(
-                        NSLocalizedString("days", comment: "")
-                    ).font(.caption2).foregroundColor(.secondary)
                     Text(hba1c_all).font(.system(size: 12))
                 }
             }
@@ -673,7 +667,7 @@ extension Home {
                 }
 
                 if let errorMessage = state.errorMessage, let date = state.errorDate {
-                    Text("Error at \(dateFormatter.string(from: date))")
+                    Text(NSLocalizedString("Error at", comment: "") + dateFormatter.string(from: date))
                         .foregroundColor(.white)
                         .font(.headline)
                         .padding(.bottom, 4)