From 787bc40d21845e319abfd8d3bebb169e649fd297 Mon Sep 17 00:00:00 2001 From: bjarneo Date: Sat, 27 Apr 2024 09:09:44 +0200 Subject: [PATCH] - Add missing translations to account/users & signin routes (#300) * - Add missing translations to account/users & signin routes - Fix signin.signin in English & Dutch * chore: make things work as expected --------- Co-authored-by: ltguillaume --- client/routes/account/users.jsx | 43 ++++++++++++++++-------------- client/routes/signin/index.jsx | 4 +-- public/locales/en/translation.json | 20 +++++++++++--- public/locales/nl/translation.json | 39 ++++++++++++++++++--------- 4 files changed, 69 insertions(+), 37 deletions(-) diff --git a/client/routes/account/users.jsx b/client/routes/account/users.jsx index 2c29f38c..63497d90 100644 --- a/client/routes/account/users.jsx +++ b/client/routes/account/users.jsx @@ -211,10 +211,13 @@ const Users = () => { const openDeleteModal = (user) => { setSuccess(false); openConfirmModal({ - title: 'Delete ' + user.username, + title: `${t('account.users.delete')} ${user.username}`, centered: true, - children: Are you sure you want to delete this user?, - labels: { confirm: 'Delete user', cancel: "No don't delete it" }, + children: {t('account.users.do_you_want_delete')}, + labels: { + confirm: t('account.users.delete_user'), + cancel: t('account.users.dont_delete_user'), + }, confirmProps: { color: 'red' }, onConfirm: () => onDeleteUser(user), }); @@ -239,7 +242,7 @@ const Users = () => { if (!users.length) { return ( - + ); } @@ -251,36 +254,36 @@ const Users = () => { {success && } } - placeholder="Username" + placeholder={t('account.users.username')} disabled={modalState === 'update'} {...form.getInputProps('username')} /> } - placeholder="Email" + placeholder={t('account.users.email')} {...form.getInputProps('email')} /> {modalState === 'add' && ( } - placeholder="Password" + placeholder={t('account.users.password')} {...form.getInputProps('password')} /> )}