Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 5e77822

Browse files
authored
Fix broken i18n in Forgot & Change password (#7252)
1 parent 11aa362 commit 5e77822

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/components/structures/auth/ForgotPassword.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ export default class ForgotPassword extends React.Component<IProps, IState> {
315315
/>
316316
<PassphraseConfirmField
317317
name="reset_password_confirm"
318-
label={_t('Confirm')}
319-
labelRequired={_t("A new password must be entered.")}
320-
labelInvalid={_t("New passwords must match each other.")}
318+
label={_td('Confirm')}
319+
labelRequired={_td("A new password must be entered.")}
320+
labelInvalid={_td("New passwords must match each other.")}
321321
value={this.state.password2}
322322
password={this.state.password}
323323
fieldRef={field => this[ForgotPasswordField.PasswordConfirm] = field}

src/components/views/settings/ChangePassword.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg";
2121
import AccessibleButton from '../elements/AccessibleButton';
2222
import Spinner from '../elements/Spinner';
2323
import withValidation, { IFieldState, IValidationResult } from '../elements/Validation';
24-
import { _t } from '../../../languageHandler';
24+
import { _t, _td } from '../../../languageHandler';
2525
import Modal from "../../../Modal";
2626
import PassphraseField from "../auth/PassphraseField";
2727
import CountlyAnalytics from "../../../CountlyAnalytics";
@@ -376,7 +376,7 @@ export default class ChangePassword extends React.Component<IProps, IState> {
376376
<PassphraseField
377377
fieldRef={field => this[FIELD_NEW_PASSWORD] = field}
378378
type="password"
379-
label='New Password'
379+
label={_td("New Password")}
380380
minScore={PASSWORD_MIN_SCORE}
381381
value={this.state.newPassword}
382382
autoFocus={this.props.autoFocusNewPasswordInput}

src/i18n/strings/en_EN.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@
11411141
"Confirm password": "Confirm password",
11421142
"Passwords don't match": "Passwords don't match",
11431143
"Current password": "Current password",
1144+
"New Password": "New Password",
11441145
"Change Password": "Change Password",
11451146
"Your homeserver does not support cross-signing.": "Your homeserver does not support cross-signing.",
11461147
"Cross-signing is ready for use.": "Cross-signing is ready for use.",
@@ -3099,7 +3100,6 @@
30993100
"Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.": "Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.",
31003101
"The email address linked to your account must be entered.": "The email address linked to your account must be entered.",
31013102
"The email address doesn't appear to be valid.": "The email address doesn't appear to be valid.",
3102-
"New Password": "New Password",
31033103
"A new password must be entered.": "A new password must be entered.",
31043104
"New passwords must match each other.": "New passwords must match each other.",
31053105
"A verification email will be sent to your inbox to confirm setting your new password.": "A verification email will be sent to your inbox to confirm setting your new password.",

0 commit comments

Comments
 (0)