Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/core/src/components/schools/create-admin-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -50,6 +51,7 @@ export function CreateAdminDialog({
null,
)
const queryClient = useQueryClient()
const { LL } = useI18nContext()

const {
register,
Expand Down Expand Up @@ -238,6 +240,7 @@ export function CreateAdminDialog({
type="button"
variant="outline"
size="icon"
aria-label={LL.common.copy()}
onClick={() =>
copyToClipboard(credentials.email, 'email')}
>
Expand Down Expand Up @@ -265,6 +268,7 @@ export function CreateAdminDialog({
type="button"
variant="outline"
size="icon"
aria-label={LL.common.copy()}
onClick={() =>
copyToClipboard(credentials.password, 'password')}
>
Expand Down
2 changes: 2 additions & 0 deletions apps/core/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ const en = {
submit: 'Submit',
reset: 'Reset',
clear: 'Clear',

copy: 'Copy',
select: 'Select',
selectAll: 'Select All',
deselectAll: 'Deselect All',
Expand Down
2 changes: 2 additions & 0 deletions apps/core/src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 8 additions & 0 deletions apps/core/src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -3001,6 +3005,10 @@ export type TranslationFunctions = {
* Effacer
*/
clear: () => LocalizedString
/**
* Copier
*/
copy: () => LocalizedString
/**
* Sélectionner
*/
Expand Down
Loading