Fix double translation issue (#10240
* Fix double translation issue * Remove some redundant string concatenations
This commit is contained in:
parent
a3defa6cf7
commit
12dd799301
21 changed files with 29 additions and 41 deletions
|
@ -1473,9 +1473,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
|||
"do not have permission to view the message in question.",
|
||||
);
|
||||
} else {
|
||||
description = _t(
|
||||
"Tried to load a specific point in this room's timeline, but was " + "unable to find it.",
|
||||
);
|
||||
description = _t("Tried to load a specific point in this room's timeline, but was unable to find it.");
|
||||
}
|
||||
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
|
|
|
@ -454,7 +454,7 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
|
|||
}
|
||||
|
||||
let errorText: ReactNode =
|
||||
_t("There was a problem communicating with the homeserver, " + "please try again later.") +
|
||||
_t("There was a problem communicating with the homeserver, please try again later.") +
|
||||
(errCode ? " (" + errCode + ")" : "");
|
||||
|
||||
if (err instanceof ConnectionError) {
|
||||
|
|
|
@ -91,7 +91,7 @@ export default class CaptchaForm extends React.Component<ICaptchaFormProps, ICap
|
|||
const publicKey = this.props.sitePublicKey;
|
||||
if (!publicKey) {
|
||||
logger.error("No public key for recaptcha!");
|
||||
throw new Error("This server has not supplied enough information for Recaptcha " + "authentication");
|
||||
throw new Error("This server has not supplied enough information for Recaptcha authentication");
|
||||
}
|
||||
|
||||
logger.info("Rendering to %s", divId);
|
||||
|
|
|
@ -70,7 +70,7 @@ export default class StorageEvictedDialog extends React.Component<IProps> {
|
|||
)}
|
||||
</p>
|
||||
<p>
|
||||
{_t("Your browser likely removed this data when running low on " + "disk space.")} {logRequest}
|
||||
{_t("Your browser likely removed this data when running low on disk space.")} {logRequest}
|
||||
</p>
|
||||
</div>
|
||||
<DialogButtons
|
||||
|
|
|
@ -405,7 +405,7 @@ export default class RestoreKeyBackupDialog extends React.PureComponent<IProps,
|
|||
<div>
|
||||
<p>
|
||||
{_t(
|
||||
"<b>Warning</b>: you should only set up key backup " + "from a trusted computer.",
|
||||
"<b>Warning</b>: you should only set up key backup from a trusted computer.",
|
||||
{},
|
||||
{ b: (sub) => <b>{sub}</b> },
|
||||
)}
|
||||
|
@ -480,7 +480,7 @@ export default class RestoreKeyBackupDialog extends React.PureComponent<IProps,
|
|||
<div>
|
||||
<p>
|
||||
{_t(
|
||||
"<b>Warning</b>: you should only set up key backup " + "from a trusted computer.",
|
||||
"<b>Warning</b>: you should only set up key backup from a trusted computer.",
|
||||
{},
|
||||
{ b: (sub) => <b>{sub}</b> },
|
||||
)}
|
||||
|
|
|
@ -93,7 +93,7 @@ class LocationPicker extends React.Component<ILocationPickerProps, IState> {
|
|||
|
||||
this.map.on("error", (e) => {
|
||||
logger.error(
|
||||
"Failed to load map: check map_style_url in config.json " + "has a valid URL and API key",
|
||||
"Failed to load map: check map_style_url in config.json has a valid URL and API key",
|
||||
e.error,
|
||||
);
|
||||
this.setState({ error: LocationShareError.MapStyleUrlNotReachable });
|
||||
|
|
|
@ -23,7 +23,7 @@ import { User } from "matrix-js-sdk/src/models/user";
|
|||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||
import RoomContext from "../../../contexts/RoomContext";
|
||||
import DMRoomMap from "../../../utils/DMRoomMap";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import { _t, _td } from "../../../languageHandler";
|
||||
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
|
||||
import MiniAvatarUploader, { AVATAR_SIZE } from "../elements/MiniAvatarUploader";
|
||||
import RoomAvatar from "../avatars/RoomAvatar";
|
||||
|
@ -55,11 +55,11 @@ const NewRoomIntro: React.FC = () => {
|
|||
|
||||
let body: JSX.Element;
|
||||
if (dmPartner) {
|
||||
let introMessage = _t("This is the beginning of your direct message history with <displayName/>.");
|
||||
let introMessage = _td("This is the beginning of your direct message history with <displayName/>.");
|
||||
let caption: string | undefined;
|
||||
|
||||
if (isLocalRoom) {
|
||||
introMessage = _t("Send your first message to invite <displayName/> to chat");
|
||||
introMessage = _td("Send your first message to invite <displayName/> to chat");
|
||||
} else if (room.getJoinedMemberCount() + room.getInvitedMemberCount() === 2) {
|
||||
caption = _t("Only the two of you are in this conversation, unless either of you invites anyone to join.");
|
||||
}
|
||||
|
|
|
@ -435,7 +435,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
|
|||
}
|
||||
|
||||
subTitle = _t(
|
||||
"Link this email with your account in Settings to receive invites " + "directly in %(brand)s.",
|
||||
"Link this email with your account in Settings to receive invites directly in %(brand)s.",
|
||||
{ brand },
|
||||
);
|
||||
primaryActionLabel = _t("Join the discussion");
|
||||
|
|
|
@ -177,7 +177,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
|||
eventIndexingSettings = (
|
||||
<div>
|
||||
<div className="mx_SettingsTab_subsectionText">
|
||||
{_t("Securely cache encrypted messages locally for them to " + "appear in search results.")}
|
||||
{_t("Securely cache encrypted messages locally for them to appear in search results.")}
|
||||
</div>
|
||||
<div>
|
||||
<AccessibleButton kind="primary" disabled={this.state.enabling} onClick={this.onEnable}>
|
||||
|
|
|
@ -183,7 +183,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
|
|||
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.",
|
||||
"Are you sure? You will lose your encrypted messages if your keys are not backed up properly.",
|
||||
),
|
||||
button: _t("Delete Backup"),
|
||||
danger: true,
|
||||
|
|
|
@ -192,7 +192,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
|
|||
const [confirmed] = await this.showServerChangeWarning({
|
||||
title: _t("Change identity server"),
|
||||
unboundMessage: _t(
|
||||
"Disconnect from the identity server <current /> and " + "connect to <new /> instead?",
|
||||
"Disconnect from the identity server <current /> and connect to <new /> instead?",
|
||||
{},
|
||||
{
|
||||
current: (sub) => <b>{abbreviateUrl(currentClientIdServer)}</b>,
|
||||
|
@ -330,7 +330,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
|
|||
<div>
|
||||
<p>
|
||||
{_t(
|
||||
"You are still <b>sharing your personal data</b> on the identity " + "server <idserver />.",
|
||||
"You are still <b>sharing your personal data</b> on the identity server <idserver />.",
|
||||
{},
|
||||
messageElements,
|
||||
)}
|
||||
|
|
|
@ -223,7 +223,7 @@ export default class EmailAddresses extends React.Component<IProps, IState> {
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Your email address hasn't been verified yet"),
|
||||
description: _t(
|
||||
"Click the link in the email you received to verify " + "and then click continue again.",
|
||||
"Click the link in the email you received to verify and then click continue again.",
|
||||
),
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -184,7 +184,7 @@ export class EmailAddress extends React.Component<IEmailAddressProps, IEmailAddr
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Your email address hasn't been verified yet"),
|
||||
description: _t(
|
||||
"Click the link in the email you received to verify " + "and then click continue again.",
|
||||
"Click the link in the email you received to verify and then click continue again.",
|
||||
),
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue