From 7df482fcbcf835b9bc4653429c7c722fe259d90c Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Tue, 7 Jan 2020 11:30:40 -0600 Subject: [PATCH 1/2] Hide algorithm from the message about turning on encryption Signed-off-by: Aaron Raimist --- src/TextForEvent.js | 5 ++--- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index 2e79ff2044c..ae463ac171f 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -420,9 +420,8 @@ function textForHistoryVisibilityEvent(event) { function textForEncryptionEvent(event) { const senderName = event.sender ? event.sender.name : event.getSender(); - return _t('%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).', { - senderName, - algorithm: event.getContent().algorithm, + return _t('%(senderName)s turned on end-to-end encryption.', { + senderName }); } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b34b7378919..3f6d998c7cd 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -260,7 +260,7 @@ "%(senderName)s made future room history visible to all room members.": "%(senderName)s made future room history visible to all room members.", "%(senderName)s made future room history visible to anyone.": "%(senderName)s made future room history visible to anyone.", "%(senderName)s made future room history visible to unknown (%(visibility)s).": "%(senderName)s made future room history visible to unknown (%(visibility)s).", - "%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).": "%(senderName)s turned on end-to-end encryption (algorithm %(algorithm)s).", + "%(senderName)s turned on end-to-end encryption.": "%(senderName)s turned on end-to-end encryption.", "%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s changed the power level of %(powerLevelDiffText)s.", "%(senderName)s changed the pinned messages for the room.": "%(senderName)s changed the pinned messages for the room.", From 24530100bbeb2e4a9ea4f03e0ae9f14dbb2d66b2 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Tue, 7 Jan 2020 11:38:15 -0600 Subject: [PATCH 2/2] Lint Signed-off-by: Aaron Raimist --- src/TextForEvent.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index ae463ac171f..bffe81a541b 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -420,9 +420,7 @@ function textForHistoryVisibilityEvent(event) { function textForEncryptionEvent(event) { const senderName = event.sender ? event.sender.name : event.getSender(); - return _t('%(senderName)s turned on end-to-end encryption.', { - senderName - }); + return _t('%(senderName)s turned on end-to-end encryption.', {senderName}); } // Currently will only display a change if a user's power level is changed