Migrate more strings to translation keys (#11671)

This commit is contained in:
Michael Telatynski 2023-09-26 18:35:55 +01:00 committed by GitHub
parent 13aed62a91
commit 4d0d024e86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
125 changed files with 7066 additions and 6607 deletions

View file

@ -95,7 +95,7 @@ export default class ConfirmUserActionDialog extends React.Component<IProps, ISt
onChange={this.onReasonChange}
value={this.state.reason}
className="mx_ConfirmUserActionDialog_reasonField"
label={_t("Reason")}
label={_t("room_settings|permissions|ban_reason")}
autoFocus={true}
/>
</form>

View file

@ -353,9 +353,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
microcopy = _t("create_room|encryption_forced");
}
} else {
microcopy = _t(
"Your server admin has disabled end-to-end encryption by default in private rooms & Direct Messages.",
);
microcopy = _t("settings|security|e2ee_default_disabled_warning");
}
e2eeSection = (
<React.Fragment>
@ -420,7 +418,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
labelKnock={
this.askToJoinEnabled ? _t("room_settings|security|join_rule_knock") : undefined
}
labelPublic={_t("Public room")}
labelPublic={_t("common|public_room")}
labelRestricted={
this.supportsRestricted ? _t("create_room|join_rule_restricted") : undefined
}

View file

@ -163,7 +163,7 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
<JoinRuleDropdown
label={_t("Space visibility")}
labelInvite={_t("Private space (invite only)")}
labelPublic={_t("Public space")}
labelPublic={_t("common|public_space")}
labelRestricted={_t("create_room|join_rule_restricted")}
width={478}
value={joinRule}

View file

@ -214,7 +214,7 @@ export default class DeactivateAccountDialog extends React.Component<IProps, ISt
className="mx_DeactivateAccountDialog"
onFinished={this.props.onFinished}
titleClass="danger"
title={_t("Deactivate Account")}
title={_t("settings|general|deactivate_section")}
screenName="DeactivateAccount"
>
<div className="mx_Dialog_content">

View file

@ -47,7 +47,7 @@ export default class IntegrationsDisabledDialog extends React.Component<IProps>
<div className="mx_IntegrationsDisabledDialog_content">
<p>
{_t("Enable '%(manageIntegrations)s' in Settings to do this.", {
manageIntegrations: _t("Manage integrations"),
manageIntegrations: _t("integration_manager|manage_title"),
})}
</p>
</div>

View file

@ -143,7 +143,7 @@ export default class InteractiveAuthDialog<T> extends React.Component<Interactiv
// Let's pick a title, body, and other params text that we'll show to the user. The order
// is most specific first, so stagePhase > our props > defaults.
let title = this.state.authError ? "Error" : this.props.title || _t("Authentication");
let title = this.state.authError ? "Error" : this.props.title || _t("common|authentication");
let body = this.state.authError ? null : this.props.body;
let continueText: string | undefined;
let continueKind: string | undefined;

View file

@ -417,7 +417,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
<Field
className="mx_ReportEventDialog_reason"
element="textarea"
label={_t("Reason")}
label={_t("room_settings|permissions|ban_reason")}
rows={5}
onChange={this.onReasonChange}
value={this.state.reason}
@ -456,7 +456,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
<Field
className="mx_ReportEventDialog_reason"
element="textarea"
label={_t("Reason")}
label={_t("room_settings|permissions|ban_reason")}
rows={5}
onChange={this.onReasonChange}
value={this.state.reason}

View file

@ -154,7 +154,7 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
tabs.push(
new Tab(
RoomSettingsTab.Voip,
_td("Voice & Video"),
_td("settings|voip|title"),
"mx_RoomSettingsDialog_voiceIcon",
<VoipRoomSettingsTab room={this.state.room} />,
),
@ -197,7 +197,7 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
tabs.push(
new Tab(
RoomSettingsTab.Bridges,
_td("Bridges"),
_td("room_settings|bridges|title"),
"mx_RoomSettingsDialog_bridgesIcon",
<BridgeSettingsTab room={this.state.room} />,
"RoomSettingsBridges",

View file

@ -67,8 +67,8 @@ export default class SetEmailDialog extends React.Component<IProps, IState> {
const emailAddress = this.state.emailAddress;
if (!Email.looksValid(emailAddress)) {
Modal.createDialog(ErrorDialog, {
title: _t("Invalid Email Address"),
description: _t("This doesn't appear to be a valid email address"),
title: _t("settings|general|error_invalid_email"),
description: _t("settings|general|error_invalid_email_detail"),
});
return;
}
@ -88,7 +88,7 @@ export default class SetEmailDialog extends React.Component<IProps, IState> {
this.setState({ emailBusy: false });
logger.error("Unable to add email address " + emailAddress + " " + err);
Modal.createDialog(ErrorDialog, {
title: _t("Unable to add email address"),
title: _t("settings|general|error_add_email"),
description: extractErrorMessageFromError(err, _t("invite|failed_generic")),
});
},
@ -123,7 +123,7 @@ export default class SetEmailDialog extends React.Component<IProps, IState> {
if (underlyingError instanceof MatrixError && underlyingError.errcode === "M_THREEPID_AUTH_FAILED") {
const message =
_t("Unable to verify email address.") +
_t("settings|general|error_email_verification") +
" " +
_t(
"Please check your email and click on the link it contains. Once this is done, click continue.",
@ -137,7 +137,7 @@ export default class SetEmailDialog extends React.Component<IProps, IState> {
} else {
logger.error("Unable to verify email address: " + err);
Modal.createDialog(ErrorDialog, {
title: _t("Unable to verify email address."),
title: _t("settings|general|error_email_verification"),
description: extractErrorMessageFromError(err, _t("invite|failed_generic")),
});
}

View file

@ -133,7 +133,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
tabs.push(
new Tab(
UserTab.Voice,
_td("Voice & Video"),
_td("settings|voip|title"),
"mx_UserSettingsDialog_voiceIcon",
<VoiceUserSettingsTab />,
"UserSettingsVoiceVideo",

View file

@ -33,7 +33,9 @@ interface Props {
export function PublicRoomResultDetails({ room, labelId, descriptionId, detailsId }: Props): JSX.Element {
let name =
room.name || getDisplayAliasForAliasSet(room.canonical_alias ?? "", room.aliases ?? []) || _t("Unnamed room");
room.name ||
getDisplayAliasForAliasSet(room.canonical_alias ?? "", room.aliases ?? []) ||
_t("common|unnamed_room");
if (name.length > MAX_NAME_LENGTH) {
name = `${name.substring(0, MAX_NAME_LENGTH)}...`;
}