refactor: Improve i18n for complete account

This commit is contained in:
Myzel394 2023-03-04 22:54:52 +01:00
parent e5d1ee73c6
commit 648a222aef
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B
3 changed files with 7 additions and 21 deletions

View File

@ -8,5 +8,9 @@
"title": "Set up your password",
"description": "Please enter a safe password so that we can encrypt your data."
}
},
"alreadyCompleted": {
"title": "Encryption already enabled",
"description": "You already have encryption enabled. Changing passwords is currently not supported."
}
}

View File

@ -28,22 +28,6 @@
},
"CompleteAccountRoute": {
"forms": {
"password": {
"title": "Set up your password",
"description": "Please enter a safe password so that we can encrypt your data.",
"continueAction": "Continue",
"form": {
"password": {
"label": "Password",
"placeholder": "********"
},
"passwordConfirm": {
"label": "Confirm Password",
"placeholder": "Re-enter your password",
"mustMatchHelperText": "Passwords do not match."
}
}
},
"available": {
"title": "Encryption already enabled",
"description": "You already have encryption enabled. Changing passwords is currently not supported."

View File

@ -9,7 +9,7 @@ import GenerateEmailReportsForm from "~/route-widgets/CompleteAccountRoute/Gener
import PasswordForm from "~/route-widgets/CompleteAccountRoute/PasswordForm"
export default function CompleteAccountRoute(): ReactElement {
const {t} = useTranslation()
const {t} = useTranslation("complete-account")
const {encryptionStatus} = useContext(AuthContext)
const navigateToNext = useNavigateToNext()
@ -50,13 +50,11 @@ export default function CompleteAccountRoute(): ReactElement {
>
<Grid item>
<Typography variant="h6" component="h1" align="center">
{t("routes.CompleteAccountRoute.forms.available.title")}
{t("alreadyCompleted.title")}
</Typography>
</Grid>
<Grid item>
<Typography variant="body1">
{t("routes.CompleteAccountRoute.forms.available.description")}
</Typography>
<Typography variant="body1">{t("alreadyCompleted.description")}</Typography>
</Grid>
</Grid>
</Paper>