Explorar el Código

fix plurals string handling in Utils class

cyberta hace 6 años
padre
commit
7be7bcfe35
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      deltachat-ios/Helper/Utils.swift

+ 2 - 4
deltachat-ios/Helper/Utils.swift

@@ -165,12 +165,10 @@ class DateUtils {
             return String.localized("now")	// under one minute
         } else if seconds < 3600 {
             let mins = seconds / 60
-            let minTitle = mins > 1 ? "mins" : "min"
-            return "\(mins) \(minTitle)"
+            return String.localized(stringID: "n_minutes", count: mins);
         } else if seconds < 86400 {
             let hours = seconds / 3600
-            let hoursTitle = hours > 1 ? "hours" : "hour"
-            return "\(hours) \(hoursTitle)"
+            return String.localized(stringID: "n_hours", count: hours);
         } else {
             let date = Date(timeIntervalSince1970: Double(timeStamp))
             let dateFormatter = DateFormatter()