Fix instances of double translation and guard translation calls using typescript (#11443)

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Michael Telatynski 2023-08-22 16:32:05 +01:00 committed by GitHub
parent d13b6e1b41
commit ac70f7ac9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
157 changed files with 554 additions and 780 deletions

View file

@ -203,8 +203,7 @@ export default class CrossSigningPanel extends React.PureComponent<{}, IState> {
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.",
"Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.",
)}
</SettingsSubsectionText>
);

View file

@ -149,8 +149,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
<>
<SettingsSubsectionText>
{_t(
"Securely cache encrypted messages locally for them " +
"to appear in search results, using %(size)s to store messages from %(rooms)s rooms.",
"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
@ -188,10 +187,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>.",
"%(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>.",
{
brand,
},
@ -209,9 +205,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.",
"%(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.",
{
brand,
},

View file

@ -323,9 +323,7 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
warning = (
<b>
{_t(
"This room is in some spaces you're not an admin of. " +
"In those spaces, the old room will still be shown, " +
"but people will be prompted to join the new one.",
"This room is in some spaces you're not an admin of. In those spaces, the old room will still be shown, but people will be prompted to join the new one.",
)}
</b>
);
@ -335,8 +333,7 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
targetVersion,
<>
{_t(
"This upgrade will allow members of selected spaces " +
"access to this room without an invite.",
"This upgrade will allow members of selected spaces access to this room without an invite.",
)}
{warning}
</>,

View file

@ -259,17 +259,14 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
<>
<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.",
"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> },
)}
</SettingsSubsectionText>
<SettingsSubsectionText>
{_t(
"Connect this session to key backup before signing out to avoid " +
"losing any keys that may only be on this session.",
"Connect this session to key backup before signing out to avoid losing any keys that may only be on this session.",
)}
</SettingsSubsectionText>
</>
@ -382,9 +379,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
<>
<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.",
"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>
{statusDescription}

View file

@ -296,9 +296,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
<div>
<p>
{_t(
"You should <b>remove your personal data</b> from identity server " +
"<idserver /> before disconnecting. Unfortunately, identity server " +
"<idserver /> is currently offline or cannot be reached.",
"You should <b>remove your personal data</b> from identity server <idserver /> before disconnecting. Unfortunately, identity server <idserver /> is currently offline or cannot be reached.",
{},
messageElements,
)}
@ -307,8 +305,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
<ul>
<li>
{_t(
"check your browser plugins for anything that might block " +
"the identity server (such as Privacy Badger)",
"check your browser plugins for anything that might block the identity server (such as Privacy Badger)",
)}
</li>
<li>
@ -338,8 +335,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
</p>
<p>
{_t(
"We recommend that you remove your email addresses and phone numbers " +
"from the identity server before disconnecting.",
"We recommend that you remove your email addresses and phone numbers from the identity server before disconnecting.",
)}
</p>
</div>
@ -388,15 +384,13 @@ export default class SetIdServer extends React.Component<IProps, IState> {
if (idServerUrl) {
sectionTitle = _t("Identity server (%(server)s)", { server: abbreviateUrl(idServerUrl) });
bodyText = _t(
"You are currently using <server></server> to discover and be discoverable by " +
"existing contacts you know. You can change your identity server below.",
"You are currently using <server></server> to discover and be discoverable by existing contacts you know. You can change your identity server below.",
{},
{ server: (sub) => <b>{abbreviateUrl(idServerUrl)}</b> },
);
if (this.props.missingTerms) {
bodyText = _t(
"If you don't want to use <server /> to discover and be discoverable by existing " +
"contacts you know, enter another identity server below.",
"If you don't want to use <server /> to discover and be discoverable by existing contacts you know, enter another identity server below.",
{},
{ server: (sub) => <b>{abbreviateUrl(idServerUrl)}</b> },
);
@ -404,9 +398,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
} else {
sectionTitle = _t("Identity server");
bodyText = _t(
"You are not currently using an identity server. " +
"To discover and be discoverable by existing contacts you know, " +
"add one below.",
"You are not currently using an identity server. To discover and be discoverable by existing contacts you know, add one below.",
);
}
@ -414,15 +406,11 @@ export default class SetIdServer extends React.Component<IProps, IState> {
if (idServerUrl) {
let discoButtonContent: React.ReactNode = _t("Disconnect");
let discoBodyText = _t(
"Disconnecting from your identity server will mean you " +
"won't be discoverable by other users and you won't be " +
"able to invite others by email or phone.",
"Disconnecting from your identity server will mean you won't be discoverable by other users and you won't be able to invite others by email or phone.",
);
if (this.props.missingTerms) {
discoBodyText = _t(
"Using an identity server is optional. If you choose not to " +
"use an identity server, you won't be discoverable by other users " +
"and you won't be able to invite others by email or phone.",
"Using an identity server is optional. If you choose not to use an identity server, you won't be discoverable by other users and you won't be able to invite others by email or phone.",
);
discoButtonContent = _t("Do not use an identity server");
}

View file

@ -63,7 +63,7 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
if (currentManager) {
managerName = `(${currentManager.name})`;
bodyText = _t(
"Use an integration manager <b>(%(serverName)s)</b> to manage bots, widgets, " + "and sticker packs.",
"Use an integration manager <b>(%(serverName)s)</b> to manage bots, widgets, and sticker packs.",
{ serverName: currentManager.name },
{ b: (sub) => <b>{sub}</b> },
);
@ -92,8 +92,7 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
<SettingsSubsectionText>{bodyText}</SettingsSubsectionText>
<SettingsSubsectionText>
{_t(
"Integration managers receive configuration data, and can modify widgets, " +
"send room invites, and set power levels on your behalf.",
"Integration managers receive configuration data, and can modify widgets, send room invites, and set power levels on your behalf.",
)}
</SettingsSubsectionText>
</label>

View file

@ -280,8 +280,7 @@ export default class PhoneNumbers extends React.Component<IProps, IState> {
<div>
<div>
{_t(
"A text message has been sent to +%(msisdn)s. " +
"Please enter the verification code it contains.",
"A text message has been sent to +%(msisdn)s. Please enter the verification code it contains.",
{ msisdn: msisdn },
)}
<br />

View file

@ -84,14 +84,12 @@ const DeviceNameEditor: React.FC<Props & { stopEditing: () => void }> = ({ devic
<>
<p>
{_t(
`Other users in direct messages and rooms that you join ` +
`are able to view a full list of your sessions.`,
"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.`,
"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>
</>

View file

@ -42,8 +42,7 @@ const securityCardContent: Record<
</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.`,
"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>
</>
@ -60,8 +59,7 @@ const securityCardContent: Record<
</p>
<p>
{_t(
`You should make especially certain that you recognise these sessions ` +
`as they could represent an unauthorised use of your account.`,
"You should make especially certain that you recognise these sessions as they could represent an unauthorised use of your account.",
)}
</p>
</>
@ -98,8 +96,7 @@ const securityCardContent: Record<
</p>
<p>
{_t(
`Removing inactive sessions improves security and performance, ` +
`and makes it easier for you to identify if a new session is suspicious.`,
"Removing inactive sessions improves security and performance, and makes it easier for you to identify if a new session is suspicious.",
)}
</p>
</>

View file

@ -88,8 +88,7 @@ const securityCardContent: Record<
[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.`,
"Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.",
),
},
[DeviceSecurityVariation.Unverifiable]: {
@ -99,7 +98,7 @@ const securityCardContent: Record<
[DeviceSecurityVariation.Inactive]: {
title: _t("Inactive sessions"),
description: _t(
`Consider signing out from old sessions ` + `(%(inactiveAgeDays)s days or older) you don't use anymore.`,
"Consider signing out from old sessions (%(inactiveAgeDays)s days or older) you don't use anymore.",
{ inactiveAgeDays: INACTIVE_DEVICE_AGE_DAYS },
),
},

View file

@ -56,8 +56,7 @@ export default class LoginWithQRSection extends React.Component<IProps> {
<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.",
"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.",
)}
</p>
<AccessibleButton onClick={this.props.onShowQr} kind="primary">

View file

@ -63,8 +63,7 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
description={
<>
{_t(
`Verify your sessions for enhanced secure messaging` +
` or sign out from those you don't recognize or use anymore.`,
"Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.",
)}
<DeviceSecurityLearnMore variation={DeviceSecurityVariation.Unverified} />
</>
@ -88,8 +87,7 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
description={
<>
{_t(
`Consider signing out from old sessions ` +
`(%(inactiveAgeDays)s days or older) you don't use anymore.`,
"Consider signing out from old sessions (%(inactiveAgeDays)s days or older) you don't use anymore.",
{ inactiveAgeDays },
)}
<DeviceSecurityLearnMore variation={DeviceSecurityVariation.Inactive} />

View file

@ -110,11 +110,7 @@ export default function NotificationSettings2(): JSX.Element {
onAction={() => reconcile(model!)}
>
{_t(
"<strong>Update:</strong>" +
"Weve simplified Notifications Settings to make options easier to find. " +
"Some custom settings youve chosen in the past are not shown here, but theyre still active. " +
"If you proceed, some of your settings may change. " +
"<a>Learn more</a>",
"<strong>Update:</strong>Weve simplified Notifications Settings to make options easier to find. Some custom settings youve chosen in the past are not shown here, but theyre still active. If you proceed, some of your settings may change. <a>Learn more</a>",
{},
{
strong: boldText,

View file

@ -120,9 +120,7 @@ export default class AdvancedRoomSettingsTab extends React.Component<IProps, ISt
<div>
<p className="mx_SettingsTab_warningText">
{_t(
"<b>Warning</b>: upgrading a room will <i>not automatically migrate room members " +
"to the new version of the room.</i> We'll post a link to the new room in the old " +
"version of the room - room members will have to click this link to join the new room.",
"<b>Warning</b>: upgrading a room will <i>not automatically migrate room members to the new version of the room.</i> We'll post a link to the new room in the old version of the room - room members will have to click this link to join the new room.",
{},
{
b: (sub) => <b>{sub}</b>,

View file

@ -63,7 +63,7 @@ export default class BridgeSettingsTab extends React.Component<IProps> {
<div>
<p>
{_t(
"This room is bridging messages to the following platforms. " + "<a>Learn more.</a>",
"This room is bridging messages to the following platforms. <a>Learn more.</a>",
{},
{
// TODO: We don't have this link yet: this will prevent the translators
@ -85,7 +85,7 @@ export default class BridgeSettingsTab extends React.Component<IProps> {
content = (
<p>
{_t(
"This room isn't bridging messages to any platforms. " + "<a>Learn more.</a>",
"This room isn't bridging messages to any platforms. <a>Learn more.</a>",
{},
{
// TODO: We don't have this link yet: this will prevent the translators

View file

@ -221,8 +221,7 @@ export default class NotificationsSettingsTab extends React.Component<IProps, IS
{_t("@mentions & keywords")}
<div className="mx_NotificationSettingsTab_microCopy">
{_t(
"Get notified only with mentions and keywords " +
"as set up in your <a>settings</a>",
"Get notified only with mentions and keywords as set up in your <a>settings</a>",
{},
{
a: (sub) => (

View file

@ -20,7 +20,7 @@ import { logger } from "matrix-js-sdk/src/logger";
import { throttle, get } from "lodash";
import { compare } from "matrix-js-sdk/src/utils";
import { _t, _td } from "../../../../../languageHandler";
import { _t, _td, TranslationKey } from "../../../../../languageHandler";
import AccessibleButton from "../../../elements/AccessibleButton";
import Modal from "../../../../../Modal";
import ErrorDialog from "../../../dialogs/ErrorDialog";
@ -207,8 +207,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
Modal.createDialog(ErrorDialog, {
title: _t("Error changing power level requirement"),
description: _t(
"An error occurred changing the room's power level requirements. Ensure you have sufficient " +
"permissions and try again.",
"An error occurred changing the room's power level requirements. Ensure you have sufficient permissions and try again.",
),
});
});
@ -233,8 +232,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
Modal.createDialog(ErrorDialog, {
title: _t("Error changing power level"),
description: _t(
"An error occurred changing the user's power level. Ensure you have sufficient " +
"permissions and try again.",
"An error occurred changing the user's power level. Ensure you have sufficient permissions and try again.",
),
});
});
@ -249,7 +247,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
const plContent = plEvent ? plEvent.getContent() || {} : {};
const canChangeLevels = room.currentState.mayClientSendStateEvent(EventType.RoomPowerLevels, client);
const plEventsToLabels: Record<EventType | string, string | null> = {
const plEventsToLabels: Record<EventType | string, TranslationKey | null> = {
// These will be translated for us later.
[EventType.RoomAvatar]: isSpaceRoom ? _td("Change space avatar") : _td("Change room avatar"),
[EventType.RoomName]: isSpaceRoom ? _td("Change space name") : _td("Change room name"),
@ -458,10 +456,11 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
return null;
}
let label = plEventsToLabels[eventType];
if (label) {
const translationKeyForEvent = plEventsToLabels[eventType];
let label: string;
if (translationKeyForEvent) {
const brand = SdkConfig.get("element_call").brand ?? DEFAULTS.element_call.brand;
label = _t(label, { brand });
label = _t(translationKeyForEvent, { brand });
} else {
label = _t("Send %(eventType)s events", { eventType });
}

View file

@ -122,11 +122,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
<p>
{" "}
{_t(
"<b>It's not recommended to add encryption to public rooms.</b> " +
"Anyone can find and join public rooms, so anyone can read messages in them. " +
"You'll get none of the benefits of encryption, and you won't be able to turn it " +
"off later. Encrypting messages in a public room will make receiving and sending " +
"messages slower.",
"<b>It's not recommended to add encryption to public rooms.</b> Anyone can find and join public rooms, so anyone can read messages in them. You'll get none of the benefits of encryption, and you won't be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.",
undefined,
{ b: (sub) => <b>{sub}</b> },
)}{" "}
@ -134,8 +130,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
<p>
{" "}
{_t(
"To avoid these issues, create a <a>new encrypted room</a> for " +
"the conversation you plan to have.",
"To avoid these issues, create a <a>new encrypted room</a> for the conversation you plan to have.",
undefined,
{
a: (sub) => (
@ -165,9 +160,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
Modal.createDialog(QuestionDialog, {
title: _t("Enable encryption?"),
description: _t(
"Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted " +
"room cannot be seen by the server, only by the participants of the room. Enabling encryption " +
"may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",
"Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",
{},
{
a: (sub) => <ExternalLink href={SdkConfig.get("help_encryption_url")}>{sub}</ExternalLink>,
@ -322,10 +315,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
<p>
{" "}
{_t(
"<b>It's not recommended to make encrypted rooms public.</b> " +
"It will mean anyone can find and join the room, so anyone can read messages. " +
"You'll get none of the benefits of encryption. Encrypting messages in a public " +
"room will make receiving and sending messages slower.",
"<b>It's not recommended to make encrypted rooms public.</b> It will mean anyone can find and join the room, so anyone can read messages. You'll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.",
undefined,
{ b: (sub) => <b>{sub}</b> },
)}{" "}
@ -333,8 +323,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
<p>
{" "}
{_t(
"To avoid these issues, create a <a>new public room</a> for the conversation " +
"you plan to have.",
"To avoid these issues, create a <a>new public room</a> for the conversation you plan to have.",
undefined,
{
a: (sub) => (
@ -398,8 +387,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
}
const description = _t(
"Changes to who can read history will only apply to future messages in this room. " +
"The visibility of existing history will be unchanged.",
"Changes to who can read history will only apply to future messages in this room. The visibility of existing history will be unchanged.",
);
return (
@ -435,8 +423,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
/>
<p>
{_t(
"People with supported clients will be able to join " +
"the room without having a registered account.",
"People with supported clients will be able to join the room without having a registered account.",
)}
</p>
</div>

View file

@ -82,10 +82,9 @@ const ElementCallSwitch: React.FC<ElementCallSwitchProps> = ({ room }) => {
<LabelledToggleSwitch
data-testid="element-call-switch"
label={_t("Enable %(brand)s as an additional calling option in this room", { brand })}
caption={_t(
"%(brand)s is end-to-end encrypted, " + "but is currently limited to smaller numbers of users.",
{ brand },
)}
caption={_t("%(brand)s is end-to-end encrypted, but is currently limited to smaller numbers of users.", {
brand,
})}
value={elementCallEnabled}
onChange={onChange}
disabled={!maySend}

View file

@ -455,8 +455,7 @@ export default class GeneralUserSettingsTab extends React.Component<IProps, ISta
const intro = (
<SettingsSubsectionText>
{_t(
"Agree to the identity server (%(serverName)s) Terms of Service to " +
"allow yourself to be discoverable by email address or phone number.",
"Agree to the identity server (%(serverName)s) Terms of Service to allow yourself to be discoverable by email address or phone number.",
{ serverName: this.state.idServerName },
)}
</SettingsSubsectionText>

View file

@ -136,8 +136,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
<ul>
<li>
{_t(
"The <photo>default cover photo</photo> is © " +
"<author>Jesús Roncero</author> used under the terms of <terms>CC-BY-SA 4.0</terms>.",
"The <photo>default cover photo</photo> is © <author>Jesús Roncero</author> used under the terms of <terms>CC-BY-SA 4.0</terms>.",
{},
{
photo: (sub) => (
@ -166,8 +165,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
</li>
<li>
{_t(
"The <colr>twemoji-colr</colr> font is © <author>Mozilla Foundation</author> " +
"used under the terms of <terms>Apache 2.0</terms>.",
"The <colr>twemoji-colr</colr> font is © <author>Mozilla Foundation</author> used under the terms of <terms>Apache 2.0</terms>.",
{},
{
colr: (sub) => (
@ -194,9 +192,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
</li>
<li>
{_t(
"The <twemoji>Twemoji</twemoji> emoji art is © " +
"<author>Twitter, Inc and other contributors</author> used under the terms of " +
"<terms>CC-BY 4.0</terms>.",
"The <twemoji>Twemoji</twemoji> emoji art is © <author>Twitter, Inc and other contributors</author> used under the terms of <terms>CC-BY 4.0</terms>.",
{},
{
twemoji: (sub) => (
@ -244,8 +240,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
faqText = (
<div>
{_t(
"For help with using %(brand)s, click <a>here</a> or start a chat with our " +
"bot using the button below.",
"For help with using %(brand)s, click <a>here</a> or start a chat with our bot using the button below.",
{
brand,
},
@ -284,16 +279,11 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
<>
<SettingsSubsectionText>
{_t(
"If you've submitted a bug via GitHub, debug logs can help " +
"us track down the problem. ",
"If you've submitted a bug via GitHub, debug logs can help us track down the problem. ",
)}
</SettingsSubsectionText>
{_t(
"Debug logs contain application " +
"usage data including your username, the IDs or aliases of " +
"the rooms you have visited, which UI elements you " +
"last interacted with, and the usernames of other users. " +
"They do not contain messages.",
"Debug logs contain application usage data including your username, the IDs or aliases of the rooms you have visited, which UI elements you last interacted with, and the usernames of other users. They do not contain messages.",
)}
</>
}
@ -303,8 +293,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
</AccessibleButton>
<SettingsSubsectionText>
{_t(
"To report a Matrix-related security issue, please read the Matrix.org " +
"<a>Security Disclosure Policy</a>.",
"To report a Matrix-related security issue, please read the Matrix.org <a>Security Disclosure Policy</a>.",
{},
{
a: (sub) => (
@ -369,8 +358,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
<summary>{_t("Access Token")}</summary>
<b>
{_t(
"Your access token gives full access to your account." +
" Do not share it with anyone.",
"Your access token gives full access to your account. Do not share it with anyone.",
)}
</b>
<CopyableText getTextToCopy={() => this.context.getAccessToken()}>

View file

@ -113,9 +113,7 @@ export default class LabsUserSettingsTab extends React.Component<{}> {
<SettingsSection heading={_t("Upcoming features")}>
<SettingsSubsectionText>
{_t(
"What's next for %(brand)s? " +
"Labs are the best way to get things early, " +
"test out new features and help shape them before they actually launch.",
"What's next for %(brand)s? Labs are the best way to get things early, test out new features and help shape them before they actually launch.",
{ brand: SdkConfig.get("brand") },
)}
</SettingsSubsectionText>
@ -126,11 +124,7 @@ export default class LabsUserSettingsTab extends React.Component<{}> {
<SettingsSection heading={_t("Early previews")}>
<SettingsSubsectionText>
{_t(
"Feeling experimental? " +
"Try out our latest ideas in development. " +
"These features are not finalised; " +
"they may be unstable, may change, or may be dropped altogether. " +
"<a>Learn more</a>.",
"Feeling experimental? Try out our latest ideas in development. These features are not finalised; they may be unstable, may change, or may be dropped altogether. <a>Learn more</a>.",
{},
{
a: (sub) => {

View file

@ -259,28 +259,21 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
<span className="warning">{_t("⚠ These settings are meant for advanced users.")}</span>
<p>
{_t(
"Add users and servers you want to ignore here. Use asterisks " +
"to have %(brand)s match any characters. For example, <code>@bot:*</code> " +
"would ignore all users that have the name 'bot' on any server.",
"Add users and servers you want to ignore here. Use asterisks to have %(brand)s match any characters. For example, <code>@bot:*</code> would ignore all users that have the name 'bot' on any server.",
{ brand },
{ code: (s) => <code>{s}</code> },
)}
</p>
<p>
{_t(
"Ignoring people is done through ban lists which contain rules for " +
"who to ban. Subscribing to a ban list means the users/servers blocked by " +
"that list will be hidden from you.",
"Ignoring people is done through ban lists which contain rules for who to ban. Subscribing to a ban list means the users/servers blocked by that list will be hidden from you.",
)}
</p>
</SettingsSubsectionText>
<SettingsSubsection
heading={_t("Personal ban list")}
description={_t(
"Your personal ban list holds all the users/servers you personally don't " +
"want to see messages from. After ignoring your first user/server, a new room " +
"will show up in your room list named '%(myBanList)s' - stay in this room to keep " +
"the ban list in effect.",
"Your personal ban list holds all the users/servers you personally don't want to see messages from. After ignoring your first user/server, a new room will show up in your room list named '%(myBanList)s' - stay in this room to keep the ban list in effect.",
{
myBanList: _t("My Ban List"),
},

View file

@ -302,8 +302,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
warning = (
<div className="mx_SecurityUserSettingsTab_warning">
{_t(
"Your server admin has disabled end-to-end encryption by default " +
"in private rooms & Direct Messages.",
"Your server admin has disabled end-to-end encryption by default in private rooms & Direct Messages.",
)}
</div>
);

View file

@ -303,8 +303,7 @@ const SessionManagerTab: React.FC = () => {
/>
}
description={_t(
`For best security, verify your sessions and sign out ` +
`from any session that you don't recognize or use anymore.`,
"For best security, verify your sessions and sign out from any session that you don't recognize or use anymore.",
)}
data-testid="other-sessions-section"
stretchContent

View file

@ -68,8 +68,7 @@ const SidebarUserSettingsTab: React.FC = () => {
<SettingsSubsection
heading={_t("Spaces to show")}
description={_t(
"Spaces are ways to group rooms and people. " +
"Alongside the spaces you're in, you can use some pre-built ones too.",
"Spaces are ways to group rooms and people. Alongside the spaces you're in, you can use some pre-built ones too.",
)}
>
<StyledCheckbox