fix: move message to title

This commit is contained in:
sunxiaojian 2021-05-10 15:40:46 +08:00
parent 04eeb0100e
commit 505c251b37
4 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,7 @@
"confirm": "Sign Out" "confirm": "Sign Out"
}, },
"block_domain": { "block_domain": {
"message": "Are you really, really sure you want to block the entire %s? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.", "title": "Are you really, really sure you want to block the entire %s? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.",
"block_entire_domain": "Block entire domain" "block_entire_domain": "Block entire domain"
}, },
"save_photo_failure": { "save_photo_failure": {
@ -37,7 +37,7 @@
"message": "Please enable photo libaray access permission to save photo." "message": "Please enable photo libaray access permission to save photo."
}, },
"delete_post": { "delete_post": {
"message": "Are you sure you want to delete this post?", "title": "Are you sure you want to delete this post?",
"delete": "Delete" "delete": "Delete"
} }
}, },

View File

@ -17,8 +17,8 @@ internal enum L10n {
/// Block entire domain /// Block entire domain
internal static let blockEntireDomain = L10n.tr("Localizable", "Common.Alerts.BlockDomain.BlockEntireDomain") internal static let blockEntireDomain = L10n.tr("Localizable", "Common.Alerts.BlockDomain.BlockEntireDomain")
/// Are you really, really sure you want to block the entire %@? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed. /// Are you really, really sure you want to block the entire %@? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.
internal static func message(_ p1: Any) -> String { internal static func title(_ p1: Any) -> String {
return L10n.tr("Localizable", "Common.Alerts.BlockDomain.Message", String(describing: p1)) return L10n.tr("Localizable", "Common.Alerts.BlockDomain.Title", String(describing: p1))
} }
} }
internal enum Common { internal enum Common {
@ -31,7 +31,7 @@ internal enum L10n {
/// Delete /// Delete
internal static let delete = L10n.tr("Localizable", "Common.Alerts.DeletePost.Delete") internal static let delete = L10n.tr("Localizable", "Common.Alerts.DeletePost.Delete")
/// Are you sure you want to delete this post? /// Are you sure you want to delete this post?
internal static let message = L10n.tr("Localizable", "Common.Alerts.DeletePost.Message") internal static let title = L10n.tr("Localizable", "Common.Alerts.DeletePost.Title")
} }
internal enum DiscardPostContent { internal enum DiscardPostContent {
/// Confirm discard composed post content. /// Confirm discard composed post content.

View File

@ -252,7 +252,7 @@ extension UserProviderFacade {
} else { } else {
let blockDomainAction = UIAction(title: L10n.Common.Controls.Actions.blockDomain(mastodonUser.domainFromAcct), image: UIImage(systemName: "nosign"), identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off) { [weak provider] _ in let blockDomainAction = UIAction(title: L10n.Common.Controls.Actions.blockDomain(mastodonUser.domainFromAcct), image: UIImage(systemName: "nosign"), identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off) { [weak provider] _ in
guard let provider = provider else { return } guard let provider = provider else { return }
let alertController = UIAlertController(title: "", message: L10n.Common.Alerts.BlockDomain.message(mastodonUser.domainFromAcct), preferredStyle: .alert) let alertController = UIAlertController(title: L10n.Common.Alerts.BlockDomain.title(mastodonUser.domainFromAcct), message: nil, preferredStyle: .alert)
let cancelAction = UIAlertAction(title: L10n.Common.Controls.Actions.cancel, style: .default) { _ in let cancelAction = UIAlertAction(title: L10n.Common.Controls.Actions.cancel, style: .default) { _ in
} }
alertController.addAction(cancelAction) alertController.addAction(cancelAction)
@ -305,7 +305,7 @@ extension UserProviderFacade {
[weak provider] _ in [weak provider] _ in
guard let provider = provider else { return } guard let provider = provider else { return }
let alertController = UIAlertController(title: "", message: L10n.Common.Alerts.DeletePost.message, preferredStyle: .alert) let alertController = UIAlertController(title: L10n.Common.Alerts.DeletePost.title, message: nil, preferredStyle: .alert)
let cancelAction = UIAlertAction(title: L10n.Common.Controls.Actions.cancel, style: .default) { _ in let cancelAction = UIAlertAction(title: L10n.Common.Controls.Actions.cancel, style: .default) { _ in
} }
alertController.addAction(cancelAction) alertController.addAction(cancelAction)

View File

@ -1,9 +1,9 @@
"Common.Alerts.BlockDomain.BlockEntireDomain" = "Block entire domain"; "Common.Alerts.BlockDomain.BlockEntireDomain" = "Block entire domain";
"Common.Alerts.BlockDomain.Message" = "Are you really, really sure you want to block the entire %@? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed."; "Common.Alerts.BlockDomain.Title" = "Are you really, really sure you want to block the entire %@? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.";
"Common.Alerts.Common.PleaseTryAgain" = "Please try again."; "Common.Alerts.Common.PleaseTryAgain" = "Please try again.";
"Common.Alerts.Common.PleaseTryAgainLater" = "Please try again later."; "Common.Alerts.Common.PleaseTryAgainLater" = "Please try again later.";
"Common.Alerts.DeletePost.Delete" = "Delete"; "Common.Alerts.DeletePost.Delete" = "Delete";
"Common.Alerts.DeletePost.Message" = "Are you sure you want to delete this post?"; "Common.Alerts.DeletePost.Title" = "Are you sure you want to delete this post?";
"Common.Alerts.DiscardPostContent.Message" = "Confirm discard composed post content."; "Common.Alerts.DiscardPostContent.Message" = "Confirm discard composed post content.";
"Common.Alerts.DiscardPostContent.Title" = "Discard Publish"; "Common.Alerts.DiscardPostContent.Title" = "Discard Publish";
"Common.Alerts.PublishPostFailure.Message" = "Failed to publish the post. "Common.Alerts.PublishPostFailure.Message" = "Failed to publish the post.