Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace device with session in UI text #3980

Merged
merged 2 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CallHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function _setCallListeners(call) {
Modal.createTrackedDialog('Call Failed', '', QuestionDialog, {
title: _t('Call Failed'),
description: _t(
"There are unknown devices in this room: "+
"There are unknown sessions in this room: "+
"if you proceed without verifying them, it will be "+
"possible for someone to eavesdrop on your call.",
),
Expand Down
2 changes: 1 addition & 1 deletion src/Lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export function hydrateSession(credentials) {

const overwrite = credentials.userId !== oldUserId || credentials.deviceId !== oldDeviceId;
if (overwrite) {
console.warn("Clearing all data: Old session belongs to a different user/device");
console.warn("Clearing all data: Old session belongs to a different user/session");
}

return _doSetLoggedIn(credentials, overwrite);
Expand Down
12 changes: 6 additions & 6 deletions src/SlashCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ export const CommandMap = {
verify: new Command({
name: 'verify',
args: '<user-id> <device-id> <device-signing-key>',
description: _td('Verifies a user, device, and pubkey tuple'),
description: _td('Verifies a user, session, and pubkey tuple'),
runFn: function(roomId, args) {
if (args) {
const matches = args.match(/^(\S+) +(\S+) +(\S+)$/);
Expand All @@ -785,22 +785,22 @@ export const CommandMap = {
return success((async () => {
const device = await cli.getStoredDevice(userId, deviceId);
if (!device) {
throw new Error(_t('Unknown (user, device) pair:') + ` (${userId}, ${deviceId})`);
throw new Error(_t('Unknown (user, session) pair:') + ` (${userId}, ${deviceId})`);
}
const deviceTrust = await cli.checkDeviceTrust(userId, deviceId);

if (deviceTrust.isVerified()) {
if (device.getFingerprint() === fingerprint) {
throw new Error(_t('Device already verified!'));
throw new Error(_t('Session already verified!'));
} else {
throw new Error(_t('WARNING: Device already verified, but keys do NOT MATCH!'));
throw new Error(_t('WARNING: Session already verified, but keys do NOT MATCH!'));
}
}

if (device.getFingerprint() !== fingerprint) {
const fprint = device.getFingerprint();
throw new Error(
_t('WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device' +
_t('WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and session' +
' %(deviceId)s is "%(fprint)s" which does not match the provided key ' +
'"%(fingerprint)s". This could mean your communications are being intercepted!',
{
Expand All @@ -821,7 +821,7 @@ export const CommandMap = {
<p>
{
_t('The signing key you provided matches the signing key you received ' +
'from %(userId)s\'s device %(deviceId)s. Device marked as verified.',
'from %(userId)s\'s session %(deviceId)s. Session marked as verified.',
{userId, deviceId})
}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default createReactClass({
<h4>{ _t('Event information') }</h4>
{ this._renderEventInfo() }

<h4>{ _t('Sender device information') }</h4>
<h4>{ _t('Sender session information') }</h4>
{ this._renderDeviceInfo() }
</div>
<div className="mx_Dialog_buttons">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ export default class CreateKeyBackupDialog extends React.PureComponent {
return <div>
{_t(
"Without setting up Secure Message Recovery, you won't be able to restore your " +
"encrypted message history if you log out or use another device.",
"encrypted message history if you log out or use another session.",
)}
<DialogButtons primaryButton={_t('Set up Secure Message Recovery')}
onPrimaryButtonClick={this._onSetUpClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class NewRecoveryMethodDialog extends React.PureComponent {
content = <div>
{newMethodDetected}
<p>{_t(
"This device is encrypting history using the new recovery method.",
"This session is encrypting history using the new recovery method.",
)}</p>
{hackWarning}
<DialogButtons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ export default class RecoveryMethodRemovedDialog extends React.PureComponent {
>
<div>
<p>{_t(
"This device has detected that your recovery passphrase and key " +
"This session has detected that your recovery passphrase and key " +
"for Secure Messages have been removed.",
)}</p>
<p>{_t(
"If you did this accidentally, you can setup Secure Messages on " +
"this device which will re-encrypt this device's message " +
"this session which will re-encrypt this session's message " +
"history with a new recovery method.",
)}</p>
<p className="warning">{_t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {

return <form onSubmit={this._onMigrateFormSubmit}>
<p>{_t(
"Upgrade this device to allow it to verify other devices, " +
"Upgrade this session to allow it to verify other sessions, " +
"granting them access to encrypted messages and marking them " +
"as trusted for other users.",
)}</p>
Expand Down Expand Up @@ -471,7 +471,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {

return <div>
<p>{_t(
"Set up encryption on this device to allow it to verify other devices, " +
"Set up encryption on this session to allow it to verify other sessions, " +
"granting them access to encrypted messages and marking them as trusted for other users.",
)}</p>
<p>{_t(
Expand Down Expand Up @@ -665,7 +665,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
return <div>
<p>{_t(
"This device can now verify other devices, granting them access " +
"This session can now verify other sessions, granting them access " +
"to encrypted messages and marking them as trusted for other users.",
)}</p>
<p>{_t(
Expand All @@ -682,7 +682,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
return <div>
{_t(
"Without completing security on this device, it won’t have " +
"Without completing security on this session, it won’t have " +
"access to encrypted messages.",
)}
<DialogButtons primaryButton={_t('Go back')}
Expand Down
6 changes: 3 additions & 3 deletions src/components/structures/RoomStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@ export default createReactClass({
});

if (hasUDE) {
title = _t("Message not sent due to unknown devices being present");
title = _t("Message not sent due to unknown sessions being present");
content = _t(
"<showDevicesText>Show devices</showDevicesText>, <sendAnywayText>send anyway</sendAnywayText> or <cancelText>cancel</cancelText>.",
"<showSessionsText>Show sessions</showSessionsText>, <sendAnywayText>send anyway</sendAnywayText> or <cancelText>cancel</cancelText>.",
{},
{
'showDevicesText': (sub) => <a className="mx_RoomStatusBar_resend_link" key="resend" onClick={this._onShowDevicesClick}>{ sub }</a>,
'showSessionsText': (sub) => <a className="mx_RoomStatusBar_resend_link" key="resend" onClick={this._onShowDevicesClick}>{ sub }</a>,
'sendAnywayText': (sub) => <a className="mx_RoomStatusBar_resend_link" key="sendAnyway" onClick={this._onSendWithoutVerifyingClick}>{ sub }</a>,
'cancelText': (sub) => <a className="mx_RoomStatusBar_resend_link" key="cancel" onClick={this._onCancelAllClick}>{ sub }</a>,
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/RoomView.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ export default createReactClass({
this.setState({
e2eStatus: "warning",
});
debuglog("e2e status set to warning as not all users trust all of their devices." +
debuglog("e2e status set to warning as not all users trust all of their sessions." +
" Aborted on user", userId);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/auth/CompleteSecurity.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default class CompleteSecurity extends React.Component {
body = (
<div>
<p>{_t(
"Without completing security on this device, it won’t have " +
"Without completing security on this session, it won’t have " +
"access to encrypted messages.",
)}</p>
<div className="mx_CompleteSecurity_actionRow">
Expand Down
6 changes: 3 additions & 3 deletions src/components/structures/auth/ForgotPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ export default createReactClass({
<div>
{ _t(
"Changing your password will reset any end-to-end encryption keys " +
"on all of your devices, making encrypted chat history unreadable. Set up " +
"Key Backup or export your room keys from another device before resetting your " +
"on all of your sessions, making encrypted chat history unreadable. Set up " +
"Key Backup or export your room keys from another session before resetting your " +
"password.",
) }
</div>,
Expand Down Expand Up @@ -358,7 +358,7 @@ export default createReactClass({
return <div>
<p>{_t("Your password has been reset.")}</p>
<p>{_t(
"You have been logged out of all devices and will no longer receive " +
"You have been logged out of all sessions and will no longer receive " +
"push notifications. To re-enable notifications, sign in again on each " +
"device.",
)}</p>
Expand Down
8 changes: 4 additions & 4 deletions src/components/structures/auth/SoftLogout.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default class SoftLogout extends React.Component {
onFinished: (wipeData) => {
if (!wipeData) return;

console.log("Clearing data from soft-logged-out device");
console.log("Clearing data from soft-logged-out session");
Lifecycle.logout();
},
});
Expand Down Expand Up @@ -212,8 +212,8 @@ export default class SoftLogout extends React.Component {
let introText = null; // null is translated to something area specific in this function
if (this.state.keyBackupNeeded) {
introText = _t(
"Regain access to your account and recover encryption keys stored on this device. " +
"Without them, you won’t be able to read all of your secure messages on any device.");
"Regain access to your account and recover encryption keys stored in this session. " +
"Without them, you won’t be able to read all of your secure messages in any session.");
}

if (this.state.loginView === LOGIN_VIEW.PASSWORD) {
Expand Down Expand Up @@ -306,7 +306,7 @@ export default class SoftLogout extends React.Component {
<p>
{_t(
"Warning: Your personal data (including encryption keys) is still stored " +
"on this device. Clear it if you're finished using this device, or want to sign " +
"in this session. Clear it if you're finished using this session, or want to sign " +
"in to another account.",
)}
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/dialogs/ConfirmWipeDeviceDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export default class ConfirmWipeDeviceDialog extends React.Component {
return (
<BaseDialog className='mx_ConfirmWipeDeviceDialog' hasCancel={true}
onFinished={this.props.onFinished}
title={_t("Clear all data on this device?")}>
title={_t("Clear all data in this session?")}>
<div className='mx_ConfirmWipeDeviceDialog_content'>
<p>
{_t(
"Clearing all data from this device is permanent. Encrypted messages will be lost " +
"Clearing all data from this session is permanent. Encrypted messages will be lost " +
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
"unless their keys have been backed up.",
)}
</p>
Expand Down
18 changes: 9 additions & 9 deletions src/components/views/dialogs/DeviceVerifyDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default class DeviceVerifyDialog extends React.Component {
const BaseDialog = sdk.getComponent("dialogs.BaseDialog");
return (
<BaseDialog
title={_t("Verify device")}
title={_t("Verify session")}
onFinished={this._onCancelClick}
>
{body}
Expand Down Expand Up @@ -262,12 +262,12 @@ export default class DeviceVerifyDialog extends React.Component {

let text;
if (MatrixClientPeg.get().getUserId() === this.props.userId) {
text = _t("To verify that this device can be trusted, please check that the key you see " +
text = _t("To verify that this session can be trusted, please check that the key you see " +
"in User Settings on that device matches the key below:");
} else {
text = _t("To verify that this device can be trusted, please contact its owner using some other " +
text = _t("To verify that this session can be trusted, please contact its owner using some other " +
"means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings " +
"for this device matches the key below:");
"for this session matches the key below:");
}

const key = FormattingUtils.formatCryptoKey(this.props.device.getFingerprint());
Expand All @@ -283,22 +283,22 @@ export default class DeviceVerifyDialog extends React.Component {
</p>
<div className="mx_DeviceVerifyDialog_cryptoSection">
<ul>
<li><label>{ _t("Device name") }:</label> <span>{ this.props.device.getDisplayName() }</span></li>
<li><label>{ _t("Device ID") }:</label> <span><code>{ this.props.device.deviceId }</code></span></li>
<li><label>{ _t("Device key") }:</label> <span><code><b>{ key }</b></code></span></li>
<li><label>{ _t("Session name") }:</label> <span>{ this.props.device.getDisplayName() }</span></li>
<li><label>{ _t("Session ID") }:</label> <span><code>{ this.props.device.deviceId }</code></span></li>
<li><label>{ _t("Session key") }:</label> <span><code><b>{ key }</b></code></span></li>
</ul>
</div>
<p>
{ _t("If it matches, press the verify button below. " +
"If it doesn't, then someone else is intercepting this device " +
"If it doesn't, then someone else is intercepting this session " +
"and you probably want to press the blacklist button instead.") }
</p>
</div>
);

return (
<QuestionDialog
title={_t("Verify device")}
title={_t("Verify session")}
description={body}
button={_t("I verify that the keys match")}
onFinished={this._onLegacyFinished}
Expand Down
6 changes: 3 additions & 3 deletions src/components/views/dialogs/IncomingSasDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ export default class IncomingSasDialog extends React.Component {
"end-to-end encrypted messages.",
)}</p>
<p>{_t(
// NB. Below wording adjusted to singular 'device' until we have
// NB. Below wording adjusted to singular 'session' until we have
// cross-signing
"Verifying this user will mark their device as trusted, and " +
"also mark your device as trusted to them.",
"Verifying this user will mark their session as trusted, and " +
"also mark your session as trusted to them.",
)}</p>
<DialogButtons
primaryButton={_t('Continue')}
Expand Down
8 changes: 4 additions & 4 deletions src/components/views/dialogs/KeyShareDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default createReactClass({
const deviceInfo = r[userId][deviceId];

if (!deviceInfo) {
console.warn(`No details found for device ${userId}:${deviceId}`);
console.warn(`No details found for session ${userId}:${deviceId}`);

this.props.onFinished(false);
return;
Expand Down Expand Up @@ -121,10 +121,10 @@ export default createReactClass({

let text;
if (this.state.wasNewDevice) {
text = _td("You added a new device '%(displayName)s', which is"
text = _td("You added a new session '%(displayName)s', which is"
+ " requesting encryption keys.");
} else {
text = _td("Your unverified device '%(displayName)s' is requesting"
text = _td("Your unverified session '%(displayName)s' is requesting"
+ " encryption keys.");
}
text = _t(text, {displayName: displayName});
Expand Down Expand Up @@ -159,7 +159,7 @@ export default createReactClass({
} else {
content = (
<div id='mx_Dialog_content'>
<p>{ _t('Loading device info...') }</p>
<p>{ _t('Loading session info...') }</p>
<Spinner />
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/dialogs/LogoutDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class LogoutDialog extends React.Component {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
let setupButtonCaption;
if (this.state.backupInfo) {
setupButtonCaption = _t("Connect this device to Key Backup");
setupButtonCaption = _t("Connect this session to Key Backup");
} else {
// if there's an error fetching the backup info, we'll just assume there's
// no backup for the purpose of the button caption
Expand Down
Loading