Fixes more instances of double-translation (#7259)

This commit is contained in:
Michael Telatynski 2021-12-02 13:42:47 +00:00 committed by GitHub
parent 16a58ef2da
commit 675901f629
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -290,8 +290,8 @@ export default class ForgotPassword extends React.Component<IProps, IState> {
<div className="mx_AuthBody_fieldRow">
<EmailField
name="reset_email" // define a name so browser's password autofill gets less confused
labelRequired={_t('The email address linked to your account must be entered.')}
labelInvalid={_t("The email address doesn't appear to be valid.")}
labelRequired={_td('The email address linked to your account must be entered.')}
labelInvalid={_td("The email address doesn't appear to be valid.")}
value={this.state.email}
fieldRef={field => this[ForgotPasswordField.Email] = field}
autoFocus={true}

View file

@ -21,7 +21,7 @@ import { MatrixClient } from 'matrix-js-sdk/src/client';
import * as Email from '../../../email';
import { looksValid as phoneNumberLooksValid } from '../../../phonenumber';
import Modal from '../../../Modal';
import { _t } from '../../../languageHandler';
import { _t, _td } from '../../../languageHandler';
import SdkConfig from '../../../SdkConfig';
import { SAFE_LOCALPART_REGEX } from '../../../Registration';
import withValidation, { IValidationResult } from '../elements/Validation';
@ -431,8 +431,8 @@ export default class RegistrationForm extends React.PureComponent<IProps, IState
return null;
}
const emailLabel = this.authStepIsRequired('m.login.email.identity') ?
_t("Email") :
_t("Email (optional)");
_td("Email") :
_td("Email (optional)");
return <EmailField
fieldRef={field => this[RegistrationField.Email] = field}
label={emailLabel}

View file

@ -16,7 +16,7 @@ limitations under the License.
import * as React from "react";
import { _t } from '../../../languageHandler';
import { _t, _td } from '../../../languageHandler';
import { IDialogProps } from "./IDialogProps";
import { useRef, useState } from "react";
import Field from "../elements/Field";
@ -64,7 +64,7 @@ const RegistrationEmailPromptDialog: React.FC<IProps> = ({ onFinished }) => {
<EmailField
fieldRef={fieldRef}
autoFocus={true}
label={_t("Email (optional)")}
label={_td("Email (optional)")}
value={email}
onChange={ev => {
const target = ev.target as HTMLInputElement;