Skip to content

Commit

Permalink
locale: add translations for set-password page
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Apr 15, 2024
1 parent e593187 commit a972049
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -503,5 +503,7 @@
"attemptToRemoveOnlyAdminUserGroup": "You can't remove the only admin user of the application from the admin user group.",
"setTemporaryPassword1": "In case the user cannot set their own password, you can",
"setTemporaryPassword": "set a temporary password",
"setTemporaryPassword2": "Please use a strong one and make sure to inform the user to change it as soon as possible"
"setTemporaryPassword2": "Please use a strong one and make sure to inform the user to change it as soon as possible",
"youCanSetNewPassword": "You can set a new password here",
"userWillBeDisconnected": "The user will be disconnected and will need to log in again"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import TextField from '$lib/components/Forms/TextField.svelte';
import { SetPasswordSchema } from '$lib/utils/schemas';
import * as m from '$paraglide/messages';
export let data: PageData;
function getUUID() {
Expand All @@ -19,8 +21,8 @@
<i class="fa-solid fa-key" />
</div>
<p class="text-gray-600 text-sm text-center">
You can set the new password here.<br />
Careful, the user will be disconnected if he has a session running.
{m.youCanSetNewPassword()}.<br />
{m.userWillBeDisconnected()}.
</p>
<!-- SuperForm with dataType 'form' -->
<div class="flex w-full">
Expand All @@ -32,17 +34,17 @@
validators={SetPasswordSchema}
>
<input class="input" type="hidden" name="user" value={getUUID()} />
<TextField type="password" {form} field="new_password" label="New password" mandatory />
<TextField type="password" {form} field="new_password" label={m.newPassword()} mandatory />
<TextField
type="password"
{form}
field="confirm_new_password"
label="Confirm new password"
label={m.confirmNewPassword()}
mandatory
/>
<p class="pt-3">
<button class="btn variant-filled-primary font-semibold w-full" data-testid="save-button" type="submit"
>Set Password</button
>{m.setPassword()}</button
>
</p>
</SuperForm>
Expand Down

0 comments on commit a972049

Please sign in to comment.