mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Simplify strings
This commit is contained in:
parent
ad4e699ce1
commit
6e7541f208
3 changed files with 16 additions and 30 deletions
|
@ -1,19 +1,19 @@
|
|||
// Copyright © 2020 Metabolist. All rights reserved.
|
||||
|
||||
"account.block-account" = "Block %@";
|
||||
"account.block" = "Block";
|
||||
"account.field.verified" = "Verified %@";
|
||||
"account.follow" = "Follow";
|
||||
"account.following" = "Following";
|
||||
"account.hide-reblogs-account" = "Hide reblogs from %@";
|
||||
"account.mute-account" = "Mute %@";
|
||||
"account.hide-reblogs" = "Hide boosts";
|
||||
"account.mute" = "Mute";
|
||||
"account.request" = "Request";
|
||||
"account.statuses" = "Posts";
|
||||
"account.statuses-and-replies" = "Posts & Replies";
|
||||
"account.media" = "Media";
|
||||
"account.show-reblogs-account" = "Show reblogs from %@";
|
||||
"account.unblock-account" = "Unblock %@";
|
||||
"account.unfollow-account" = "Unfollow %@";
|
||||
"account.unmute-account" = "Unmute %@";
|
||||
"account.show-reblogs" = "Show boosts";
|
||||
"account.unblock" = "Unblock";
|
||||
"account.unfollow" = "Unfollow";
|
||||
"account.unmute" = "Unmute";
|
||||
"add" = "Add";
|
||||
"apns-default-message" = "New notification";
|
||||
"add-identity.instance-url" = "Instance URL";
|
||||
|
|
|
@ -66,24 +66,19 @@ final class ProfileViewController: TableViewController {
|
|||
}
|
||||
|
||||
private extension ProfileViewController {
|
||||
// swiftlint:disable:next function_body_length
|
||||
func menu(accountViewModel: AccountViewModel, relationship: Relationship) -> UIMenu {
|
||||
var actions = [UIAction]()
|
||||
|
||||
if relationship.following {
|
||||
if relationship.showingReblogs {
|
||||
actions.append(UIAction(
|
||||
title: String.localizedStringWithFormat(
|
||||
NSLocalizedString("account.hide-reblogs-account", comment: ""),
|
||||
accountViewModel.accountName),
|
||||
title: NSLocalizedString("account.hide-reblogs", comment: ""),
|
||||
image: UIImage(systemName: "arrow.2.squarepath")) { _ in
|
||||
accountViewModel.hideReblogs()
|
||||
})
|
||||
} else {
|
||||
actions.append(UIAction(
|
||||
title: String.localizedStringWithFormat(
|
||||
NSLocalizedString("account.show-reblogs-account", comment: ""),
|
||||
accountViewModel.accountName),
|
||||
title: NSLocalizedString("account.show-reblogs", comment: ""),
|
||||
image: UIImage(systemName: "arrow.2.squarepath")) { _ in
|
||||
accountViewModel.showReblogs()
|
||||
})
|
||||
|
@ -92,17 +87,13 @@ private extension ProfileViewController {
|
|||
|
||||
if relationship.muting {
|
||||
actions.append(UIAction(
|
||||
title: String.localizedStringWithFormat(
|
||||
NSLocalizedString("account.unmute-account", comment: ""),
|
||||
accountViewModel.accountName),
|
||||
title: NSLocalizedString("account.unmute", comment: ""),
|
||||
image: UIImage(systemName: "speaker")) { _ in
|
||||
accountViewModel.unmute()
|
||||
})
|
||||
} else {
|
||||
actions.append(UIAction(
|
||||
title: String.localizedStringWithFormat(
|
||||
NSLocalizedString("account.mute-account", comment: ""),
|
||||
accountViewModel.accountName),
|
||||
title: NSLocalizedString("account.mute", comment: ""),
|
||||
image: UIImage(systemName: "speaker.slash")) { _ in
|
||||
accountViewModel.mute()
|
||||
})
|
||||
|
@ -110,18 +101,15 @@ private extension ProfileViewController {
|
|||
|
||||
if relationship.blocking {
|
||||
actions.append(UIAction(
|
||||
title: String.localizedStringWithFormat(
|
||||
NSLocalizedString("account.unblock-account", comment: ""),
|
||||
accountViewModel.accountName),
|
||||
title: NSLocalizedString("account.unblock", comment: ""),
|
||||
image: UIImage(systemName: "slash.circle")) { _ in
|
||||
accountViewModel.unblock()
|
||||
})
|
||||
} else {
|
||||
actions.append(UIAction(
|
||||
title: String.localizedStringWithFormat(
|
||||
NSLocalizedString("account.block-account", comment: ""),
|
||||
accountViewModel.accountName),
|
||||
image: UIImage(systemName: "slash.circle")) { _ in
|
||||
title: NSLocalizedString("account.block", comment: ""),
|
||||
image: UIImage(systemName: "slash.circle"),
|
||||
attributes: .destructive) { _ in
|
||||
accountViewModel.block()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -212,9 +212,7 @@ private extension AccountHeaderView {
|
|||
guard let accountViewModel = self?.viewModel?.accountViewModel else { return }
|
||||
|
||||
let unfollowAction = UIAction(
|
||||
title: String.localizedStringWithFormat(
|
||||
NSLocalizedString("account.unfollow-account", comment: ""),
|
||||
accountViewModel.accountName),
|
||||
title: NSLocalizedString("account.unfollow", comment: ""),
|
||||
image: UIImage(systemName: "person.badge.minus"),
|
||||
attributes: .destructive) { _ in
|
||||
accountViewModel.unfollow()
|
||||
|
|
Loading…
Reference in a new issue