Migrate more strings to translation keys (#11665)
This commit is contained in:
parent
de250df520
commit
54c88c57ed
127 changed files with 6797 additions and 5825 deletions
|
@ -184,33 +184,31 @@ export default class CrossSigningPanel extends React.PureComponent<{}, IState> {
|
|||
} else if (!homeserverSupportsCrossSigning) {
|
||||
summarisedStatus = (
|
||||
<SettingsSubsectionText data-testid="summarised-status">
|
||||
{_t("Your homeserver does not support cross-signing.")}
|
||||
{_t("encryption|cross_signing_unsupported")}
|
||||
</SettingsSubsectionText>
|
||||
);
|
||||
} else if (crossSigningReady && crossSigningPrivateKeysInStorage) {
|
||||
summarisedStatus = (
|
||||
<SettingsSubsectionText data-testid="summarised-status">
|
||||
✅ {_t("Cross-signing is ready for use.")}
|
||||
✅ {_t("encryption|cross_signing_ready")}
|
||||
</SettingsSubsectionText>
|
||||
);
|
||||
} else if (crossSigningReady && !crossSigningPrivateKeysInStorage) {
|
||||
summarisedStatus = (
|
||||
<SettingsSubsectionText data-testid="summarised-status">
|
||||
⚠️ {_t("Cross-signing is ready but keys are not backed up.")}
|
||||
⚠️ {_t("encryption|cross_signing_ready_no_backup")}
|
||||
</SettingsSubsectionText>
|
||||
);
|
||||
} else if (crossSigningPrivateKeysInStorage) {
|
||||
summarisedStatus = (
|
||||
<SettingsSubsectionText data-testid="summarised-status">
|
||||
{_t(
|
||||
"Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.",
|
||||
)}
|
||||
{_t("encryption|cross_signing_untrusted")}
|
||||
</SettingsSubsectionText>
|
||||
);
|
||||
} else {
|
||||
summarisedStatus = (
|
||||
<SettingsSubsectionText data-testid="summarised-status">
|
||||
{_t("Cross-signing is not set up.")}
|
||||
{_t("encryption|cross_signing_not_ready")}
|
||||
</SettingsSubsectionText>
|
||||
);
|
||||
}
|
||||
|
@ -232,9 +230,9 @@ export default class CrossSigningPanel extends React.PureComponent<{}, IState> {
|
|||
|
||||
// TODO: determine how better to expose this to users in addition to prompts at login/toast
|
||||
if (!keysExistEverywhere && homeserverSupportsCrossSigning) {
|
||||
let buttonCaption = _t("Set up Secure Backup");
|
||||
let buttonCaption = _t("encryption|set_up_toast_title");
|
||||
if (crossSigningPrivateKeysInStorage) {
|
||||
buttonCaption = _t("Verify this session");
|
||||
buttonCaption = _t("encryption|verify_toast_title");
|
||||
}
|
||||
actions.push(
|
||||
<AccessibleButton key="setup" kind="primary" onClick={this.onBootstrapClick}>
|
||||
|
@ -260,7 +258,7 @@ export default class CrossSigningPanel extends React.PureComponent<{}, IState> {
|
|||
<>
|
||||
{summarisedStatus}
|
||||
<details>
|
||||
<summary>{_t("Advanced")}</summary>
|
||||
<summary>{_t("common|Advanced")}</summary>
|
||||
<table className="mx_CrossSigningPanel_statusList">
|
||||
<tr>
|
||||
<th scope="row">{_t("settings|security|cross_signing_public_keys")}</th>
|
||||
|
|
|
@ -42,7 +42,7 @@ export default class CryptographyPanel extends React.Component<IProps, IState> {
|
|||
const deviceId = client.deviceId;
|
||||
let identityKey = client.getDeviceEd25519Key();
|
||||
if (!identityKey) {
|
||||
identityKey = _t("<not supported>");
|
||||
identityKey = _t("encryption|not_supported");
|
||||
} else {
|
||||
identityKey = FormattingUtils.formatCryptoKey(identityKey);
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@ const E2eAdvancedPanel: React.FC = () => {
|
|||
<SettingsSubsection heading={_t("settings|security|encryption_section")}>
|
||||
<SettingsFlag name={SETTING_MANUALLY_VERIFY_ALL_SESSIONS} level={SettingLevel.DEVICE} />
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.",
|
||||
)}
|
||||
{_t("settings|security|encryption_individual_verification_mode")}
|
||||
</SettingsSubsectionText>
|
||||
</SettingsSubsection>
|
||||
);
|
||||
|
|
|
@ -148,16 +148,13 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
|||
eventIndexingSettings = (
|
||||
<>
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.",
|
||||
{
|
||||
size: formatBytes(this.state.eventIndexSize, 0),
|
||||
// This drives the singular / plural string
|
||||
// selection for "room" / "rooms" only.
|
||||
count: this.state.roomCount,
|
||||
rooms: formatCountLong(this.state.roomCount),
|
||||
},
|
||||
)}
|
||||
{_t("settings|security|message_search_enabled", {
|
||||
size: formatBytes(this.state.eventIndexSize, 0),
|
||||
// This drives the singular / plural string
|
||||
// selection for "room" / "rooms" only.
|
||||
count: this.state.roomCount,
|
||||
rooms: formatCountLong(this.state.roomCount),
|
||||
})}
|
||||
</SettingsSubsectionText>
|
||||
<AccessibleButton kind="primary" onClick={this.onManage}>
|
||||
{_t("action|manage")}
|
||||
|
@ -167,9 +164,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
|||
} else if (!this.state.eventIndexingEnabled && EventIndexPeg.supportIsInstalled()) {
|
||||
eventIndexingSettings = (
|
||||
<>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Securely cache encrypted messages locally for them to appear in search results.")}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>{_t("settings|security|message_search_disabled")}</SettingsSubsectionText>
|
||||
<div>
|
||||
<AccessibleButton kind="primary" disabled={this.state.enabling} onClick={this.onEnable}>
|
||||
{_t("action|enable")}
|
||||
|
@ -187,7 +182,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
|||
eventIndexingSettings = (
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with <nativeLink>search components added</nativeLink>.",
|
||||
"settings|security|message_search_unsupported",
|
||||
{
|
||||
brand,
|
||||
},
|
||||
|
@ -205,7 +200,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
|||
eventIndexingSettings = (
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.",
|
||||
"settings|security|message_search_unsupported_web",
|
||||
{
|
||||
brand,
|
||||
},
|
||||
|
@ -227,12 +222,12 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
|||
eventIndexingSettings = (
|
||||
<>
|
||||
<SettingsSubsectionText>
|
||||
{this.state.enabling ? <InlineSpinner /> : _t("Message search initialisation failed")}
|
||||
{this.state.enabling ? <InlineSpinner /> : _t("settings|security|message_search_failed")}
|
||||
</SettingsSubsectionText>
|
||||
{EventIndexPeg.error && (
|
||||
<SettingsSubsectionText>
|
||||
<details>
|
||||
<summary>{_t("Advanced")}</summary>
|
||||
<summary>{_t("common|Advanced")}</summary>
|
||||
<code>
|
||||
{EventIndexPeg.error instanceof Error
|
||||
? EventIndexPeg.error.message
|
||||
|
|
|
@ -397,7 +397,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
</SettingsSubsectionText>
|
||||
{statusDescription}
|
||||
<details>
|
||||
<summary>{_t("Advanced")}</summary>
|
||||
<summary>{_t("common|Advanced")}</summary>
|
||||
<table className="mx_SecureBackupPanel_statusList">
|
||||
<tr>
|
||||
<th scope="row">{_t("Backup key stored:")}</th>
|
||||
|
|
|
@ -55,7 +55,7 @@ const FilteredDeviceListHeader: React.FC<Props> = ({
|
|||
<span className="mx_FilteredDeviceListHeader_label">
|
||||
{selectedDeviceCount > 0
|
||||
? _t("settings|sessions|n_sessions_selected", { count: selectedDeviceCount })
|
||||
: _t("Sessions")}
|
||||
: _t("settings|sessions|title")}
|
||||
</span>
|
||||
{children}
|
||||
</div>
|
||||
|
|
|
@ -119,7 +119,7 @@ export default function NotificationSettings2(): JSX.Element {
|
|||
)}
|
||||
</SettingsBanner>
|
||||
)}
|
||||
<SettingsSection heading={_t("Notifications")}>
|
||||
<SettingsSection heading={_t("notifications|enable_prompt_toast_title")}>
|
||||
<div className="mx_SettingsSubsection_content mx_NotificationSettings2_flags">
|
||||
<LabelledToggleSwitch
|
||||
label={_t("settings|notifications|enable_notifications_account")}
|
||||
|
|
|
@ -155,7 +155,7 @@ export default class AdvancedRoomSettingsTab extends React.Component<IProps, ISt
|
|||
|
||||
return (
|
||||
<SettingsTab>
|
||||
<SettingsSection heading={_t("Advanced")}>
|
||||
<SettingsSection heading={_t("common|Advanced")}>
|
||||
<SettingsSubsection heading={room.isSpaceRoom() ? _t("Space information") : _t("Room information")}>
|
||||
<div>
|
||||
<span>{_t("room_settings|advanced|room_id")}</span>
|
||||
|
|
|
@ -171,7 +171,7 @@ export default class NotificationsSettingsTab extends React.Component<IProps, IS
|
|||
|
||||
return (
|
||||
<SettingsTab>
|
||||
<SettingsSection heading={_t("Notifications")}>
|
||||
<SettingsSection heading={_t("notifications|enable_prompt_toast_title")}>
|
||||
<div className="mx_NotificationSettingsTab_notificationsSection">
|
||||
<StyledRadioGroup
|
||||
name="roomNotificationSetting"
|
||||
|
|
|
@ -322,7 +322,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
</SettingsSubsection>
|
||||
{this.renderLegal()}
|
||||
{this.renderCredits()}
|
||||
<SettingsSubsection heading={_t("Advanced")}>
|
||||
<SettingsSubsection heading={_t("common|Advanced")}>
|
||||
<SettingsSubsectionText>
|
||||
{_t(
|
||||
"setting|help_about|homeserver",
|
||||
|
|
|
@ -33,7 +33,7 @@ export default class NotificationUserSettingsTab extends React.Component {
|
|||
{newNotificationSettingsEnabled ? (
|
||||
<NotificationSettings2 />
|
||||
) : (
|
||||
<SettingsSection heading={_t("Notifications")}>
|
||||
<SettingsSection heading={_t("notifications|enable_prompt_toast_title")}>
|
||||
<Notifications />
|
||||
</SettingsSection>
|
||||
)}
|
||||
|
|
|
@ -252,21 +252,21 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
}
|
||||
|
||||
return (
|
||||
<SettingsSubsection heading={_t("Bulk options")}>
|
||||
<SettingsSubsection heading={_t("settings|security|bulk_options_section")}>
|
||||
<div className="mx_SecurityUserSettingsTab_bulkOptions">
|
||||
<AccessibleButton
|
||||
onClick={this.onAcceptAllInvitesClicked}
|
||||
kind="primary"
|
||||
disabled={this.state.managingInvites}
|
||||
>
|
||||
{_t("Accept all %(invitedRooms)s invites", { invitedRooms: invitedRoomIds.size })}
|
||||
{_t("settings|security|bulk_options_accept_all_invites", { invitedRooms: invitedRoomIds.size })}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton
|
||||
onClick={this.onRejectAllInvitesClicked}
|
||||
kind="danger"
|
||||
disabled={this.state.managingInvites}
|
||||
>
|
||||
{_t("Reject all %(invitedRooms)s invites", { invitedRooms: invitedRoomIds.size })}
|
||||
{_t("settings|security|bulk_options_reject_all_invites", { invitedRooms: invitedRoomIds.size })}
|
||||
</AccessibleButton>
|
||||
{this.state.managingInvites ? <InlineSpinner /> : <div />}
|
||||
</div>
|
||||
|
@ -282,7 +282,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
);
|
||||
|
||||
const eventIndex = (
|
||||
<SettingsSubsection heading={_t("Message search")}>
|
||||
<SettingsSubsection heading={_t("settings|security|message_search_section")}>
|
||||
<EventIndexPanel />
|
||||
</SettingsSubsection>
|
||||
);
|
||||
|
@ -331,7 +331,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
<SettingsFlag name="pseudonymousAnalyticsOptIn" level={SettingLevel.ACCOUNT} />
|
||||
)}
|
||||
</SettingsSubsection>
|
||||
<SettingsSubsection heading={_t("Sessions")}>
|
||||
<SettingsSubsection heading={_t("settings|sessions|title")}>
|
||||
<SettingsFlag name="deviceClientInformationOptIn" level={SettingLevel.ACCOUNT} />
|
||||
</SettingsSubsection>
|
||||
</SettingsSection>
|
||||
|
@ -346,7 +346,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
// only show the section if there's something to show
|
||||
if (ignoreUsersPanel || invitesPanel || e2ePanel) {
|
||||
advancedSection = (
|
||||
<SettingsSection heading={_t("Advanced")}>
|
||||
<SettingsSection heading={_t("common|Advanced")}>
|
||||
{ignoreUsersPanel}
|
||||
{invitesPanel}
|
||||
{e2ePanel}
|
||||
|
|
|
@ -48,7 +48,7 @@ const confirmSignOut = async (sessionsToSignOutCount: number): Promise<boolean>
|
|||
description: (
|
||||
<div>
|
||||
<p>
|
||||
{_t("Are you sure you want to sign out of %(count)s sessions?", {
|
||||
{_t("settings|sessions|sign_out_confirm_description", {
|
||||
count: sessionsToSignOutCount,
|
||||
})}
|
||||
</p>
|
||||
|
@ -275,7 +275,7 @@ const SessionManagerTab: React.FC = () => {
|
|||
|
||||
return (
|
||||
<SettingsTab>
|
||||
<SettingsSection heading={_t("Sessions")}>
|
||||
<SettingsSection heading={_t("settings|sessions|title")}>
|
||||
<SecurityRecommendations
|
||||
devices={devices}
|
||||
goToFilteredList={onGoToFilteredList}
|
||||
|
|
|
@ -64,9 +64,9 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
|
||||
return (
|
||||
<SettingsTab>
|
||||
<SettingsSection heading={_t("Sidebar")}>
|
||||
<SettingsSection heading={_t("settings|sidebar|title")}>
|
||||
<SettingsSubsection
|
||||
heading={_t("Spaces to show")}
|
||||
heading={_t("settings|sidebar|metaspaces_subsection")}
|
||||
description={_t(
|
||||
"Spaces are ways to group rooms and people. Alongside the spaces you're in, you can use some pre-built ones too.",
|
||||
)}
|
||||
|
@ -82,7 +82,7 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
{_t("common|home")}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Home is useful for getting an overview of everything.")}
|
||||
{_t("settings|sidebar|metaspaces_home_description")}
|
||||
</SettingsSubsectionText>
|
||||
</StyledCheckbox>
|
||||
|
||||
|
@ -95,7 +95,7 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
>
|
||||
<SettingsSubsectionText>{_t("Show all rooms")}</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Show all your rooms in Home, even if they're in a space.")}
|
||||
{_t("settings|sidebar|metaspaces_home_all_rooms")}
|
||||
</SettingsSubsectionText>
|
||||
</StyledCheckbox>
|
||||
|
||||
|
@ -109,7 +109,7 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
{_t("common|favourites")}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Group all your favourite rooms and people in one place.")}
|
||||
{_t("settings|sidebar|metaspaces_favourites_description")}
|
||||
</SettingsSubsectionText>
|
||||
</StyledCheckbox>
|
||||
|
||||
|
@ -122,7 +122,9 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
<MembersIcon />
|
||||
{_t("common|people")}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>{_t("Group all your people in one place.")}</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("settings|sidebar|metaspaces_people_description")}
|
||||
</SettingsSubsectionText>
|
||||
</StyledCheckbox>
|
||||
|
||||
<StyledCheckbox
|
||||
|
@ -132,10 +134,10 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
>
|
||||
<SettingsSubsectionText>
|
||||
<HashCircleIcon />
|
||||
{_t("Rooms outside of a space")}
|
||||
{_t("settings|sidebar|metaspaces_orphans")}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Group all your rooms that aren't part of a space in one place.")}
|
||||
{_t("settings|sidebar|metaspaces_orphans_description")}
|
||||
</SettingsSubsectionText>
|
||||
</StyledCheckbox>
|
||||
</SettingsSubsection>
|
||||
|
|
|
@ -200,7 +200,7 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
|
|||
</SettingsSubsection>
|
||||
</SettingsSection>
|
||||
|
||||
<SettingsSection heading={_t("Advanced")}>
|
||||
<SettingsSection heading={_t("common|Advanced")}>
|
||||
<SettingsSubsection heading={_t("Voice processing")}>
|
||||
<LabelledToggleSwitch
|
||||
value={this.state.audioNoiseSuppression}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue