Commit 45cb5a87 authored by Jose Blaya's avatar Jose Blaya Committed by Tommie Podzemski
Browse files

Handle scenario when the plan has expired.

parent 34873a54
......@@ -273,7 +273,11 @@ class AccountViewController: AutolayoutViewController {
textPassword.text = currentUser?.credentials.password
if let userInfo = currentUser?.info {
labelExpiryInformation.text = L10n.Account.ExpiryDate.information(userInfo.humanReadableExpirationDate())
if userInfo.isExpired {
labelExpiryInformation.text = L10n.Account.ExpiryDate.expired
} else {
labelExpiryInformation.text = L10n.Account.ExpiryDate.information(userInfo.humanReadableExpirationDate())
}
styleExpirationDate()
}
......
......@@ -62,6 +62,7 @@ internal enum L10n {
internal static func information(_ p1: String) -> String {
return L10n.tr("Localizable", "account.expiry.date.information", p1)
}
internal static let expired = L10n.tr("Localizable", "account.expiry.date.expired")
}
internal enum Password {
......
......@@ -89,7 +89,8 @@
"account.accessibility.eye" = "Eye icon";
"account.accessibility.eye.hint.reveal" = "Tap to reveal password";
"account.accessibility.eye.hint.conceal" = "Tap to conceal password";
"account.expiry.date.information" = "Your plan will expire on %@";
"account.expiry.date.information" = "Your plan will expire on %@.";
"account.expiry.date.expired" = "Your plan has expired.";
// SETTINGS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment