Use localisable strings in verified modal

This commit is contained in:
David Godfrey 2022-11-12 02:40:19 +00:00
parent b0a0aa268f
commit 72873fbfc1
5 changed files with 17 additions and 3 deletions

View File

@ -51,6 +51,10 @@
"clean_cache": {
"title": "Clean Cache",
"message": "Successfully cleaned %s cache."
},
"verified": {
"title": "Verified",
"message": "Ownership of this link was checked on %s"
}
},
"controls": {

View File

@ -74,7 +74,7 @@ extension ProfileFieldSection {
let formatter = DateFormatter()
formatter.dateStyle = .medium
formatter.timeStyle = .short
cell.checkmark.accessibilityLabel = "Ownership of this link was checked on \(formatter.string(from: verifiedAt))" // TODO: I18N / L10N
cell.checkmark.accessibilityLabel = L10n.Common.Alerts.Verified.message(formatter.string(from: verifiedAt))
}
cell.delegate = configuration.profileFieldCollectionViewCellDelegate

View File

@ -863,7 +863,7 @@ extension ProfileViewController: ProfileAboutViewControllerDelegate {
let formatter = DateFormatter()
formatter.dateStyle = .medium
formatter.timeStyle = .short
let alert = UIAlertController(title: "Verified", message: "Ownership of this link was checked on \(formatter.string(from: verifiedAt))", preferredStyle: .alert) // TODO: I18N / L10N
let alert = UIAlertController(title: L10n.Common.Alerts.Verified.title, message: L10n.Common.Alerts.Verified.message(formatter.string(from: verifiedAt)), preferredStyle: .alert)
alert.addAction(UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .default) { _ in
alert.dismiss(animated: true)
})

View File

@ -87,6 +87,14 @@ public enum L10n {
/// Sign Up Failure
public static let title = L10n.tr("Localizable", "Common.Alerts.SignUpFailure.Title")
}
public enum Verified {
/// Ownership of this link was checked on %s
public static func message(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "Common.Alerts.Verified.Message", p1)
}
/// Verified
public static let title = L10n.tr("Localizable", "Common.Alerts.Verified.Title")
}
public enum VoteFailure {
/// The poll has ended
public static let pollEnded = L10n.tr("Localizable", "Common.Alerts.VoteFailure.PollEnded")

View File

@ -22,6 +22,8 @@ Please check your internet connection.";
"Common.Alerts.SignOut.Message" = "Are you sure you want to sign out?";
"Common.Alerts.SignOut.Title" = "Sign Out";
"Common.Alerts.SignUpFailure.Title" = "Sign Up Failure";
"Common.Alerts.Verified.Title" = "Verified";
"Common.Alerts.Verified.Message" = "Ownership of this link was checked on %s";
"Common.Alerts.VoteFailure.PollEnded" = "The poll has ended";
"Common.Alerts.VoteFailure.Title" = "Vote Failure";
"Common.Controls.Actions.Add" = "Add";
@ -448,4 +450,4 @@ uploaded to Mastodon.";
back in your hands.";
"Scene.Wizard.AccessibilityHint" = "Double tap to dismiss this wizard";
"Scene.Wizard.MultipleAccountSwitchIntroDescription" = "Switch between multiple accounts by holding the profile button.";
"Scene.Wizard.NewInMastodon" = "New in Mastodon";
"Scene.Wizard.NewInMastodon" = "New in Mastodon";