Migrate more strings to translation keys (#11637)
This commit is contained in:
parent
fc9caa3269
commit
d77b871769
107 changed files with 7689 additions and 6497 deletions
|
@ -68,7 +68,7 @@ const CurrentDeviceSectionHeading: React.FC<CurrentDeviceSectionHeadingProps> =
|
|||
? [
|
||||
<IconizedContextMenuOption
|
||||
key="sign-out-all-others"
|
||||
label={_t("Sign out of all other sessions (%(otherSessionsCount)s)", { otherSessionsCount })}
|
||||
label={_t("settings|sessions|sign_out_all_other_sessions", { otherSessionsCount })}
|
||||
onClick={signOutAllOtherSessions}
|
||||
isDestructive
|
||||
/>,
|
||||
|
@ -76,7 +76,7 @@ const CurrentDeviceSectionHeading: React.FC<CurrentDeviceSectionHeadingProps> =
|
|||
: []),
|
||||
];
|
||||
return (
|
||||
<SettingsSubsectionHeading heading={_t("Current session")}>
|
||||
<SettingsSubsectionHeading heading={_t("settings|sessions|current_session")}>
|
||||
<KebabContextMenu
|
||||
disabled={disabled}
|
||||
title={_t("common|options")}
|
||||
|
|
|
@ -60,7 +60,7 @@ const DeviceNameEditor: React.FC<Props & { stopEditing: () => void }> = ({ devic
|
|||
return (
|
||||
<form aria-disabled={isLoading} className="mx_DeviceDetailHeading_renameForm" onSubmit={onSubmit} method="post">
|
||||
<p id={headingId} className="mx_DeviceDetailHeading_renameFormHeading">
|
||||
{_t("Rename session")}
|
||||
{_t("settings|sessions|rename_form_heading")}
|
||||
</p>
|
||||
<div>
|
||||
<Field
|
||||
|
@ -77,21 +77,13 @@ const DeviceNameEditor: React.FC<Props & { stopEditing: () => void }> = ({ devic
|
|||
maxLength={100}
|
||||
/>
|
||||
<Caption id={descriptionId}>
|
||||
{_t("Please be aware that session names are also visible to people you communicate with.")}
|
||||
{_t("settings|sessions|rename_form_caption")}
|
||||
<LearnMore
|
||||
title={_t("Renaming sessions")}
|
||||
title={_t("settings|sessions|rename_form_learn_more")}
|
||||
description={
|
||||
<>
|
||||
<p>
|
||||
{_t(
|
||||
"Other users in direct messages and rooms that you join are able to view a full list of your sessions.",
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"This provides them with confidence that they are really speaking to you, but it also means they can see the session name you enter here.",
|
||||
)}
|
||||
</p>
|
||||
<p>{_t("settings|sessions|rename_form_learn_more_description_1")}</p>
|
||||
<p>{_t("settings|sessions|rename_form_learn_more_description_2")}</p>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
|
|
@ -64,9 +64,9 @@ const DeviceDetails: React.FC<Props> = ({
|
|||
{
|
||||
id: "session",
|
||||
values: [
|
||||
{ label: _t("Session ID"), value: device.device_id },
|
||||
{ label: _t("settings|sessions|session_id"), value: device.device_id },
|
||||
{
|
||||
label: _t("Last activity"),
|
||||
label: _t("settings|sessions|last_activity"),
|
||||
value: device.last_seen_ts && formatDate(new Date(device.last_seen_ts)),
|
||||
},
|
||||
],
|
||||
|
@ -77,7 +77,7 @@ const DeviceDetails: React.FC<Props> = ({
|
|||
values: [
|
||||
{ label: _t("common|name"), value: device.appName },
|
||||
{ label: _t("common|version"), value: device.appVersion },
|
||||
{ label: _t("URL"), value: device.url },
|
||||
{ label: _t("settings|sessions|url"), value: device.url },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -85,9 +85,9 @@ const DeviceDetails: React.FC<Props> = ({
|
|||
heading: _t("common|device"),
|
||||
values: [
|
||||
{ label: _t("common|model"), value: device.deviceModel },
|
||||
{ label: _t("Operating system"), value: device.deviceOperatingSystem },
|
||||
{ label: _t("Browser"), value: device.client },
|
||||
{ label: _t("IP address"), value: device.last_seen_ip },
|
||||
{ label: _t("settings|sessions|os"), value: device.deviceOperatingSystem },
|
||||
{ label: _t("settings|sessions|browser"), value: device.client },
|
||||
{ label: _t("settings|sessions|ip"), value: device.last_seen_ip },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
@ -122,7 +122,7 @@ const DeviceDetails: React.FC<Props> = ({
|
|||
<DeviceVerificationStatusCard device={device} onVerifyDevice={onVerifyDevice} isCurrentDevice />
|
||||
</section>
|
||||
<section className="mx_DeviceDetails_section">
|
||||
<p className="mx_DeviceDetails_sectionHeading">{_t("Session details")}</p>
|
||||
<p className="mx_DeviceDetails_sectionHeading">{_t("settings|sessions|details_heading")}</p>
|
||||
{metadata.map(({ heading, values, id }, index) => (
|
||||
<table
|
||||
className="mx_DeviceDetails_metadataTable"
|
||||
|
@ -158,13 +158,13 @@ const DeviceDetails: React.FC<Props> = ({
|
|||
checked={isPushNotificationsEnabled(pusher, localNotificationSettings)}
|
||||
disabled={isCheckboxDisabled(pusher, localNotificationSettings)}
|
||||
onChange={(checked) => setPushNotifications?.(device.device_id, checked)}
|
||||
title={_t("Toggle push notifications on this session.")}
|
||||
title={_t("settings|sessions|push_toggle")}
|
||||
data-testid="device-detail-push-notification-checkbox"
|
||||
/>
|
||||
<p className="mx_DeviceDetails_sectionHeading">
|
||||
{_t("Push notifications")}
|
||||
{_t("settings|sessions|push_heading")}
|
||||
<small className="mx_DeviceDetails_sectionSubheading">
|
||||
{_t("Receive push notifications on this session.")}
|
||||
{_t("settings|sessions|push_subheading")}
|
||||
</small>
|
||||
</p>
|
||||
</section>
|
||||
|
@ -177,7 +177,7 @@ const DeviceDetails: React.FC<Props> = ({
|
|||
data-testid="device-detail-sign-out-cta"
|
||||
>
|
||||
<span className="mx_DeviceDetails_signOutButtonContent">
|
||||
{_t("Sign out of this session")}
|
||||
{_t("settings|sessions|sign_out")}
|
||||
{isSigningOut && <Spinner w={16} h={16} />}
|
||||
</span>
|
||||
</AccessibleButton>
|
||||
|
|
|
@ -27,7 +27,7 @@ interface Props extends React.ComponentProps<typeof AccessibleTooltipButton> {
|
|||
}
|
||||
|
||||
export const DeviceExpandDetailsButton: React.FC<Props> = ({ isExpanded, onClick, ...rest }) => {
|
||||
const label = isExpanded ? _t("Hide details") : _t("Show details");
|
||||
const label = isExpanded ? _t("settings|sessions|hide_details") : _t("settings|sessions|show_details");
|
||||
return (
|
||||
<AccessibleTooltipButton
|
||||
{...rest}
|
||||
|
|
|
@ -50,7 +50,7 @@ const getInactiveMetadata = (device: ExtendedDevice): { id: string; value: React
|
|||
value: (
|
||||
<>
|
||||
<InactiveIcon className="mx_DeviceTile_inactiveIcon" />
|
||||
{_t("Inactive for %(inactiveAgeDays)s+ days", { inactiveAgeDays: INACTIVE_DEVICE_AGE_DAYS }) +
|
||||
{_t("settings|sessions|inactive_days", { inactiveAgeDays: INACTIVE_DEVICE_AGE_DAYS }) +
|
||||
` (${formatLastActivity(device.last_seen_ts)})`}
|
||||
</>
|
||||
),
|
||||
|
@ -62,7 +62,8 @@ const DeviceMetaDatum: React.FC<{ value: string | React.ReactNode; id: string }>
|
|||
|
||||
export const DeviceMetaData: React.FC<Props> = ({ device }) => {
|
||||
const inactive = getInactiveMetadata(device);
|
||||
const lastActivity = device.last_seen_ts && `${_t("Last activity")} ${formatLastActivity(device.last_seen_ts)}`;
|
||||
const lastActivity =
|
||||
device.last_seen_ts && `${_t("settings|sessions|last_activity")} ${formatLastActivity(device.last_seen_ts)}`;
|
||||
const verificationStatus = device.isVerified ? _t("common|verified") : _t("common|unverified");
|
||||
// if device is inactive, don't display last activity or verificationStatus
|
||||
const metadata = inactive
|
||||
|
|
|
@ -32,73 +32,41 @@ const securityCardContent: Record<
|
|||
}
|
||||
> = {
|
||||
[DeviceSecurityVariation.Verified]: {
|
||||
title: _t("Verified sessions"),
|
||||
title: _t("settings|sessions|verified_sessions"),
|
||||
description: (
|
||||
<>
|
||||
<p>
|
||||
{_t(
|
||||
"Verified sessions are anywhere you are using this account after entering your passphrase or confirming your identity with another verified session.",
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"This means that you have all the keys needed to unlock your encrypted messages and confirm to other users that you trust this session.",
|
||||
)}
|
||||
</p>
|
||||
<p>{_t("settings|sessions|verified_sessions_explainer_1")}</p>
|
||||
<p>{_t("settings|sessions|verified_sessions_explainer_2")}</p>
|
||||
</>
|
||||
),
|
||||
},
|
||||
[DeviceSecurityVariation.Unverified]: {
|
||||
title: _t("Unverified sessions"),
|
||||
title: _t("settings|sessions|unverified_sessions"),
|
||||
description: (
|
||||
<>
|
||||
<p>
|
||||
{_t(
|
||||
"Unverified sessions are sessions that have logged in with your credentials but have not been cross-verified.",
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"You should make especially certain that you recognise these sessions as they could represent an unauthorised use of your account.",
|
||||
)}
|
||||
</p>
|
||||
<p>{_t("settings|sessions|unverified_sessions_explainer_1")}</p>
|
||||
<p>{_t("settings|sessions|unverified_sessions_explainer_2")}</p>
|
||||
</>
|
||||
),
|
||||
},
|
||||
// unverifiable uses single-session case
|
||||
// because it is only ever displayed on a single session detail
|
||||
[DeviceSecurityVariation.Unverifiable]: {
|
||||
title: _t("Unverified session"),
|
||||
title: _t("settings|sessions|unverified_session"),
|
||||
description: (
|
||||
<>
|
||||
<p>{_t(`This session doesn't support encryption and thus can't be verified.`)}</p>
|
||||
<p>
|
||||
{_t(
|
||||
`You won't be able to participate in rooms where encryption is enabled when using this session.`,
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
`For best security and privacy, it is recommended to use Matrix clients that support encryption.`,
|
||||
)}
|
||||
</p>
|
||||
<p>{_t("settings|sessions|unverified_session_explainer_1")}</p>
|
||||
<p>{_t("settings|sessions|unverified_session_explainer_2")}</p>
|
||||
<p>{_t("settings|sessions|unverified_session_explainer_3")}</p>
|
||||
</>
|
||||
),
|
||||
},
|
||||
[DeviceSecurityVariation.Inactive]: {
|
||||
title: _t("Inactive sessions"),
|
||||
title: _t("settings|sessions|inactive_sessions"),
|
||||
description: (
|
||||
<>
|
||||
<p>
|
||||
{_t(
|
||||
"Inactive sessions are sessions you have not used in some time, but they continue to receive encryption keys.",
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t(
|
||||
"Removing inactive sessions improves security and performance, and makes it easier for you to identify if a new session is suspicious.",
|
||||
)}
|
||||
</p>
|
||||
<p>{_t("settings|sessions|inactive_sessions_explainer_1")}</p>
|
||||
<p>{_t("settings|sessions|inactive_sessions_explainer_2")}</p>
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
|
|
@ -23,7 +23,7 @@ import { Icon as WebIcon } from "../../../../../res/img/element-icons/settings/w
|
|||
import { Icon as MobileIcon } from "../../../../../res/img/element-icons/settings/mobile.svg";
|
||||
import { Icon as VerifiedIcon } from "../../../../../res/img/e2e/verified.svg";
|
||||
import { Icon as UnverifiedIcon } from "../../../../../res/img/e2e/warning.svg";
|
||||
import { _t } from "../../../../languageHandler";
|
||||
import { _t, _td, TranslationKey } from "../../../../languageHandler";
|
||||
import { ExtendedDevice } from "./types";
|
||||
import { DeviceType } from "../../../../utils/device/parseUserAgent";
|
||||
|
||||
|
@ -39,16 +39,16 @@ const deviceTypeIcon: Record<DeviceType, React.FC<React.SVGProps<SVGSVGElement>>
|
|||
[DeviceType.Web]: WebIcon,
|
||||
[DeviceType.Unknown]: UnknownDeviceIcon,
|
||||
};
|
||||
const deviceTypeLabel: Record<DeviceType, string> = {
|
||||
[DeviceType.Desktop]: _t("Desktop session"),
|
||||
[DeviceType.Mobile]: _t("Mobile session"),
|
||||
[DeviceType.Web]: _t("Web session"),
|
||||
[DeviceType.Unknown]: _t("Unknown session type"),
|
||||
const deviceTypeLabel: Record<DeviceType, TranslationKey> = {
|
||||
[DeviceType.Desktop]: _td("settings|sessions|desktop_session"),
|
||||
[DeviceType.Mobile]: _td("settings|sessions|mobile_session"),
|
||||
[DeviceType.Web]: _td("settings|sessions|web_session"),
|
||||
[DeviceType.Unknown]: _td("settings|sessions|unknown_session"),
|
||||
};
|
||||
|
||||
export const DeviceTypeIcon: React.FC<Props> = ({ isVerified, isSelected, deviceType }) => {
|
||||
const Icon = deviceTypeIcon[deviceType!] || deviceTypeIcon[DeviceType.Unknown];
|
||||
const label = deviceTypeLabel[deviceType!] || deviceTypeLabel[DeviceType.Unknown];
|
||||
const label = _t(deviceTypeLabel[deviceType!] || deviceTypeLabel[DeviceType.Unknown]);
|
||||
return (
|
||||
<div
|
||||
className={classNames("mx_DeviceTypeIcon", {
|
||||
|
|
|
@ -38,11 +38,11 @@ const getCardProps = (
|
|||
} => {
|
||||
if (device.isVerified) {
|
||||
const descriptionText = isCurrentDevice
|
||||
? _t("Your current session is ready for secure messaging.")
|
||||
: _t("This session is ready for secure messaging.");
|
||||
? _t("settings|sessions|device_verified_description_current")
|
||||
: _t("settings|sessions|device_verified_description");
|
||||
return {
|
||||
variation: DeviceSecurityVariation.Verified,
|
||||
heading: _t("Verified session"),
|
||||
heading: _t("settings|sessions|verified_session"),
|
||||
description: (
|
||||
<>
|
||||
{descriptionText}
|
||||
|
@ -54,10 +54,10 @@ const getCardProps = (
|
|||
if (device.isVerified === null) {
|
||||
return {
|
||||
variation: DeviceSecurityVariation.Unverified,
|
||||
heading: _t("Unverified session"),
|
||||
heading: _t("settings|sessions|unverified_session"),
|
||||
description: (
|
||||
<>
|
||||
{_t(`This session doesn't support encryption and thus can't be verified.`)}
|
||||
{_t("settings|sessions|unverified_session_explainer_1")}
|
||||
<DeviceSecurityLearnMore variation={DeviceSecurityVariation.Unverifiable} />
|
||||
</>
|
||||
),
|
||||
|
@ -65,11 +65,11 @@ const getCardProps = (
|
|||
}
|
||||
|
||||
const descriptionText = isCurrentDevice
|
||||
? _t("Verify your current session for enhanced secure messaging.")
|
||||
: _t("Verify or sign out from this session for best security and reliability.");
|
||||
? _t("settings|sessions|device_unverified_description_current")
|
||||
: _t("settings|sessions|device_unverified_description");
|
||||
return {
|
||||
variation: DeviceSecurityVariation.Unverified,
|
||||
heading: _t("Unverified session"),
|
||||
heading: _t("settings|sessions|unverified_session"),
|
||||
description: (
|
||||
<>
|
||||
{descriptionText}
|
||||
|
@ -95,7 +95,7 @@ export const DeviceVerificationStatusCard: React.FC<DeviceVerificationStatusCard
|
|||
onClick={onVerifyDevice}
|
||||
data-testid={`verification-status-button-${device.device_id}`}
|
||||
>
|
||||
{_t("Verify session")}
|
||||
{_t("settings|sessions|verify_session")}
|
||||
</AccessibleButton>
|
||||
)}
|
||||
</DeviceSecurityCard>
|
||||
|
|
|
@ -73,36 +73,6 @@ const getFilteredSortedDevices = (devices: DevicesDictionary, filter?: FilterVar
|
|||
const ALL_FILTER_ID = "ALL";
|
||||
type DeviceFilterKey = FilterVariation | typeof ALL_FILTER_ID;
|
||||
|
||||
const securityCardContent: Record<
|
||||
DeviceSecurityVariation,
|
||||
{
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
||||
> = {
|
||||
[DeviceSecurityVariation.Verified]: {
|
||||
title: _t("Verified sessions"),
|
||||
description: _t("For best security, sign out from any session that you don't recognize or use anymore."),
|
||||
},
|
||||
[DeviceSecurityVariation.Unverified]: {
|
||||
title: _t("Unverified sessions"),
|
||||
description: _t(
|
||||
"Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.",
|
||||
),
|
||||
},
|
||||
[DeviceSecurityVariation.Unverifiable]: {
|
||||
title: _t("Unverified session"),
|
||||
description: _t(`This session doesn't support encryption and thus can't be verified.`),
|
||||
},
|
||||
[DeviceSecurityVariation.Inactive]: {
|
||||
title: _t("Inactive sessions"),
|
||||
description: _t(
|
||||
"Consider signing out from old sessions (%(inactiveAgeDays)s days or older) you don't use anymore.",
|
||||
{ inactiveAgeDays: INACTIVE_DEVICE_AGE_DAYS },
|
||||
),
|
||||
},
|
||||
};
|
||||
|
||||
const isSecurityVariation = (filter?: DeviceFilterKey): filter is FilterVariation =>
|
||||
!!filter &&
|
||||
(
|
||||
|
@ -115,6 +85,33 @@ const isSecurityVariation = (filter?: DeviceFilterKey): filter is FilterVariatio
|
|||
|
||||
const FilterSecurityCard: React.FC<{ filter?: DeviceFilterKey }> = ({ filter }) => {
|
||||
if (isSecurityVariation(filter)) {
|
||||
const securityCardContent: Record<
|
||||
DeviceSecurityVariation,
|
||||
{
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
||||
> = {
|
||||
[DeviceSecurityVariation.Verified]: {
|
||||
title: _t("settings|sessions|verified_sessions"),
|
||||
description: _t("settings|sessions|verified_sessions_list_description"),
|
||||
},
|
||||
[DeviceSecurityVariation.Unverified]: {
|
||||
title: _t("settings|sessions|unverified_sessions"),
|
||||
description: _t("settings|sessions|unverified_sessions_list_description"),
|
||||
},
|
||||
[DeviceSecurityVariation.Unverifiable]: {
|
||||
title: _t("settings|sessions|unverified_session"),
|
||||
description: _t("settings|sessions|unverified_session_explainer_1"),
|
||||
},
|
||||
[DeviceSecurityVariation.Inactive]: {
|
||||
title: _t("settings|sessions|inactive_sessions"),
|
||||
description: _t("settings|sessions|inactive_sessions_list_description", {
|
||||
inactiveAgeDays: INACTIVE_DEVICE_AGE_DAYS,
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
const { title, description } = securityCardContent[filter];
|
||||
return (
|
||||
<div className="mx_FilteredDeviceList_securityCard">
|
||||
|
@ -138,13 +135,13 @@ const FilterSecurityCard: React.FC<{ filter?: DeviceFilterKey }> = ({ filter })
|
|||
const getNoResultsMessage = (filter?: FilterVariation): string => {
|
||||
switch (filter) {
|
||||
case DeviceSecurityVariation.Verified:
|
||||
return _t("No verified sessions found.");
|
||||
return _t("settings|sessions|no_verified_sessions");
|
||||
case DeviceSecurityVariation.Unverified:
|
||||
return _t("No unverified sessions found.");
|
||||
return _t("settings|sessions|no_unverified_sessions");
|
||||
case DeviceSecurityVariation.Inactive:
|
||||
return _t("No inactive sessions found.");
|
||||
return _t("settings|sessions|no_inactive_sessions");
|
||||
default:
|
||||
return _t("No sessions found.");
|
||||
return _t("settings|sessions|no_sessions");
|
||||
}
|
||||
};
|
||||
interface NoResultsProps {
|
||||
|
@ -281,21 +278,21 @@ export const FilteredDeviceList = forwardRef(
|
|||
};
|
||||
|
||||
const options: FilterDropdownOption<DeviceFilterKey>[] = [
|
||||
{ id: ALL_FILTER_ID, label: _t("All") },
|
||||
{ id: ALL_FILTER_ID, label: _t("settings|sessions|filter_all") },
|
||||
{
|
||||
id: DeviceSecurityVariation.Verified,
|
||||
label: _t("common|verified"),
|
||||
description: _t("Ready for secure messaging"),
|
||||
description: _t("settings|sessions|filter_verified_description"),
|
||||
},
|
||||
{
|
||||
id: DeviceSecurityVariation.Unverified,
|
||||
label: _t("common|unverified"),
|
||||
description: _t("Not ready for secure messaging"),
|
||||
description: _t("settings|sessions|filter_unverified_description"),
|
||||
},
|
||||
{
|
||||
id: DeviceSecurityVariation.Inactive,
|
||||
label: _t("Inactive"),
|
||||
description: _t("Inactive for %(inactiveAgeDays)s days or longer", {
|
||||
label: _t("settings|sessions|filter_inactive"),
|
||||
description: _t("settings|sessions|filter_inactive_description", {
|
||||
inactiveAgeDays: INACTIVE_DEVICE_AGE_DAYS,
|
||||
}),
|
||||
},
|
||||
|
@ -349,7 +346,7 @@ export const FilteredDeviceList = forwardRef(
|
|||
) : (
|
||||
<FilterDropdown<DeviceFilterKey>
|
||||
id="device-list-filter"
|
||||
label={_t("Filter devices")}
|
||||
label={_t("settings|sessions|filter_label")}
|
||||
value={filter || ALL_FILTER_ID}
|
||||
onOptionChange={onFilterOptionChange}
|
||||
options={options}
|
||||
|
|
|
@ -37,7 +37,7 @@ const FilteredDeviceListHeader: React.FC<Props> = ({
|
|||
children,
|
||||
...rest
|
||||
}) => {
|
||||
const checkboxLabel = isAllSelected ? _t("Deselect all") : _t("Select all");
|
||||
const checkboxLabel = isAllSelected ? _t("common|deselect_all") : _t("common|select_all");
|
||||
return (
|
||||
<div className="mx_FilteredDeviceListHeader" {...rest}>
|
||||
{!isSelectDisabled && (
|
||||
|
@ -54,7 +54,7 @@ const FilteredDeviceListHeader: React.FC<Props> = ({
|
|||
)}
|
||||
<span className="mx_FilteredDeviceListHeader_label">
|
||||
{selectedDeviceCount > 0
|
||||
? _t("%(count)s sessions selected", { count: selectedDeviceCount })
|
||||
? _t("settings|sessions|n_sessions_selected", { count: selectedDeviceCount })
|
||||
: _t("Sessions")}
|
||||
</span>
|
||||
{children}
|
||||
|
|
|
@ -52,15 +52,13 @@ export default class LoginWithQRSection extends React.Component<IProps> {
|
|||
}
|
||||
|
||||
return (
|
||||
<SettingsSubsection heading={_t("Sign in with QR code")}>
|
||||
<SettingsSubsection heading={_t("settings|sessions|sign_in_with_qr")}>
|
||||
<div className="mx_LoginWithQRSection">
|
||||
<p className="mx_SettingsTab_subsectionText">
|
||||
{_t(
|
||||
"You can use this device to sign in a new device with a QR code. You will need to scan the QR code shown on this device with your device that's signed out.",
|
||||
)}
|
||||
{_t("settings|sessions|sign_in_with_qr_description")}
|
||||
</p>
|
||||
<AccessibleButton onClick={this.props.onShowQr} kind="primary">
|
||||
{_t("Show QR code")}
|
||||
{_t("settings|sessions|sign_in_with_qr_button")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
</SettingsSubsection>
|
||||
|
|
|
@ -41,14 +41,14 @@ export const OtherSessionsSectionHeading: React.FC<Props> = ({
|
|||
signOutAllOtherSessions ? (
|
||||
<IconizedContextMenuOption
|
||||
key="sign-out-all-others"
|
||||
label={_t("Sign out of %(count)s sessions", { count: otherSessionsCount })}
|
||||
label={_t("settings|sessions|sign_out_n_sessions", { count: otherSessionsCount })}
|
||||
onClick={signOutAllOtherSessions}
|
||||
isDestructive
|
||||
/>
|
||||
) : null,
|
||||
]);
|
||||
return (
|
||||
<SettingsSubsectionHeading heading={_t("Other sessions")}>
|
||||
<SettingsSubsectionHeading heading={_t("settings|sessions|other_sessions_heading")}>
|
||||
{!!menuOptions.length && (
|
||||
<KebabContextMenu
|
||||
disabled={disabled}
|
||||
|
|
|
@ -52,19 +52,17 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
|
|||
|
||||
return (
|
||||
<SettingsSubsection
|
||||
heading={_t("Security recommendations")}
|
||||
description={_t("Improve your account security by following these recommendations.")}
|
||||
heading={_t("settings|sessions|security_recommendations")}
|
||||
description={_t("settings|sessions|security_recommendations_description")}
|
||||
data-testid="security-recommendations-section"
|
||||
>
|
||||
{!!unverifiedDevicesCount && (
|
||||
<DeviceSecurityCard
|
||||
variation={DeviceSecurityVariation.Unverified}
|
||||
heading={_t("Unverified sessions")}
|
||||
heading={_t("settings|sessions|unverified_sessions")}
|
||||
description={
|
||||
<>
|
||||
{_t(
|
||||
"Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.",
|
||||
)}
|
||||
{_t("settings|sessions|unverified_sessions_list_description")}
|
||||
<DeviceSecurityLearnMore variation={DeviceSecurityVariation.Unverified} />
|
||||
</>
|
||||
}
|
||||
|
@ -83,13 +81,10 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
|
|||
{!!unverifiedDevicesCount && <div className="mx_SecurityRecommendations_spacing" />}
|
||||
<DeviceSecurityCard
|
||||
variation={DeviceSecurityVariation.Inactive}
|
||||
heading={_t("Inactive sessions")}
|
||||
heading={_t("settings|sessions|inactive_sessions")}
|
||||
description={
|
||||
<>
|
||||
{_t(
|
||||
"Consider signing out from old sessions (%(inactiveAgeDays)s days or older) you don't use anymore.",
|
||||
{ inactiveAgeDays },
|
||||
)}
|
||||
{_t("settings|sessions|inactive_sessions_list_description", { inactiveAgeDays })}
|
||||
<DeviceSecurityLearnMore variation={DeviceSecurityVariation.Inactive} />
|
||||
</>
|
||||
}
|
||||
|
|
|
@ -53,20 +53,20 @@ export const deleteDevicesWithInteractiveAuth = async (
|
|||
const dialogAesthetics = {
|
||||
[SSOAuthEntry.PHASE_PREAUTH]: {
|
||||
title: _t("Use Single Sign On to continue"),
|
||||
body: _t("Confirm logging out these devices by using Single Sign On to prove your identity.", {
|
||||
body: _t("settings|sessions|confirm_sign_out_sso", {
|
||||
count: numDevices,
|
||||
}),
|
||||
continueText: _t("auth|sso"),
|
||||
continueKind: "primary",
|
||||
},
|
||||
[SSOAuthEntry.PHASE_POSTAUTH]: {
|
||||
title: _t("Confirm signing out these devices", {
|
||||
title: _t("settings|sessions|confirm_sign_out", {
|
||||
count: numDevices,
|
||||
}),
|
||||
body: _t("Click the button below to confirm signing out these devices.", {
|
||||
body: _t("settings|sessions|confirm_sign_out_body", {
|
||||
count: numDevices,
|
||||
}),
|
||||
continueText: _t("Sign out devices", { count: numDevices }),
|
||||
continueText: _t("settings|sessions|confirm_sign_out_continue", { count: numDevices }),
|
||||
continueKind: "danger",
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue