diff --git a/Localization/app.json b/Localization/app.json index 130f2c035..a631f61d6 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -154,7 +154,7 @@ "emoji": "Emoji" } }, - "firendship": { + "friendship": { "follow": "Follow", "following": "Following", "request": "Request", diff --git a/Mastodon/Generated/Strings.swift b/Mastodon/Generated/Strings.swift index be6079342..5ef064149 100644 --- a/Mastodon/Generated/Strings.swift +++ b/Mastodon/Generated/Strings.swift @@ -167,48 +167,48 @@ internal enum L10n { return L10n.tr("Localizable", "Common.Controls.Actions.UnblockDomain", String(describing: p1)) } } - internal enum Firendship { + internal enum Friendship { /// Block - internal static let block = L10n.tr("Localizable", "Common.Controls.Firendship.Block") + internal static let block = L10n.tr("Localizable", "Common.Controls.Friendship.Block") /// Block %@ internal static func blockDomain(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.BlockDomain", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.BlockDomain", String(describing: p1)) } /// Blocked - internal static let blocked = L10n.tr("Localizable", "Common.Controls.Firendship.Blocked") + internal static let blocked = L10n.tr("Localizable", "Common.Controls.Friendship.Blocked") /// Block %@ internal static func blockUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.BlockUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.BlockUser", String(describing: p1)) } /// Edit Info - internal static let editInfo = L10n.tr("Localizable", "Common.Controls.Firendship.EditInfo") + internal static let editInfo = L10n.tr("Localizable", "Common.Controls.Friendship.EditInfo") /// Follow - internal static let follow = L10n.tr("Localizable", "Common.Controls.Firendship.Follow") + internal static let follow = L10n.tr("Localizable", "Common.Controls.Friendship.Follow") /// Following - internal static let following = L10n.tr("Localizable", "Common.Controls.Firendship.Following") + internal static let following = L10n.tr("Localizable", "Common.Controls.Friendship.Following") /// Mute - internal static let mute = L10n.tr("Localizable", "Common.Controls.Firendship.Mute") + internal static let mute = L10n.tr("Localizable", "Common.Controls.Friendship.Mute") /// Muted - internal static let muted = L10n.tr("Localizable", "Common.Controls.Firendship.Muted") + internal static let muted = L10n.tr("Localizable", "Common.Controls.Friendship.Muted") /// Mute %@ internal static func muteUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.MuteUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.MuteUser", String(describing: p1)) } /// Pending - internal static let pending = L10n.tr("Localizable", "Common.Controls.Firendship.Pending") + internal static let pending = L10n.tr("Localizable", "Common.Controls.Friendship.Pending") /// Request - internal static let request = L10n.tr("Localizable", "Common.Controls.Firendship.Request") + internal static let request = L10n.tr("Localizable", "Common.Controls.Friendship.Request") /// Unblock - internal static let unblock = L10n.tr("Localizable", "Common.Controls.Firendship.Unblock") + internal static let unblock = L10n.tr("Localizable", "Common.Controls.Friendship.Unblock") /// Unblock %@ internal static func unblockUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.UnblockUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.UnblockUser", String(describing: p1)) } /// Unmute - internal static let unmute = L10n.tr("Localizable", "Common.Controls.Firendship.Unmute") + internal static let unmute = L10n.tr("Localizable", "Common.Controls.Friendship.Unmute") /// Unmute %@ internal static func unmuteUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.UnmuteUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.UnmuteUser", String(describing: p1)) } } internal enum Keyboard { diff --git a/Mastodon/Protocol/UserProvider/UserProviderFacade.swift b/Mastodon/Protocol/UserProvider/UserProviderFacade.swift index 1f9215a76..b5e381f1b 100644 --- a/Mastodon/Protocol/UserProvider/UserProviderFacade.swift +++ b/Mastodon/Protocol/UserProvider/UserProviderFacade.swift @@ -164,9 +164,9 @@ extension UserProviderFacade { if !isMyself { // mute let muteAction = UIAction( - title: isMuting ? L10n.Common.Controls.Firendship.unmuteUser(name) : L10n.Common.Controls.Firendship.mute, + title: isMuting ? L10n.Common.Controls.Friendship.unmuteUser(name) : L10n.Common.Controls.Friendship.mute, image: isMuting ? UIImage(systemName: "speaker") : UIImage(systemName: "speaker.slash"), - discoverabilityTitle: isMuting ? nil : L10n.Common.Controls.Firendship.muteUser(name), + discoverabilityTitle: isMuting ? nil : L10n.Common.Controls.Friendship.muteUser(name), attributes: isMuting ? [] : .destructive, state: .off ) { [weak provider] _ in @@ -186,7 +186,7 @@ extension UserProviderFacade { if isMuting { children.append(muteAction) } else { - let muteMenu = UIMenu(title: L10n.Common.Controls.Firendship.muteUser(name), image: UIImage(systemName: "speaker.slash"), options: [], children: [muteAction]) + let muteMenu = UIMenu(title: L10n.Common.Controls.Friendship.muteUser(name), image: UIImage(systemName: "speaker.slash"), options: [], children: [muteAction]) children.append(muteMenu) } } @@ -194,9 +194,9 @@ extension UserProviderFacade { if !isMyself { // block let blockAction = UIAction( - title: isBlocking ? L10n.Common.Controls.Firendship.unblockUser(name) : L10n.Common.Controls.Firendship.block, + title: isBlocking ? L10n.Common.Controls.Friendship.unblockUser(name) : L10n.Common.Controls.Friendship.block, image: isBlocking ? UIImage(systemName: "hand.raised.slash") : UIImage(systemName: "hand.raised"), - discoverabilityTitle: isBlocking ? nil : L10n.Common.Controls.Firendship.blockUser(name), + discoverabilityTitle: isBlocking ? nil : L10n.Common.Controls.Friendship.blockUser(name), attributes: isBlocking ? [] : .destructive, state: .off ) { [weak provider] _ in @@ -216,7 +216,7 @@ extension UserProviderFacade { if isBlocking { children.append(blockAction) } else { - let blockMenu = UIMenu(title: L10n.Common.Controls.Firendship.blockUser(name), image: UIImage(systemName: "hand.raised"), options: [], children: [blockAction]) + let blockMenu = UIMenu(title: L10n.Common.Controls.Friendship.blockUser(name), image: UIImage(systemName: "hand.raised"), options: [], children: [blockAction]) children.append(blockMenu) } } diff --git a/Mastodon/Resources/ar.lproj/Localizable.strings b/Mastodon/Resources/ar.lproj/Localizable.strings index bb61c122f..79f2a8897 100644 --- a/Mastodon/Resources/ar.lproj/Localizable.strings +++ b/Mastodon/Resources/ar.lproj/Localizable.strings @@ -56,22 +56,22 @@ Please check your internet connection."; "Common.Controls.Actions.TakePhoto" = "Take photo"; "Common.Controls.Actions.TryAgain" = "Try Again"; "Common.Controls.Actions.UnblockDomain" = "Unblock %@"; -"Common.Controls.Firendship.Block" = "Block"; -"Common.Controls.Firendship.BlockDomain" = "Block %@"; -"Common.Controls.Firendship.BlockUser" = "Block %@"; -"Common.Controls.Firendship.Blocked" = "Blocked"; -"Common.Controls.Firendship.EditInfo" = "Edit Info"; -"Common.Controls.Firendship.Follow" = "Follow"; -"Common.Controls.Firendship.Following" = "Following"; -"Common.Controls.Firendship.Mute" = "Mute"; -"Common.Controls.Firendship.MuteUser" = "Mute %@"; -"Common.Controls.Firendship.Muted" = "Muted"; -"Common.Controls.Firendship.Pending" = "Pending"; -"Common.Controls.Firendship.Request" = "Request"; -"Common.Controls.Firendship.Unblock" = "Unblock"; -"Common.Controls.Firendship.UnblockUser" = "Unblock %@"; -"Common.Controls.Firendship.Unmute" = "Unmute"; -"Common.Controls.Firendship.UnmuteUser" = "Unmute %@"; +"Common.Controls.Friendship.Block" = "Block"; +"Common.Controls.Friendship.BlockDomain" = "Block %@"; +"Common.Controls.Friendship.BlockUser" = "Block %@"; +"Common.Controls.Friendship.Blocked" = "Blocked"; +"Common.Controls.Friendship.EditInfo" = "Edit Info"; +"Common.Controls.Friendship.Follow" = "Follow"; +"Common.Controls.Friendship.Following" = "Following"; +"Common.Controls.Friendship.Mute" = "Mute"; +"Common.Controls.Friendship.MuteUser" = "Mute %@"; +"Common.Controls.Friendship.Muted" = "Muted"; +"Common.Controls.Friendship.Pending" = "Pending"; +"Common.Controls.Friendship.Request" = "Request"; +"Common.Controls.Friendship.Unblock" = "Unblock"; +"Common.Controls.Friendship.UnblockUser" = "Unblock %@"; +"Common.Controls.Friendship.Unmute" = "Unmute"; +"Common.Controls.Friendship.UnmuteUser" = "Unmute %@"; "Common.Controls.Keyboard.Common.ComposeNewPost" = "Compose New Post"; "Common.Controls.Keyboard.Common.OpenSettings" = "Open Settings"; "Common.Controls.Keyboard.Common.ShowFavorites" = "Show Favorites"; diff --git a/Mastodon/Resources/en.lproj/Localizable.strings b/Mastodon/Resources/en.lproj/Localizable.strings index bb61c122f..79f2a8897 100644 --- a/Mastodon/Resources/en.lproj/Localizable.strings +++ b/Mastodon/Resources/en.lproj/Localizable.strings @@ -56,22 +56,22 @@ Please check your internet connection."; "Common.Controls.Actions.TakePhoto" = "Take photo"; "Common.Controls.Actions.TryAgain" = "Try Again"; "Common.Controls.Actions.UnblockDomain" = "Unblock %@"; -"Common.Controls.Firendship.Block" = "Block"; -"Common.Controls.Firendship.BlockDomain" = "Block %@"; -"Common.Controls.Firendship.BlockUser" = "Block %@"; -"Common.Controls.Firendship.Blocked" = "Blocked"; -"Common.Controls.Firendship.EditInfo" = "Edit Info"; -"Common.Controls.Firendship.Follow" = "Follow"; -"Common.Controls.Firendship.Following" = "Following"; -"Common.Controls.Firendship.Mute" = "Mute"; -"Common.Controls.Firendship.MuteUser" = "Mute %@"; -"Common.Controls.Firendship.Muted" = "Muted"; -"Common.Controls.Firendship.Pending" = "Pending"; -"Common.Controls.Firendship.Request" = "Request"; -"Common.Controls.Firendship.Unblock" = "Unblock"; -"Common.Controls.Firendship.UnblockUser" = "Unblock %@"; -"Common.Controls.Firendship.Unmute" = "Unmute"; -"Common.Controls.Firendship.UnmuteUser" = "Unmute %@"; +"Common.Controls.Friendship.Block" = "Block"; +"Common.Controls.Friendship.BlockDomain" = "Block %@"; +"Common.Controls.Friendship.BlockUser" = "Block %@"; +"Common.Controls.Friendship.Blocked" = "Blocked"; +"Common.Controls.Friendship.EditInfo" = "Edit Info"; +"Common.Controls.Friendship.Follow" = "Follow"; +"Common.Controls.Friendship.Following" = "Following"; +"Common.Controls.Friendship.Mute" = "Mute"; +"Common.Controls.Friendship.MuteUser" = "Mute %@"; +"Common.Controls.Friendship.Muted" = "Muted"; +"Common.Controls.Friendship.Pending" = "Pending"; +"Common.Controls.Friendship.Request" = "Request"; +"Common.Controls.Friendship.Unblock" = "Unblock"; +"Common.Controls.Friendship.UnblockUser" = "Unblock %@"; +"Common.Controls.Friendship.Unmute" = "Unmute"; +"Common.Controls.Friendship.UnmuteUser" = "Unmute %@"; "Common.Controls.Keyboard.Common.ComposeNewPost" = "Compose New Post"; "Common.Controls.Keyboard.Common.OpenSettings" = "Open Settings"; "Common.Controls.Keyboard.Common.ShowFavorites" = "Show Favorites"; diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift index d3425b486..8ba7851cd 100644 --- a/Mastodon/Scene/Profile/ProfileViewController.swift +++ b/Mastodon/Scene/Profile/ProfileViewController.swift @@ -813,7 +813,7 @@ extension ProfileViewController: ProfileHeaderViewDelegate { switch relationshipAction { case .none: break - case .follow, .reqeust, .pending, .following: + case .follow, .request, .pending, .following: UserProviderFacade.toggleUserFollowRelationship(provider: self) .sink { _ in // TODO: handle error @@ -829,7 +829,7 @@ extension ProfileViewController: ProfileHeaderViewDelegate { message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.message(name), preferredStyle: .alert ) - let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unmute, style: .default) { [weak self] _ in + let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unmute, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserMuteRelationship(provider: self, cell: nil) .sink { _ in @@ -851,7 +851,7 @@ extension ProfileViewController: ProfileHeaderViewDelegate { message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnblockUsre.message(name), preferredStyle: .alert ) - let unblockAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unblock, style: .default) { [weak self] _ in + let unblockAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unblock, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserBlockRelationship(provider: self, cell: nil) .sink { _ in diff --git a/Mastodon/Scene/Profile/ProfileViewModel.swift b/Mastodon/Scene/Profile/ProfileViewModel.swift index 289772033..619d55ba3 100644 --- a/Mastodon/Scene/Profile/ProfileViewModel.swift +++ b/Mastodon/Scene/Profile/ProfileViewModel.swift @@ -327,7 +327,7 @@ extension ProfileViewModel { enum RelationshipAction: Int, CaseIterable { case none // set hide from UI case follow - case reqeust + case request case pending case following case muting @@ -349,7 +349,7 @@ extension ProfileViewModel { static let none = RelationshipAction.none.option static let follow = RelationshipAction.follow.option - static let request = RelationshipAction.reqeust.option + static let request = RelationshipAction.request.option static let pending = RelationshipAction.pending.option static let following = RelationshipAction.following.option static let muting = RelationshipAction.muting.option @@ -378,15 +378,15 @@ extension ProfileViewModel { } switch highPriorityAction { case .none: return " " - case .follow: return L10n.Common.Controls.Firendship.follow - case .reqeust: return L10n.Common.Controls.Firendship.request - case .pending: return L10n.Common.Controls.Firendship.pending - case .following: return L10n.Common.Controls.Firendship.following - case .muting: return L10n.Common.Controls.Firendship.muted - case .blocked: return L10n.Common.Controls.Firendship.follow // blocked by user - case .blocking: return L10n.Common.Controls.Firendship.blocked - case .suspended: return L10n.Common.Controls.Firendship.follow - case .edit: return L10n.Common.Controls.Firendship.editInfo + case .follow: return L10n.Common.Controls.Friendship.follow + case .request: return L10n.Common.Controls.Friendship.request + case .pending: return L10n.Common.Controls.Friendship.pending + case .following: return L10n.Common.Controls.Friendship.following + case .muting: return L10n.Common.Controls.Friendship.muted + case .blocked: return L10n.Common.Controls.Friendship.follow // blocked by user + case .blocking: return L10n.Common.Controls.Friendship.blocked + case .suspended: return L10n.Common.Controls.Friendship.follow + case .edit: return L10n.Common.Controls.Friendship.editInfo case .editing: return L10n.Common.Controls.Actions.done case .updating: return " " } @@ -400,7 +400,7 @@ extension ProfileViewModel { switch highPriorityAction { case .none: return Asset.Colors.brandBlue.color case .follow: return Asset.Colors.brandBlue.color - case .reqeust: return Asset.Colors.brandBlue.color + case .request: return Asset.Colors.brandBlue.color case .pending: return Asset.Colors.brandBlue.color case .following: return Asset.Colors.brandBlue.color case .muting: return Asset.Colors.Background.alertYellow.color diff --git a/Mastodon/Scene/Search/SearchViewController+Follow.swift b/Mastodon/Scene/Search/SearchViewController+Follow.swift index a7f7faf90..c31f6d82a 100644 --- a/Mastodon/Scene/Search/SearchViewController+Follow.swift +++ b/Mastodon/Scene/Search/SearchViewController+Follow.swift @@ -52,7 +52,7 @@ extension SearchViewController: SearchRecommendAccountsCollectionViewCellDelegat message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.message(name), preferredStyle: .alert ) - let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unmute, style: .default) { [weak self] _ in + let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unmute, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserMuteRelationship(provider: self, cell: nil) .sink { _ in @@ -74,7 +74,7 @@ extension SearchViewController: SearchRecommendAccountsCollectionViewCellDelegat message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnblockUsre.message(name), preferredStyle: .alert ) - let unblockAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unblock, style: .default) { [weak self] _ in + let unblockAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unblock, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserBlockRelationship(provider: self, cell: nil) .sink { _ in