Migrate more strings to translation keys (#11694)

This commit is contained in:
Michael Telatynski 2023-10-03 19:17:26 +01:00 committed by GitHub
parent 677854d318
commit e1cfde0c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
201 changed files with 21074 additions and 18552 deletions

View file

@ -115,7 +115,7 @@ export default class RoomUpgradeWarningDialog extends React.Component<IProps, IS
<LabelledToggleSwitch
value={this.state.inviteUsersToNewRoom}
onChange={this.onInviteUsersToggle}
label={_t("Automatically invite members from this room to the new one")}
label={_t("room_settings|advanced|upgrade_warning_dialog_invite_label")}
/>
);
}
@ -123,28 +123,21 @@ export default class RoomUpgradeWarningDialog extends React.Component<IProps, IS
let title: string;
switch (this.joinRule) {
case JoinRule.Invite:
title = _t("Upgrade private room");
title = _t("room_settings|advanced|upgrade_warning_dialog_title_private");
break;
case JoinRule.Public:
title = _t("Upgrade public room");
title = _t("room_settings|advanced|upgrade_dwarning_ialog_title_public");
break;
default:
title = _t("Upgrade room");
title = _t("room_settings|advanced|upgrade_warning_dialog_title");
}
let bugReports = (
<p>
{_t(
"This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.",
{ brand },
)}
</p>
);
let bugReports = <p>{_t("room_settings|advanced|upgrade_warning_dialog_report_bug_prompt", { brand })}</p>;
if (SdkConfig.get().bug_report_endpoint_url) {
bugReports = (
<p>
{_t(
"This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please <a>report a bug</a>.",
"room_settings|advanced|upgrade_warning_dialog_report_bug_prompt_link",
{
brand,
},
@ -190,15 +183,10 @@ export default class RoomUpgradeWarningDialog extends React.Component<IProps, IS
title={title}
>
<div>
<p>
{this.props.description ||
_t(
"Upgrading a room is an advanced action and is usually recommended when a room is unstable due to bugs, missing features or security vulnerabilities.",
)}
</p>
<p>{this.props.description || _t("room_settings|advanced|upgrade_warning_dialog_description")}</p>
<p>
{_t(
"<b>Please note upgrading will make a new version of the room</b>. All current messages will stay in this archived room.",
"room_settings|advanced|upgrade_warning_dialog_explainer",
{},
{
b: (sub) => <b>{sub}</b>,
@ -208,7 +196,7 @@ export default class RoomUpgradeWarningDialog extends React.Component<IProps, IS
{bugReports}
<p>
{_t(
"You'll upgrade this room from <oldVersion /> to <newVersion />.",
"room_settings|advanced|upgrade_warning_dialog_footer",
{},
{
oldVersion: () => <code>{this.currentVersion}</code>,