diff --git a/apps/core/src/components/schools/create-admin-dialog.tsx b/apps/core/src/components/schools/create-admin-dialog.tsx index 3ea97ac6..d6ab4d30 100644 --- a/apps/core/src/components/schools/create-admin-dialog.tsx +++ b/apps/core/src/components/schools/create-admin-dialog.tsx @@ -24,6 +24,7 @@ import { useForm } from 'react-hook-form' import { toast } from 'sonner' import { z } from 'zod' import { createSchoolAdmin } from '@/core/functions/create-school-admin' +import { useI18nContext } from '@/i18n/i18n-react' const createAdminSchema = z.object({ name: z.string().min(2, 'Le nom doit contenir au moins 2 caractères'), @@ -50,6 +51,7 @@ export function CreateAdminDialog({ null, ) const queryClient = useQueryClient() + const { LL } = useI18nContext() const { register, @@ -238,6 +240,7 @@ export function CreateAdminDialog({ type="button" variant="outline" size="icon" + aria-label={LL.common.copy()} onClick={() => copyToClipboard(credentials.email, 'email')} > @@ -265,6 +268,7 @@ export function CreateAdminDialog({ type="button" variant="outline" size="icon" + aria-label={LL.common.copy()} onClick={() => copyToClipboard(credentials.password, 'password')} > diff --git a/apps/core/src/i18n/en/index.ts b/apps/core/src/i18n/en/index.ts index de655fd3..c7a94b04 100644 --- a/apps/core/src/i18n/en/index.ts +++ b/apps/core/src/i18n/en/index.ts @@ -223,6 +223,8 @@ const en = { submit: 'Submit', reset: 'Reset', clear: 'Clear', + + copy: 'Copy', select: 'Select', selectAll: 'Select All', deselectAll: 'Deselect All', diff --git a/apps/core/src/i18n/fr/index.ts b/apps/core/src/i18n/fr/index.ts index f8e24bc7..71d23840 100644 --- a/apps/core/src/i18n/fr/index.ts +++ b/apps/core/src/i18n/fr/index.ts @@ -224,6 +224,8 @@ const fr: BaseTranslation = { submit: 'Envoyer', reset: 'Réinitialiser', clear: 'Effacer', + + copy: 'Copier', select: 'Sélectionner', selectAll: 'Tout sélectionner', deselectAll: 'Tout désélectionner', diff --git a/apps/core/src/i18n/i18n-types.ts b/apps/core/src/i18n/i18n-types.ts index 0bdd9696..4ceda5d6 100644 --- a/apps/core/src/i18n/i18n-types.ts +++ b/apps/core/src/i18n/i18n-types.ts @@ -636,6 +636,10 @@ type RootTranslation = { * E​f​f​a​c​e​r */ clear: string + /** + * C​o​p​i​e​r + */ + copy: string /** * S​é​l​e​c​t​i​o​n​n​e​r */ @@ -3001,6 +3005,10 @@ export type TranslationFunctions = { * Effacer */ clear: () => LocalizedString + /** + * Copier + */ + copy: () => LocalizedString /** * Sélectionner */