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
|
@ -40,13 +40,13 @@ export const showToast = (deviceIds: Set<string>): void => {
|
|||
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key: TOAST_KEY,
|
||||
title: _t("You have unverified sessions"),
|
||||
title: _t("encryption|verification|unverified_sessions_toast_title"),
|
||||
icon: "verification_warning",
|
||||
props: {
|
||||
description: _t("Review to ensure your account is safe"),
|
||||
description: _t("encryption|verification|unverified_sessions_toast_description"),
|
||||
acceptLabel: _t("action|review"),
|
||||
onAccept,
|
||||
rejectLabel: _t("Later"),
|
||||
rejectLabel: _t("encryption|verification|unverified_sessions_toast_reject"),
|
||||
onReject,
|
||||
},
|
||||
component: GenericToast,
|
||||
|
|
|
@ -39,9 +39,11 @@ const TOAST_KEY = "desktopnotifications";
|
|||
export const showToast = (fromMessageSend: boolean): void => {
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key: TOAST_KEY,
|
||||
title: fromMessageSend ? _t("Don't miss a reply") : _t("Notifications"),
|
||||
title: fromMessageSend
|
||||
? _t("notifications|enable_prompt_toast_title_from_message_send")
|
||||
: _t("notifications|enable_prompt_toast_title"),
|
||||
props: {
|
||||
description: _t("Enable desktop notifications"),
|
||||
description: _t("notifications|enable_prompt_toast_description"),
|
||||
acceptLabel: _t("action|enable"),
|
||||
onAccept,
|
||||
rejectLabel: _t("action|dismiss"),
|
||||
|
|
|
@ -133,7 +133,9 @@ export function IncomingCallToast({ callEvent }: Props): JSX.Element {
|
|||
<RoomAvatar room={room ?? undefined} size="24px" />
|
||||
<div className="mx_IncomingCallToast_content">
|
||||
<div className="mx_IncomingCallToast_info">
|
||||
<span className="mx_IncomingCallToast_room">{room ? room.name : _t("Unknown room")}</span>
|
||||
<span className="mx_IncomingCallToast_room">
|
||||
{room ? room.name : _t("voip|call_toast_unknown_room")}
|
||||
</span>
|
||||
<div className="mx_IncomingCallToast_message">{_t("voip|video_call_started")}</div>
|
||||
{call ? (
|
||||
<LiveContentSummaryWithCall call={call} />
|
||||
|
|
|
@ -42,13 +42,10 @@ export const showToast = (): void => {
|
|||
}
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key: TOAST_KEY,
|
||||
title: _t("Use app for a better experience"),
|
||||
title: _t("mobile_guide|toast_title"),
|
||||
props: {
|
||||
description: _t(
|
||||
"%(brand)s is experimental on a mobile web browser. For a better experience and the latest features, use our free native app.",
|
||||
{ brand },
|
||||
),
|
||||
acceptLabel: _t("Use app"),
|
||||
description: _t("mobile_guide|toast_description", { brand }),
|
||||
acceptLabel: _t("mobile_guide|toast_accept"),
|
||||
onAccept,
|
||||
rejectLabel: _t("action|dismiss"),
|
||||
onReject,
|
||||
|
|
|
@ -30,12 +30,12 @@ export const showToast = (
|
|||
syncError?: boolean,
|
||||
): void => {
|
||||
const errorText = messageForResourceLimitError(limitType, adminContact, {
|
||||
"monthly_active_user": _td("Your homeserver has exceeded its user limit."),
|
||||
"monthly_active_user": _td("error|mau"),
|
||||
"hs_blocked": _td("error|hs_blocked"),
|
||||
"": _td("Your homeserver has exceeded one of its resource limits."),
|
||||
"": _td("error|resource_limits"),
|
||||
});
|
||||
const contactText = messageForResourceLimitError(limitType, adminContact, {
|
||||
"": _td("Contact your <a>server admin</a>."),
|
||||
"": _td("error|admin_contact_short"),
|
||||
});
|
||||
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
|
|
|
@ -29,11 +29,11 @@ const TOAST_KEY = "setupencryption";
|
|||
const getTitle = (kind: Kind): string => {
|
||||
switch (kind) {
|
||||
case Kind.SET_UP_ENCRYPTION:
|
||||
return _t("Set up Secure Backup");
|
||||
return _t("encryption|set_up_toast_title");
|
||||
case Kind.UPGRADE_ENCRYPTION:
|
||||
return _t("Encryption upgrade available");
|
||||
return _t("encryption|upgrade_toast_title");
|
||||
case Kind.VERIFY_THIS_SESSION:
|
||||
return _t("Verify this session");
|
||||
return _t("encryption|verify_toast_title");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -62,9 +62,9 @@ const getDescription = (kind: Kind): string => {
|
|||
switch (kind) {
|
||||
case Kind.SET_UP_ENCRYPTION:
|
||||
case Kind.UPGRADE_ENCRYPTION:
|
||||
return _t("Safeguard against losing access to encrypted messages & data");
|
||||
return _t("encryption|set_up_toast_description");
|
||||
case Kind.VERIFY_THIS_SESSION:
|
||||
return _t("Other users may not trust it");
|
||||
return _t("encryption|verify_toast_description");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -110,7 +110,7 @@ export const showToast = (kind: Kind): void => {
|
|||
description: getDescription(kind),
|
||||
acceptLabel: getSetupCaption(kind),
|
||||
onAccept,
|
||||
rejectLabel: _t("Later"),
|
||||
rejectLabel: _t("encryption|verification|unverified_sessions_toast_reject"),
|
||||
onReject,
|
||||
},
|
||||
component: GenericToast,
|
||||
|
|
|
@ -54,12 +54,12 @@ export const showToast = async (deviceId: string): Promise<void> => {
|
|||
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
key: toastKey(deviceId),
|
||||
title: _t("New login. Was this you?"),
|
||||
title: _t("encryption|verification|unverified_session_toast_title"),
|
||||
icon: "verification_warning",
|
||||
props: {
|
||||
description: device.display_name,
|
||||
detail: <DeviceMetaData device={extendedDevice} />,
|
||||
acceptLabel: _t("Yes, it was me"),
|
||||
acceptLabel: _t("encryption|verification|unverified_session_toast_accept"),
|
||||
onAccept,
|
||||
rejectLabel: _t("action|no"),
|
||||
onReject,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue