refactor: Improve i18n for logout

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

View File

@ -0,0 +1,4 @@
{
"title": "Log out",
"description": "We are logging you out..."
}

View File

@ -26,29 +26,6 @@
"title": "Overview",
"description": "Not much to see here, yet."
},
"VerifyEmailRoute": {
"title": "Verify your email",
"isLoading": "Verifying your email...",
"isCodeInvalid": "Sorry, but this verification code is invalid.",
"errors": {
"code": {
"invalid": "The verification code is invalid."
}
}
},
"Recover2FARoute": {
"title": "Recover Two-Factor-Authentication",
"description": "We are very sorry if you lost your codes. Please enter a recovery code to continue. Note that this will disable two-factor authentication for your account. You can enable it again in the settings.",
"forms": {
"recoveryCode": {
"label": "Recovery Code"
},
"submit": "Disable 2FA"
},
"unauthorized": "Please make sure to log in first and then reset your two-factor authentication on its screen.",
"canLoginNow": "Two-factor authentication has been disabled. You can now log in.",
"loggedIn": "Two-factor authentication has been disabled. You are now logged in."
},
"CompleteAccountRoute": {
"forms": {
"generateReports": {

View File

@ -8,7 +8,7 @@ import {useNavigateToNext} from "~/hooks"
import {AuthContext} from "~/components"
export default function LogoutRoute(): ReactElement {
const {t} = useTranslation()
const {t} = useTranslation("logout")
const navigateToNext = useNavigateToNext("/auth/login")
const {logout} = useContext(AuthContext)
@ -23,16 +23,14 @@ export default function LogoutRoute(): ReactElement {
<Grid container spacing={4} direction="column" alignItems="center">
<Grid item>
<Typography variant="h6" component="h1">
{t("routes.LogoutRoute.title")}
{t("title")}
</Typography>
</Grid>
<Grid item>
<CircularProgress />
</Grid>
<Grid item>
<Typography variant="body1">
{t("routes.LogoutRoute.description")}
</Typography>
<Typography variant="body1">{t("description")}</Typography>
</Grid>
</Grid>
</Box>