From e1d1ef83e6e170075110315612bc18a4e219e34b Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Tue, 17 Oct 2023 12:51:45 +0200 Subject: [PATCH] Don't show translation-option for statuses with the same language as the device --- .../Sources/MastodonUI/View/Content/StatusAuthorView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusAuthorView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusAuthorView.swift index 4e9c8cbf9..db34f081c 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusAuthorView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusAuthorView.swift @@ -179,7 +179,10 @@ extension StatusAuthorView { postActions.append(.editStatus) } - if let statusLanguage = menuContext.statusLanguage, menuContext.isTranslationEnabled { + if menuContext.isTranslationEnabled, + let statusLanguage = menuContext.statusLanguage, + let deviceLanguage = Bundle.main.preferredLocalizations.first, + deviceLanguage != statusLanguage { if menuContext.isTranslated == false { postActions.append(.translateStatus(.init(language: statusLanguage))) } else {