Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 5f70c62

Browse files
authored
Merge pull request #5807 from matrix-org/jryans/tweak-cs-text
Tweak cross-signing copy
2 parents 264e24f + cf4ed1b commit 5f70c62

File tree

11 files changed

+46
-37
lines changed

11 files changed

+46
-37
lines changed

res/css/structures/_ToastContainer.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Matrix.org Foundation C.I.C.
2+
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -158,6 +158,10 @@ limitations under the License.
158158
}
159159
}
160160

161+
.mx_Toast_detail {
162+
color: $secondary-fg-color;
163+
}
164+
161165
.mx_Toast_deviceID {
162166
font-size: $font-10px;
163167
}

src/components/structures/MatrixChat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
15541554
} else if (request.pending) {
15551555
ToastStore.sharedInstance().addOrReplaceToast({
15561556
key: 'verifreq_' + request.channel.transactionId,
1557-
title: request.isSelfVerification ? _t("Self-verification request") : _t("Verification Request"),
1557+
title: _t("Verification requested"),
15581558
icon: "verification",
15591559
props: {request},
15601560
component: sdk.getComponent("toasts.VerificationRequestToast"),

src/components/structures/auth/SetupEncryptionBody.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,14 @@ export default class SetupEncryptionBody extends React.Component {
155155
let verifyButton;
156156
if (store.hasDevicesToVerifyAgainst) {
157157
verifyButton = <AccessibleButton kind="primary" onClick={this._onVerifyClick}>
158-
{ _t("Verify with another session") }
158+
{ _t("Use another login") }
159159
</AccessibleButton>;
160160
}
161161

162162
return (
163163
<div>
164164
<p>{_t(
165-
"Verify this login to access your encrypted messages and " +
166-
"prove to others that this login is really you.",
165+
"Verify your identity to access encrypted messages and prove your identity to others.",
167166
)}</p>
168167

169168
<div className="mx_CompleteSecurity_actionRow">
@@ -205,8 +204,8 @@ export default class SetupEncryptionBody extends React.Component {
205204
return (
206205
<div>
207206
<p>{_t(
208-
"Without completing security on this session, it won’t have " +
209-
"access to encrypted messages.",
207+
"Without verifying, you won’t have access to all your messages " +
208+
"and may appear as untrusted to others.",
210209
)}</p>
211210
<div className="mx_CompleteSecurity_actionRow">
212211
<AccessibleButton

src/components/views/dialogs/VerificationRequestDialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class VerificationRequestDialog extends React.Component {
5050
const member = this.props.member ||
5151
otherUserId && MatrixClientPeg.get().getUser(otherUserId);
5252
const title = request && request.isSelfVerification ?
53-
_t("Verify other session") : _t("Verification Request");
53+
_t("Verify other login") : _t("Verification Request");
5454

5555
return <BaseDialog className="mx_InfoDialog" onFinished={this.props.onFinished}
5656
contentId="mx_Dialog_content"

src/components/views/right_panel/EncryptionInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const EncryptionInfo: React.FC<IProps> = ({
5252
let text: string;
5353
if (waitingForOtherParty) {
5454
if (isSelfVerification) {
55-
text = _t("Waiting for you to accept on your other session…");
55+
text = _t("Accept on your other login…");
5656
} else {
5757
text = _t("Waiting for %(displayName)s to accept…", {
5858
displayName: member.displayName || member.name || member.userId,

src/components/views/toasts/GenericToast.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020 The Matrix.org Foundation C.I.C.
2+
Copyright 2020-2021 The Matrix.org Foundation C.I.C.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ import {XOR} from "../../../@types/common";
2121

2222
export interface IProps {
2323
description: ReactNode;
24+
detail?: ReactNode;
2425
acceptLabel: string;
2526

2627
onAccept();
@@ -33,14 +34,20 @@ interface IPropsExtended extends IProps {
3334

3435
const GenericToast: React.FC<XOR<IPropsExtended, IProps>> = ({
3536
description,
37+
detail,
3638
acceptLabel,
3739
rejectLabel,
3840
onAccept,
3941
onReject,
4042
}) => {
43+
const detailContent = detail ? <div className="mx_Toast_detail">
44+
{detail}
45+
</div> : null;
46+
4147
return <div>
4248
<div className="mx_Toast_description">
43-
{ description }
49+
{description}
50+
{detailContent}
4451
</div>
4552
<div className="mx_Toast_buttons" aria-live="off">
4653
{onReject && rejectLabel && <FormButton label={rejectLabel} kind="danger" onClick={onReject} /> }

src/components/views/toasts/VerificationRequestToast.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Matrix.org Foundation C.I.C.
2+
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -140,25 +140,26 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
140140

141141
render() {
142142
const {request} = this.props;
143-
let nameLabel;
143+
let description;
144+
let detail;
144145
if (request.isSelfVerification) {
145146
if (this.state.device) {
146-
nameLabel = _t("From %(deviceName)s (%(deviceId)s) at %(ip)s", {
147-
deviceName: this.state.device.getDisplayName(),
147+
description = this.state.device.getDisplayName();
148+
detail = _t("%(deviceId)s from %(ip)s", {
148149
deviceId: this.state.device.deviceId,
149150
ip: this.state.ip,
150151
});
151152
}
152153
} else {
153154
const userId = request.otherUserId;
154155
const roomId = request.channel.roomId;
155-
nameLabel = roomId ? userLabelForEventRoom(userId, roomId) : userId;
156+
description = roomId ? userLabelForEventRoom(userId, roomId) : userId;
156157
// for legacy to_device verification requests
157-
if (nameLabel === userId) {
158+
if (description === userId) {
158159
const client = MatrixClientPeg.get();
159160
const user = client.getUser(userId);
160161
if (user && user.displayName) {
161-
nameLabel = _t("%(name)s (%(userId)s)", {name: user.displayName, userId});
162+
description = _t("%(name)s (%(userId)s)", {name: user.displayName, userId});
162163
}
163164
}
164165
}
@@ -167,7 +168,8 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
167168
_t("Decline (%(counter)s)", {counter: this.state.counter});
168169

169170
return <GenericToast
170-
description={nameLabel}
171+
description={description}
172+
detail={detail}
171173
acceptLabel={_t("Accept")}
172174
onAccept={this.accept}
173175
rejectLabel={declineLabel}

src/i18n/strings/en_EN.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@
729729
"Yes": "Yes",
730730
"No": "No",
731731
"You have unverified logins": "You have unverified logins",
732-
"Verify all your sessions to ensure your account & messages are safe": "Verify all your sessions to ensure your account & messages are safe",
732+
"Review to ensure your account is safe": "Review to ensure your account is safe",
733733
"Review": "Review",
734734
"Later": "Later",
735735
"Don't miss a reply": "Don't miss a reply",
@@ -753,7 +753,7 @@
753753
"Safeguard against losing access to encrypted messages & data": "Safeguard against losing access to encrypted messages & data",
754754
"Other users may not trust it": "Other users may not trust it",
755755
"New login. Was this you?": "New login. Was this you?",
756-
"A new login is accessing your account: %(name)s (%(deviceID)s) at %(ip)s": "A new login is accessing your account: %(name)s (%(deviceID)s) at %(ip)s",
756+
"%(deviceId)s from %(ip)s": "%(deviceId)s from %(ip)s",
757757
"Check your devices": "Check your devices",
758758
"What's new?": "What's new?",
759759
"What's New": "What's New",
@@ -982,7 +982,6 @@
982982
"Folder": "Folder",
983983
"Pin": "Pin",
984984
"Your server isn't responding to some <a>requests</a>.": "Your server isn't responding to some <a>requests</a>.",
985-
"From %(deviceName)s (%(deviceId)s) at %(ip)s": "From %(deviceName)s (%(deviceId)s) at %(ip)s",
986985
"Decline (%(counter)s)": "Decline (%(counter)s)",
987986
"Accept <policyLink /> to continue:": "Accept <policyLink /> to continue:",
988987
"Delete": "Delete",
@@ -1678,7 +1677,7 @@
16781677
"In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.": "In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.",
16791678
"When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.": "When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.",
16801679
"Back": "Back",
1681-
"Waiting for you to accept on your other session…": "Waiting for you to accept on your other session",
1680+
"Accept on your other login…": "Accept on your other login",
16821681
"Waiting for %(displayName)s to accept…": "Waiting for %(displayName)s to accept…",
16831682
"Accepting…": "Accepting…",
16841683
"Start Verification": "Start Verification",
@@ -2350,7 +2349,7 @@
23502349
"Upload %(count)s other files|one": "Upload %(count)s other file",
23512350
"Cancel All": "Cancel All",
23522351
"Upload Error": "Upload Error",
2353-
"Verify other session": "Verify other session",
2352+
"Verify other login": "Verify other login",
23542353
"Verification Request": "Verification Request",
23552354
"Approve widget permissions": "Approve widget permissions",
23562355
"This widget would like to:": "This widget would like to:",
@@ -2551,7 +2550,7 @@
25512550
"Review terms and conditions": "Review terms and conditions",
25522551
"Old cryptography data detected": "Old cryptography data detected",
25532552
"Data from an older version of %(brand)s has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.": "Data from an older version of %(brand)s has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.",
2554-
"Self-verification request": "Self-verification request",
2553+
"Verification requested": "Verification requested",
25552554
"Logout": "Logout",
25562555
"%(creator)s created this DM.": "%(creator)s created this DM.",
25572556
"%(creator)s created and configured the room.": "%(creator)s created and configured the room.",
@@ -2741,11 +2740,11 @@
27412740
"Decide where your account is hosted": "Decide where your account is hosted",
27422741
"Use Security Key or Phrase": "Use Security Key or Phrase",
27432742
"Use Security Key": "Use Security Key",
2744-
"Verify with another session": "Verify with another session",
2745-
"Verify this login to access your encrypted messages and prove to others that this login is really you.": "Verify this login to access your encrypted messages and prove to others that this login is really you.",
2743+
"Use another login": "Use another login",
2744+
"Verify your identity to access encrypted messages and prove your identity to others.": "Verify your identity to access encrypted messages and prove your identity to others.",
27462745
"Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.": "Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.",
27472746
"Your new session is now verified. Other users will see it as trusted.": "Your new session is now verified. Other users will see it as trusted.",
2748-
"Without completing security on this session, it won’t have access to encrypted messages.": "Without completing security on this session, it won’t have access to encrypted messages.",
2747+
"Without verifying, you won’t have access to all your messages and may appear as untrusted to others.": "Without verifying, you won’t have access to all your messages and may appear as untrusted to others.",
27492748
"Failed to re-authenticate due to a homeserver problem": "Failed to re-authenticate due to a homeserver problem",
27502749
"Incorrect password": "Incorrect password",
27512750
"Failed to re-authenticate": "Failed to re-authenticate",

src/toasts/BulkUnverifiedSessionsToast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const showToast = (deviceIds: Set<string>) => {
4242
title: _t("You have unverified logins"),
4343
icon: "verification_warning",
4444
props: {
45-
description: _t("Verify all your sessions to ensure your account & messages are safe"),
45+
description: _t("Review to ensure your account is safe"),
4646
acceptLabel: _t("Review"),
4747
onAccept,
4848
rejectLabel: _t("Later"),

src/toasts/UnverifiedSessionToast.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,11 @@ export const showToast = async (deviceId: string) => {
4949
title: _t("New login. Was this you?"),
5050
icon: "verification_warning",
5151
props: {
52-
description: _t(
53-
"A new login is accessing your account: %(name)s (%(deviceID)s) at %(ip)s", {
54-
name: device.display_name,
55-
deviceID: deviceId,
56-
ip: device.last_seen_ip,
57-
},
58-
),
52+
description: device.display_name,
53+
detail: _t("%(deviceId)s from %(ip)s", {
54+
deviceId,
55+
ip: device.last_seen_ip,
56+
}),
5957
acceptLabel: _t("Check your devices"),
6058
onAccept,
6159
rejectLabel: _t("Later"),

0 commit comments

Comments
 (0)