Localize strings in code

This commit is contained in:
Danny Moesch 2019-01-14 20:57:45 +01:00 committed by Mingshen Sun
parent 2d5ca58bd9
commit 1b4040135e
36 changed files with 626 additions and 334 deletions

View file

@ -175,9 +175,9 @@ public class Password {
if case let .timer(period) = otpToken!.generator.factor {
let timeSinceEpoch = Date().timeIntervalSince1970
let validTime = Int(period - timeSinceEpoch.truncatingRemainder(dividingBy: period))
description += " (expires in \(validTime)s)"
description += " " + "ExpiresIn".localize(validTime)
}
return (description, otpToken!.currentPassword ?? "error")
return (description, otpToken!.currentPassword ?? "Error".localize())
}
// return the password strings