From 3be197cf86057799605d4f4806f54d724c79657b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 7 Apr 2020 11:19:56 -0600 Subject: [PATCH] Use singular copy when only deleting one device --- src/components/views/settings/DevicesPanel.js | 9 +++++++-- src/i18n/strings/en_EN.json | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/DevicesPanel.js b/src/components/views/settings/DevicesPanel.js index 61e7724a6f..70e0bf0109 100644 --- a/src/components/views/settings/DevicesPanel.js +++ b/src/components/views/settings/DevicesPanel.js @@ -124,16 +124,21 @@ export default class DevicesPanel extends React.Component { // pop up an interactive auth dialog const InteractiveAuthDialog = sdk.getComponent("dialogs.InteractiveAuthDialog"); + const singularDevice = this.state.selectedDevices.length === 1; const dialogAesthetics = { [SSOAuthEntry.PHASE_PREAUTH]: { title: _t("Use Single Sign On to continue"), - body: _t("Confirm deleting these sessions by using Single Sign On to prove your identity."), + body: singularDevice + ? _t("Confirm deleting this session by using Single Sign On to prove your identity.") + : _t("Confirm deleting these sessions by using Single Sign On to prove your identity."), continueText: _t("Single Sign On"), continueKind: "primary", }, [SSOAuthEntry.PHASE_POSTAUTH]: { title: _t("Confirm deleting these sessions"), - body: _t("Click the button below to confirm deleting these sessions."), + body: singularDevice + ? _t("Click the button below to confirm deleting this session.") + : _t("Click the button below to confirm deleting these sessions."), continueText: _t("Delete sessions"), continueKind: "danger", }, diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b7ad92757a..164b999825 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -610,8 +610,10 @@ "up to date": "up to date", "Your homeserver does not support session management.": "Your homeserver does not support session management.", "Unable to load session list": "Unable to load session list", + "Confirm deleting this session by using Single Sign On to prove your identity.": "Confirm deleting this session by using Single Sign On to prove your identity.", "Confirm deleting these sessions by using Single Sign On to prove your identity.": "Confirm deleting these sessions by using Single Sign On to prove your identity.", "Confirm deleting these sessions": "Confirm deleting these sessions", + "Click the button below to confirm deleting this session.": "Click the button below to confirm deleting this session.", "Click the button below to confirm deleting these sessions.": "Click the button below to confirm deleting these sessions.", "Delete sessions": "Delete sessions", "Authentication": "Authentication",