Migrate more strings to translation keys (#11669)
This commit is contained in:
parent
0c6e56ca91
commit
5252361d1e
112 changed files with 4855 additions and 4542 deletions
|
@ -195,11 +195,9 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
|
||||
private deleteBackup = (): void => {
|
||||
Modal.createDialog(QuestionDialog, {
|
||||
title: _t("Delete Backup"),
|
||||
description: _t(
|
||||
"Are you sure? You will lose your encrypted messages if your keys are not backed up properly.",
|
||||
),
|
||||
button: _t("Delete Backup"),
|
||||
title: _t("settings|security|delete_backup"),
|
||||
description: _t("settings|security|delete_backup_confirm_description"),
|
||||
button: _t("settings|security|delete_backup"),
|
||||
danger: true,
|
||||
onFinished: (proceed) => {
|
||||
if (!proceed) return;
|
||||
|
@ -253,36 +251,30 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
if (error) {
|
||||
statusDescription = (
|
||||
<SettingsSubsectionText className="error">
|
||||
{_t("Unable to load key backup status")}
|
||||
{_t("settings|security|error_loading_key_backup_status")}
|
||||
</SettingsSubsectionText>
|
||||
);
|
||||
} else if (loading) {
|
||||
statusDescription = <Spinner />;
|
||||
} else if (backupInfo) {
|
||||
let restoreButtonCaption = _t("Restore from Backup");
|
||||
let restoreButtonCaption = _t("settings|security|restore_key_backup");
|
||||
|
||||
if (this.state.activeBackupVersion !== null) {
|
||||
statusDescription = (
|
||||
<SettingsSubsectionText>✅ {_t("This session is backing up your keys.")}</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>✅ {_t("settings|security|key_backup_active")}</SettingsSubsectionText>
|
||||
);
|
||||
} else {
|
||||
statusDescription = (
|
||||
<>
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"This session is <b>not backing up your keys</b>, but you do have an existing backup you can restore from and add to going forward.",
|
||||
{},
|
||||
{ b: (sub) => <b>{sub}</b> },
|
||||
)}
|
||||
{_t("settings|security|key_backup_inactive", {}, { b: (sub) => <b>{sub}</b> })}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"Connect this session to key backup before signing out to avoid losing any keys that may only be on this session.",
|
||||
)}
|
||||
{_t("settings|security|key_backup_connect_prompt")}
|
||||
</SettingsSubsectionText>
|
||||
</>
|
||||
);
|
||||
restoreButtonCaption = _t("Connect this session to Key Backup");
|
||||
restoreButtonCaption = _t("settings|security|key_backup_connect");
|
||||
}
|
||||
|
||||
let uploadStatus: ReactNode;
|
||||
|
@ -292,32 +284,33 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
} else if (sessionsRemaining > 0) {
|
||||
uploadStatus = (
|
||||
<div>
|
||||
{_t("Backing up %(sessionsRemaining)s keys…", { sessionsRemaining })} <br />
|
||||
{_t("settings|security|key_backup_in_progress", { sessionsRemaining })} <br />
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
uploadStatus = (
|
||||
<div>
|
||||
{_t("All keys backed up")} <br />
|
||||
{_t("settings|security|key_backup_complete")} <br />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
let trustedLocally: string | undefined;
|
||||
if (backupTrustInfo?.matchesDecryptionKey) {
|
||||
trustedLocally = _t("This backup can be restored on this session");
|
||||
trustedLocally = _t("settings|security|key_backup_can_be_restored");
|
||||
}
|
||||
|
||||
extraDetailsTableRows = (
|
||||
<>
|
||||
<tr>
|
||||
<th scope="row">{_t("Latest backup version on server:")}</th>
|
||||
<th scope="row">{_t("settings|security|key_backup_latest_version")}</th>
|
||||
<td>
|
||||
{backupInfo.version} ({_t("Algorithm:")} <code>{backupInfo.algorithm}</code>)
|
||||
{backupInfo.version} ({_t("settings|security|key_backup_algorithm")}{" "}
|
||||
<code>{backupInfo.algorithm}</code>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{_t("Active backup version:")}</th>
|
||||
<th scope="row">{_t("settings|security|key_backup_active_version")}</th>
|
||||
<td>{this.state.activeBackupVersion === null ? _t("None") : this.state.activeBackupVersion}</td>
|
||||
</tr>
|
||||
</>
|
||||
|
@ -339,7 +332,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
if (!isSecureBackupRequired(MatrixClientPeg.safeGet())) {
|
||||
actions.push(
|
||||
<AccessibleButton key="delete" kind="danger" onClick={this.deleteBackup}>
|
||||
{_t("Delete Backup")}
|
||||
{_t("settings|security|delete_backup")}
|
||||
</AccessibleButton>,
|
||||
);
|
||||
}
|
||||
|
@ -347,11 +340,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
statusDescription = (
|
||||
<>
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"Your keys are <b>not being backed up from this session</b>.",
|
||||
{},
|
||||
{ b: (sub) => <b>{sub}</b> },
|
||||
)}
|
||||
{_t("settings|security|key_backup_inactive_warning", {}, { b: (sub) => <b>{sub}</b> })}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Back up your keys before signing out to avoid losing them.")}
|
||||
|
@ -377,9 +366,9 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
if (backupKeyCached) {
|
||||
backupKeyWellFormedText = ", ";
|
||||
if (backupKeyWellFormed) {
|
||||
backupKeyWellFormedText += _t("well formed");
|
||||
backupKeyWellFormedText += _t("settings|security|backup_key_well_formed");
|
||||
} else {
|
||||
backupKeyWellFormedText += _t("unexpected type");
|
||||
backupKeyWellFormedText += _t("settings|security|backup_key_unexpected_type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -390,25 +379,21 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
|
||||
return (
|
||||
<>
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"Back up your encryption keys with your account data in case you lose access to your sessions. Your keys will be secured with a unique Security Key.",
|
||||
)}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>{_t("settings|security|backup_keys_description")}</SettingsSubsectionText>
|
||||
{statusDescription}
|
||||
<details>
|
||||
<summary>{_t("common|Advanced")}</summary>
|
||||
<summary>{_t("common|advanced")}</summary>
|
||||
<table className="mx_SecureBackupPanel_statusList">
|
||||
<tr>
|
||||
<th scope="row">{_t("Backup key stored:")}</th>
|
||||
<th scope="row">{_t("settings|security|backup_key_stored_status")}</th>
|
||||
<td>
|
||||
{backupKeyStored === true
|
||||
? _t("settings|security|cross_signing_in_4s")
|
||||
: _t("not stored")}
|
||||
: _t("settings|security|cross_signing_not_stored")}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{_t("Backup key cached:")}</th>
|
||||
<th scope="row">{_t("settings|security|backup_key_cached_status")}</th>
|
||||
<td>
|
||||
{backupKeyCached
|
||||
? _t("settings|security|cross_signing_cached")
|
||||
|
@ -417,16 +402,20 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{_t("Secret storage public key:")}</th>
|
||||
<th scope="row">{_t("settings|security|4s_public_key_status")}</th>
|
||||
<td>
|
||||
{secretStorageKeyInAccount
|
||||
? _t("in account data")
|
||||
? _t("settings|security|4s_public_key_in_account_data")
|
||||
: _t("settings|security|cross_signing_not_found")}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{_t("Secret storage:")}</th>
|
||||
<td>{secretStorageReady ? _t("ready") : _t("not ready")}</td>
|
||||
<th scope="row">{_t("settings|security|secret_storage_status")}</th>
|
||||
<td>
|
||||
{secretStorageReady
|
||||
? _t("settings|security|secret_storage_ready")
|
||||
: _t("settings|security|secret_storage_not_ready")}
|
||||
</td>
|
||||
</tr>
|
||||
{extraDetailsTableRows}
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue