Skip to content

Commit

Permalink
Merge pull request #241 from intuitem/hotfix/missing-translation
Browse files Browse the repository at this point in the history
Hotfix/missing translation
  • Loading branch information
eric-intuitem authored Apr 15, 2024
2 parents b2734f0 + f2c5c46 commit 7d739cd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
7 changes: 6 additions & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,5 +500,10 @@
"missingMandatoyObjects1": "Some mandatory objects to {model} are not created or imported yet",
"missingMandatoyObjects2": "Please add them before proceeding",
"attemptToDeleteOnlyAdminAccountError": "You can't delete the only admin account of your application.",
"attemptToRemoveOnlyAdminUserGroup": "You can't remove the only admin user of the application from the admin user group."
"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",
"youCanSetNewPassword": "You can set a new password here",
"userWillBeDisconnected": "The user will be disconnected and will need to log in again"
}
7 changes: 6 additions & 1 deletion frontend/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,5 +500,10 @@
"missingMandatoyObjects1": "Des objets obligatoires pour {model} ne sont pas encore créés ou importés",
"missingMandatoyObjects2": "Veuillez les ajouter avant de continuer",
"attemptToDeleteOnlyAdminAccountError": "Vous ne pouvez pas supprimer votre unique compte administrateur de l'application.",
"attemptToRemoveOnlyAdminUserGroup": "Vous ne pouvez pas retirer le seul compte administrateur de l'application du groupe des administrateurs."
"attemptToRemoveOnlyAdminUserGroup": "Vous ne pouvez pas retirer le seul compte administrateur de l'application du groupe des administrateurs.",
"setTemporaryPassword1": "Si l'utilisateur ne peut pas définir son propre mot de passe, vous pouvez",
"setTemporaryPassword": "définir un mot de passe temporaire",
"setTemporaryPassword2": "Veuillez en utiliser un solide et assurez-vous d'informer l'utilisateur de le modifier dès que possible.",
"youCanSetNewPassword": "Vous pouvez définir un nouveau mot de passe ici",
"userWillBeDisconnected": "L'utilisateur sera déconnecté et devra se reconnecter"
}
8 changes: 5 additions & 3 deletions frontend/src/routes/(app)/users/[id=uuid]/edit/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import { page } from '$app/stores';
import { breadcrumbObject } from '$lib/utils/stores';
import * as m from '$paraglide/messages';
export let data: PageData;
breadcrumbObject.set(data.object);
</script>
Expand All @@ -14,10 +16,10 @@
</div>
<div class="card bg-white shadow p-4 mt-2">
<p class="text-gray-500 text-sm">
In case the user cannot set their own password, you can <a
{m.setTemporaryPassword1()} <a
href="{$page.url.pathname}/set-password"
class="text-primary-700 hover:text-primary-500"
data-testid="set-password-btn">set a temporary password</a
>. Please use a strong one and make sure to inform the user to change it as soon as possible.
data-testid="set-password-btn">{m.setTemporaryPassword()}</a
>. {m.setTemporaryPassword2()}.
</p>
</div>
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 7d739cd

Please sign in to comment.