From 3240b3bd60513e8c6faa517f981f11b07b622a84 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 30 Apr 2020 16:09:38 +0100 Subject: [PATCH] Add device name to unverified session toast --- src/components/views/toasts/UnverifiedSessionToast.js | 6 +++++- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/views/toasts/UnverifiedSessionToast.js b/src/components/views/toasts/UnverifiedSessionToast.js index afabf69178..38cd9f20df 100644 --- a/src/components/views/toasts/UnverifiedSessionToast.js +++ b/src/components/views/toasts/UnverifiedSessionToast.js @@ -49,9 +49,13 @@ export default class UnverifiedSessionToast extends React.PureComponent { }; render() { + const cli = MatrixClientPeg.get(); + const device = cli.getStoredDevice(cli.getUserId(), this.props.deviceId); + return (
- {_t("Verify the new login accessing your account & messages")} + {_t( + "Verify the new login accessing your account: %(name)s", { name: device.getDisplayName()})}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 4be143c523..3b432c410d 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -568,7 +568,7 @@ "Set up": "Set up", "Upgrade": "Upgrade", "Verify": "Verify", - "Verify the new login accessing your account & messages": "Verify the new login accessing your account & messages", + "Verify the new login accessing your account: %(name)s": "Verify the new login accessing your account: %(name)s", "From %(deviceName)s (%(deviceId)s)": "From %(deviceName)s (%(deviceId)s)", "Decline (%(counter)s)": "Decline (%(counter)s)", "Accept to continue:": "Accept to continue:",