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

@ -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");
}