From d402b52e068dbf6239482361f9665f92a72749f6 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:40:25 +0100 Subject: [PATCH] Collect decryption failure translations together (#12436) * Collect decryption failure translations together They are not specific to threads. * Revert changes to non-english languages --- src/components/views/messages/DecryptionFailureBody.tsx | 4 ++-- src/components/views/rooms/ThreadSummary.tsx | 6 ++++-- src/i18n/strings/en_EN.json | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/views/messages/DecryptionFailureBody.tsx b/src/components/views/messages/DecryptionFailureBody.tsx index 1a68e58b33..d3895e815f 100644 --- a/src/components/views/messages/DecryptionFailureBody.tsx +++ b/src/components/views/messages/DecryptionFailureBody.tsx @@ -22,8 +22,8 @@ import { IBodyProps } from "./IBodyProps"; function getErrorMessage(mxEvent?: MatrixEvent): string { return mxEvent?.isEncryptedDisabledForUnverifiedDevices - ? _t("timeline|decryption_failure_blocked") - : _t("threads|unable_to_decrypt"); + ? _t("timeline|decryption_failure|blocked") + : _t("timeline|decryption_failure|unable_to_decrypt"); } // A placeholder element for messages that could not be decrypted diff --git a/src/components/views/rooms/ThreadSummary.tsx b/src/components/views/rooms/ThreadSummary.tsx index 1e30dcba9d..dc8ae01de6 100644 --- a/src/components/views/rooms/ThreadSummary.tsx +++ b/src/components/views/rooms/ThreadSummary.tsx @@ -120,9 +120,11 @@ export const ThreadMessagePreview: React.FC = ({ thread, showDisp {lastReply.isDecryptionFailure() ? (
- {_t("threads|unable_to_decrypt")} + + {_t("timeline|decryption_failure|unable_to_decrypt")} +
) : (
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index f0ee695d5e..0f353c820a 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -3162,8 +3162,7 @@ "my_threads_description": "Shows all threads you've participated in", "open_thread": "Open thread", "show_all_threads": "Show all threads", - "show_thread_filter": "Show:", - "unable_to_decrypt": "Unable to decrypt message" + "show_thread_filter": "Show:" }, "threads_activity_centre": { "header": "Threads activity", @@ -3213,7 +3212,10 @@ }, "creation_summary_dm": "%(creator)s created this DM.", "creation_summary_room": "%(creator)s created and configured the room.", - "decryption_failure_blocked": "The sender has blocked you from receiving this message", + "decryption_failure": { + "blocked": "The sender has blocked you from receiving this message", + "unable_to_decrypt": "Unable to decrypt message" + }, "disambiguated_profile": "%(displayName)s (%(matrixId)s)", "download_action_decrypting": "Decrypting", "download_action_downloading": "Downloading",