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

@ -182,8 +182,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
Modal.createDialog(ErrorDialog, {
title: _t("Error updating main address"),
description: _t(
"There was an error updating the room's main address. It may not be allowed by the server " +
"or a temporary failure occurred.",
"There was an error updating the room's main address. It may not be allowed by the server or a temporary failure occurred.",
),
});
this.setState({ canonicalAlias: oldAlias });
@ -222,8 +221,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
Modal.createDialog(ErrorDialog, {
title: _t("Error updating main address"),
description: _t(
"There was an error updating the room's alternative addresses. " +
"It may not be allowed by the server or a temporary failure occurred.",
"There was an error updating the room's alternative addresses. It may not be allowed by the server or a temporary failure occurred.",
),
});
})
@ -258,8 +256,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
Modal.createDialog(ErrorDialog, {
title: _t("Error creating address"),
description: _t(
"There was an error creating that address. It may not be allowed by the server " +
"or a temporary failure occurred.",
"There was an error creating that address. It may not be allowed by the server or a temporary failure occurred.",
),
});
});
@ -286,8 +283,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
description = _t("You don't have permission to delete the address.");
} else {
description = _t(
"There was an error removing that address. It may no longer exist or a temporary " +
"error occurred.",
"There was an error removing that address. It may no longer exist or a temporary error occurred.",
);
}
Modal.createDialog(ErrorDialog, {
@ -450,13 +446,11 @@ export default class AliasSettings extends React.Component<IProps, IState> {
description={
isSpaceRoom
? _t(
"Set addresses for this space so users can find this space " +
"through your homeserver (%(localDomain)s)",
"Set addresses for this space so users can find this space through your homeserver (%(localDomain)s)",
{ localDomain },
)
: _t(
"Set addresses for this room so users can find this room " +
"through your homeserver (%(localDomain)s)",
"Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)",
{ localDomain },
)
}

View file

@ -95,9 +95,7 @@ export default class UrlPreviewSettings extends React.Component<IProps> {
}
} else {
previewsForAccount = _t(
"In encrypted rooms, like this one, URL previews are disabled by default to ensure that your " +
"homeserver (where the previews are generated) cannot gather information about links you see in " +
"this room.",
"In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.",
);
}
@ -114,8 +112,7 @@ export default class UrlPreviewSettings extends React.Component<IProps> {
<>
<p>
{_t(
"When someone puts a URL in their message, a URL preview can be shown to give more " +
"information about that link such as the title, description, and an image from the website.",
"When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.",
)}
</p>
<p>{previewsForAccount}</p>