mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
Fixed i18n
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import {translate} from "react-i18next";
|
||||
import InputField from "./InputField";
|
||||
|
||||
type State = {
|
||||
@@ -42,7 +42,7 @@ class PasswordConfirmation extends React.Component<Props, State> {
|
||||
return (
|
||||
<>
|
||||
<InputField
|
||||
label={t("password.label")}
|
||||
label={t("password.newPassword")}
|
||||
type="password"
|
||||
onChange={this.handlePasswordChange}
|
||||
value={this.state.password ? this.state.password : ""}
|
||||
|
||||
@@ -52,10 +52,15 @@
|
||||
},
|
||||
"password": {
|
||||
"label": "Password",
|
||||
"newPassword": "New password",
|
||||
"passwordHelpText": "Plain text password of the user.",
|
||||
"passwordConfirmHelpText": "Repeat the password for confirmation.",
|
||||
"currentPassword": "Current password",
|
||||
"currentPasswordHelpText": "The password currently in use",
|
||||
"confirmPassword": "Confirm password",
|
||||
"passwordInvalid": "Password has to be between 6 and 32 characters",
|
||||
"passwordConfirmFailed": "Passwords have to be identical"
|
||||
"passwordConfirmFailed": "Passwords have to be identical",
|
||||
"submit": "Submit",
|
||||
"changedSuccessfully": "Pasword successfully changed"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ import {
|
||||
PasswordConfirmation,
|
||||
SubmitButton
|
||||
} from "@scm-manager/ui-components";
|
||||
import { translate } from "react-i18next";
|
||||
import type { Me } from "@scm-manager/ui-types";
|
||||
import { changePassword } from "../modules/changePassword";
|
||||
import {translate} from "react-i18next";
|
||||
import type {Me} from "@scm-manager/ui-types";
|
||||
import {changePassword} from "../modules/changePassword";
|
||||
|
||||
type Props = {
|
||||
me: Me,
|
||||
@@ -93,7 +93,7 @@ class ChangeUserPassword extends React.Component<Props, State> {
|
||||
message = (
|
||||
<Notification
|
||||
type={"success"}
|
||||
children={t("password.set-password-successful")}
|
||||
children={t("password.changedSuccessfully")}
|
||||
onClose={() => this.onClose()}
|
||||
/>
|
||||
);
|
||||
@@ -105,13 +105,13 @@ class ChangeUserPassword extends React.Component<Props, State> {
|
||||
<form onSubmit={this.submit}>
|
||||
{message}
|
||||
<InputField
|
||||
label={t("password.current-password")}
|
||||
label={t("password.currentPassword")}
|
||||
type="password"
|
||||
onChange={oldPassword =>
|
||||
this.setState({ ...this.state, oldPassword })
|
||||
}
|
||||
value={this.state.oldPassword ? this.state.oldPassword : ""}
|
||||
helpText={t("help.currentPasswordHelpText")}
|
||||
helpText={t("password.currentPasswordHelpText")}
|
||||
/>
|
||||
<PasswordConfirmation
|
||||
passwordChanged={this.passwordChanged}
|
||||
@@ -120,7 +120,7 @@ class ChangeUserPassword extends React.Component<Props, State> {
|
||||
<SubmitButton
|
||||
disabled={!this.state.password}
|
||||
loading={loading}
|
||||
label={t("user-form.submit")}
|
||||
label={t("password.submit")}
|
||||
/>
|
||||
</form>
|
||||
);
|
||||
@@ -138,4 +138,4 @@ class ChangeUserPassword extends React.Component<Props, State> {
|
||||
};
|
||||
}
|
||||
|
||||
export default translate("users")(ChangeUserPassword);
|
||||
export default translate("commons")(ChangeUserPassword);
|
||||
|
||||
Reference in New Issue
Block a user