Migrate more strings to translation keys (#11642)

This commit is contained in:
Michael Telatynski 2023-09-21 18:16:04 +01:00 committed by GitHub
parent c879882558
commit faa7b1521f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 6443 additions and 6006 deletions

View file

@ -169,7 +169,7 @@ export class PasswordAuthEntry extends React.Component<IAuthEntryProps, IPasswor
return (
<div>
<p>{_t("Confirm your identity by entering your account password below.")}</p>
<p>{_t("auth|uia|password_prompt")}</p>
<form onSubmit={this.onSubmit} className="mx_InteractiveAuthEntryComponents_passwordSection">
<Field
className={passwordBoxClass}
@ -219,9 +219,7 @@ export class RecaptchaAuthEntry extends React.Component<IRecaptchaAuthEntryProps
let sitePublicKey: string | undefined;
if (!this.props.stageParams || !this.props.stageParams.public_key) {
errorText = _t(
"Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator.",
);
errorText = _t("auth|uia|recaptcha_missing_params");
} else {
sitePublicKey = this.props.stageParams.public_key;
}
@ -352,7 +350,7 @@ export class TermsAuthEntry extends React.Component<ITermsAuthEntryProps, ITerms
if (allChecked) {
this.props.submitAuthDict({ type: AuthType.Terms });
} else {
this.setState({ errorText: _t("Please review and accept all of the homeserver's policies") });
this.setState({ errorText: _t("auth|uia|terms_invalid") });
}
};
@ -403,7 +401,7 @@ export class TermsAuthEntry extends React.Component<ITermsAuthEntryProps, ITerms
return (
<div className="mx_InteractiveAuthEntryComponents">
<p>{_t("Please review and accept the policies of this homeserver:")}</p>
<p>{_t("auth|uia|terms")}</p>
{checkboxes}
{errorSection}
{submitButton}
@ -474,19 +472,19 @@ export class EmailIdentityAuthEntry extends React.Component<
return (
<div className="mx_InteractiveAuthEntryComponents_emailWrapper">
<AuthHeaderModifier
title={_t("Check your email to continue")}
icon={<img src={EmailPromptIcon} alt={_t("Unread email icon")} width={16} />}
title={_t("auth|uia|email_auth_header")}
icon={<img src={EmailPromptIcon} role="presentation" alt="" width={16} />}
hideServerPicker={true}
/>
<p>
{_t("To create your account, open the link in the email we just sent to %(emailAddress)s.", {
{_t("auth|uia|email", {
emailAddress: <b>{this.props.inputs.emailAddress}</b>,
})}
</p>
{this.state.requesting ? (
<p className="secondary">
{_t(
"Did not receive it? <a>Resend it</a>",
"auth|uia|email_resend_prompt",
{},
{
a: (text: string) => (
@ -502,13 +500,15 @@ export class EmailIdentityAuthEntry extends React.Component<
) : (
<p className="secondary">
{_t(
"Did not receive it? <a>Resend it</a>",
"auth|uia|email_resend_prompt",
{},
{
a: (text: string) => (
<AccessibleTooltipButton
kind="link_inline"
title={this.state.requested ? _t("Resent!") : _t("action|resend")}
title={
this.state.requested ? _t("auth|uia|email_resent") : _t("action|resend")
}
alignment={Alignment.Right}
onHideTooltip={
this.state.requested
@ -642,7 +642,7 @@ export class MsisdnAuthEntry extends React.Component<IMsisdnAuthEntryProps, IMsi
});
} else {
this.setState({
errorText: _t("Token incorrect"),
errorText: _t("auth|uia|msisdn_token_incorrect"),
});
}
} catch (e) {
@ -670,8 +670,8 @@ export class MsisdnAuthEntry extends React.Component<IMsisdnAuthEntryProps, IMsi
}
return (
<div>
<p>{_t("A text message has been sent to %(msisdn)s", { msisdn: <i>{this.msisdn}</i> })}</p>
<p>{_t("Please enter the code it contains:")}</p>
<p>{_t("auth|uia|msisdn", { msisdn: <i>{this.msisdn}</i> })}</p>
<p>{_t("auth|uia|msisdn_token_prompt")}</p>
<div className="mx_InteractiveAuthEntryComponents_msisdnWrapper">
<form onSubmit={this.onFormSubmit}>
<input
@ -761,13 +761,13 @@ export class RegistrationTokenAuthEntry extends React.Component<IAuthEntryProps,
return (
<div>
<p>{_t("Enter a registration token provided by the homeserver administrator.")}</p>
<p>{_t("auth|uia|registration_token_prompt")}</p>
<form onSubmit={this.onSubmit} className="mx_InteractiveAuthEntryComponents_registrationTokenSection">
<Field
className={registrationTokenBoxClass}
type="text"
name="registrationTokenField"
label={_t("Registration token")}
label={_t("auth|uia|registration_token_label")}
autoFocus={true}
value={this.state.registrationToken}
onChange={this.onRegistrationTokenFieldChange}
@ -895,7 +895,7 @@ export class SSOAuthEntry extends React.Component<ISSOAuthEntryProps, ISSOAuthEn
} else if (this.state.attemptFailed) {
errorSection = (
<div className="error" role="alert">
{_t("Something went wrong in confirming your identity. Cancel and try again.")}
{_t("auth|uia|sso_failed")}
</div>
);
}
@ -972,7 +972,7 @@ export class FallbackAuthEntry extends React.Component<IAuthEntryProps> {
return (
<div>
<AccessibleButton kind="link" inputRef={this.fallbackButton} onClick={this.onShowFallbackClick}>
{_t("Start authentication")}
{_t("auth|uia|fallback_button")}
</AccessibleButton>
{errorSection}
</div>