diff --git a/Localizations/Localizable.strings b/Localizations/Localizable.strings index f5d1aa3..2402bbf 100644 --- a/Localizations/Localizable.strings +++ b/Localizations/Localizable.strings @@ -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"; diff --git a/View Controllers/ProfileViewController.swift b/View Controllers/ProfileViewController.swift index 8097983..b4131c5 100644 --- a/View Controllers/ProfileViewController.swift +++ b/View Controllers/ProfileViewController.swift @@ -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() }) } diff --git a/Views/AccountHeaderView.swift b/Views/AccountHeaderView.swift index 5501ecb..a9e122b 100644 --- a/Views/AccountHeaderView.swift +++ b/Views/AccountHeaderView.swift @@ -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()