@transfergratis/react-native-sdk 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/axios.d.ts +30 -0
- package/build/api/axios.d.ts.map +1 -0
- package/build/api/axios.js +92 -0
- package/build/api/axios.js.map +1 -0
- package/build/components/EnhancedCameraView.d.ts +1 -41
- package/build/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.js +75 -34
- package/build/components/EnhancedCameraView.js.map +1 -1
- package/build/components/EnhancedCameraView.web.d.ts +1 -41
- package/build/components/EnhancedCameraView.web.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.web.js +28 -4
- package/build/components/EnhancedCameraView.web.js.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts +2 -2
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.js +71 -114
- package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.js +7 -3
- package/build/components/KYCElements/FileUploadTemplate.js.map +1 -1
- package/build/components/KYCElements/IDCardCapture.d.ts +7 -2
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/components/KYCElements/IDCardCapture.js +253 -104
- package/build/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/components/KYCElements/InitializationStep.d.ts +5 -0
- package/build/components/KYCElements/InitializationStep.d.ts.map +1 -0
- package/build/components/KYCElements/InitializationStep.js +41 -0
- package/build/components/KYCElements/InitializationStep.js.map +1 -0
- package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/LocationCaptureTemplate.js +15 -13
- package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCapture.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCapture.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -1
- package/build/components/KYCElements/ReviewSubmitTemplate.d.ts +12 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.js +171 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.js.map +1 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts +6 -2
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/SelfieCaptureTemplate.js +105 -35
- package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/VerificationProgressTemplate.d.ts +12 -0
- package/build/components/KYCElements/VerificationProgressTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/VerificationProgressTemplate.js +93 -0
- package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -0
- package/build/components/OverLay/IdCard.d.ts +1 -1
- package/build/components/OverLay/IdCard.d.ts.map +1 -1
- package/build/components/OverLay/IdCard.js +10 -6
- package/build/components/OverLay/IdCard.js.map +1 -1
- package/build/components/OverLay/SelfieOverlay.d.ts +1 -1
- package/build/components/OverLay/SelfieOverlay.d.ts.map +1 -1
- package/build/components/OverLay/SelfieOverlay.js +5 -4
- package/build/components/OverLay/SelfieOverlay.js.map +1 -1
- package/build/components/OverLay/type.d.ts +71 -1
- package/build/components/OverLay/type.d.ts.map +1 -1
- package/build/components/OverLay/type.js.map +1 -1
- package/build/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/components/TemplateKYCExample.js +72 -197
- package/build/components/TemplateKYCExample.js.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.js +63 -39
- package/build/components/TemplateKYCFlowRefactored.js.map +1 -1
- package/build/components/example/OrientationVideoExample.d.ts.map +1 -1
- package/build/components/example/OrientationVideoExample.js +1 -5
- package/build/components/example/OrientationVideoExample.js.map +1 -1
- package/build/config/countriesData.d.ts +3 -0
- package/build/config/countriesData.d.ts.map +1 -0
- package/build/config/countriesData.js +79 -0
- package/build/config/countriesData.js.map +1 -0
- package/build/config/region_mapping.d.ts +3 -0
- package/build/config/region_mapping.d.ts.map +1 -0
- package/build/config/region_mapping.js +687 -0
- package/build/config/region_mapping.js.map +1 -0
- package/build/hooks/useI18n.d.ts +11 -0
- package/build/hooks/useI18n.d.ts.map +1 -0
- package/build/hooks/useI18n.js +37 -0
- package/build/hooks/useI18n.js.map +1 -0
- package/build/hooks/useOrientationVideo.d.ts +1 -2
- package/build/hooks/useOrientationVideo.d.ts.map +1 -1
- package/build/hooks/useOrientationVideo.js +2 -1
- package/build/hooks/useOrientationVideo.js.map +1 -1
- package/build/hooks/useRealtimeVerifier.d.ts +28 -0
- package/build/hooks/useRealtimeVerifier.d.ts.map +1 -0
- package/build/hooks/useRealtimeVerifier.js +91 -0
- package/build/hooks/useRealtimeVerifier.js.map +1 -0
- package/build/hooks/useTemplateKYCFlow.d.ts +1 -0
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/hooks/useTemplateKYCFlow.js +337 -38
- package/build/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/i18n/en/index.d.ts +168 -0
- package/build/i18n/en/index.d.ts.map +1 -0
- package/build/i18n/en/index.js +195 -0
- package/build/i18n/en/index.js.map +1 -0
- package/build/i18n/fr/index.d.ts +168 -0
- package/build/i18n/fr/index.d.ts.map +1 -0
- package/build/i18n/fr/index.js +194 -0
- package/build/i18n/fr/index.js.map +1 -0
- package/build/i18n/index.d.ts +10 -0
- package/build/i18n/index.d.ts.map +1 -0
- package/build/i18n/index.js +56 -0
- package/build/i18n/index.js.map +1 -0
- package/build/i18n/types.d.ts +153 -0
- package/build/i18n/types.d.ts.map +1 -0
- package/build/i18n/types.js +3 -0
- package/build/i18n/types.js.map +1 -0
- package/build/i18n/usage-example.d.ts +4 -0
- package/build/i18n/usage-example.d.ts.map +1 -0
- package/build/i18n/usage-example.js +189 -0
- package/build/i18n/usage-example.js.map +1 -0
- package/build/modules/api/CardAuthentification.d.ts +22 -0
- package/build/modules/api/CardAuthentification.d.ts.map +1 -0
- package/build/modules/api/CardAuthentification.js +107 -0
- package/build/modules/api/CardAuthentification.js.map +1 -0
- package/build/modules/api/KYCService.d.ts +57 -1
- package/build/modules/api/KYCService.d.ts.map +1 -1
- package/build/modules/api/KYCService.js +348 -27
- package/build/modules/api/KYCService.js.map +1 -1
- package/build/modules/api/SelfieVerification.d.ts +3 -0
- package/build/modules/api/SelfieVerification.d.ts.map +1 -0
- package/build/modules/api/SelfieVerification.js +9 -0
- package/build/modules/api/SelfieVerification.js.map +1 -0
- package/build/modules/api/backendApi.d.ts +2 -0
- package/build/modules/api/backendApi.d.ts.map +1 -0
- package/build/modules/api/backendApi.js +6 -0
- package/build/modules/api/backendApi.js.map +1 -0
- package/build/modules/api/types.d.ts +20 -0
- package/build/modules/api/types.d.ts.map +1 -0
- package/build/modules/api/types.js +2 -0
- package/build/modules/api/types.js.map +1 -0
- package/build/types/KYC.types.d.ts +59 -7
- package/build/types/KYC.types.d.ts.map +1 -1
- package/build/types/KYC.types.js +9 -1
- package/build/types/KYC.types.js.map +1 -1
- package/build/utils/cropByObb.d.ts +11 -0
- package/build/utils/cropByObb.d.ts.map +1 -0
- package/build/utils/cropByObb.js +78 -0
- package/build/utils/cropByObb.js.map +1 -0
- package/build/utils/get-document-type-info.d.ts +13 -0
- package/build/utils/get-document-type-info.d.ts.map +1 -0
- package/build/utils/get-document-type-info.js +59 -0
- package/build/utils/get-document-type-info.js.map +1 -0
- package/build/utils/pathToBase64.d.ts +3 -0
- package/build/utils/pathToBase64.d.ts.map +1 -0
- package/build/utils/pathToBase64.js +47 -0
- package/build/utils/pathToBase64.js.map +1 -0
- package/build/utils/remove-duplicate.d.ts +2 -0
- package/build/utils/remove-duplicate.d.ts.map +1 -0
- package/build/utils/remove-duplicate.js +4 -0
- package/build/utils/remove-duplicate.js.map +1 -0
- package/package.json +3 -1
- package/src/api/axios.ts +144 -0
- package/src/components/EnhancedCameraView.tsx +96 -78
- package/src/components/EnhancedCameraView.web.tsx +41 -40
- package/src/components/KYCElements/CountrySelectionTemplate.tsx +104 -136
- package/src/components/KYCElements/FileUploadTemplate.tsx +14 -8
- package/src/components/KYCElements/IDCardCapture.tsx +311 -115
- package/src/components/KYCElements/InitializationStep.tsx +53 -0
- package/src/components/KYCElements/LocationCaptureTemplate.tsx +17 -15
- package/src/components/KYCElements/OrientationVideoCapture.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +2 -2
- package/src/components/KYCElements/ReviewSubmitTemplate.tsx +201 -0
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +140 -53
- package/src/components/KYCElements/VerificationProgressTemplate.tsx +123 -0
- package/src/components/OverLay/IdCard.tsx +17 -9
- package/src/components/OverLay/SelfieOverlay.tsx +6 -5
- package/src/components/OverLay/type.ts +64 -2
- package/src/components/TemplateKYCExample.tsx +76 -197
- package/src/components/TemplateKYCFlowRefactored.tsx +74 -46
- package/src/components/example/OrientationVideoExample.tsx +3 -7
- package/src/config/countriesData.ts +84 -0
- package/src/config/region_mapping.ts +688 -0
- package/src/hooks/useI18n.ts +53 -0
- package/src/hooks/useOrientationVideo.ts +2 -2
- package/src/hooks/useRealtimeVerifier.ts +128 -0
- package/src/hooks/useTemplateKYCFlow.tsx +375 -53
- package/src/i18n/README.md +288 -0
- package/src/i18n/en/index.ts +206 -0
- package/src/i18n/fr/index.ts +205 -0
- package/src/i18n/index.ts +65 -0
- package/src/i18n/types.ts +172 -0
- package/src/i18n/usage-example.tsx +202 -0
- package/src/modules/api/CardAuthentification.ts +114 -0
- package/src/modules/api/KYCService.ts +403 -30
- package/src/modules/api/SelfieVerification.ts +11 -0
- package/src/modules/api/backendApi.ts +8 -0
- package/src/modules/api/types.ts +24 -0
- package/src/types/KYC.types.ts +83 -14
- package/src/utils/cropByObb.ts +99 -0
- package/src/utils/get-document-type-info.ts +62 -0
- package/src/utils/pathToBase64.ts +47 -0
- package/src/utils/remove-duplicate.ts +3 -0
- package/src/types/nativewind.d.ts +0 -2
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
export const fr = {
|
|
2
|
+
// Common UI elements
|
|
3
|
+
common: {
|
|
4
|
+
next: 'Suivant',
|
|
5
|
+
previous: 'Précédent',
|
|
6
|
+
continue: 'Continuer',
|
|
7
|
+
cancel: 'Annuler',
|
|
8
|
+
confirm: 'Confirmer',
|
|
9
|
+
submit: 'Soumettre',
|
|
10
|
+
retry: 'Réessayer',
|
|
11
|
+
close: 'Fermer',
|
|
12
|
+
back: 'Retour',
|
|
13
|
+
loading: 'Chargement...',
|
|
14
|
+
error: 'Erreur',
|
|
15
|
+
success: 'Succès',
|
|
16
|
+
warning: 'Avertissement',
|
|
17
|
+
info: 'Information',
|
|
18
|
+
},
|
|
19
|
+
// KYC Flow
|
|
20
|
+
kyc: {
|
|
21
|
+
title: 'Vérification d\'Identité',
|
|
22
|
+
subtitle: 'Complétez votre vérification d\'identité pour continuer',
|
|
23
|
+
step: 'Étape %{current} sur %{total}',
|
|
24
|
+
// Initialization
|
|
25
|
+
initialization: {
|
|
26
|
+
title: 'Bienvenue dans la Vérification d\'Identité',
|
|
27
|
+
description: 'Nous devons vérifier votre identité pour respecter les réglementations et assurer la sécurité.',
|
|
28
|
+
startButton: 'Commencer la Vérification',
|
|
29
|
+
requirements: 'Ce dont vous aurez besoin :',
|
|
30
|
+
requirementsList: [
|
|
31
|
+
'Une pièce d\'identité officielle valide',
|
|
32
|
+
'Un bon éclairage pour les photos',
|
|
33
|
+
'Une connexion internet stable'
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
// Location Capture
|
|
37
|
+
locationCapture: {
|
|
38
|
+
title: 'Sécurisez Votre Vérification',
|
|
39
|
+
description: 'Autorisez l\'accès à la localisation pour nous aider à protéger votre compte et à prévenir les activités frauduleuses pendant la vérification.',
|
|
40
|
+
howThisHelps: 'Comment cela aide :',
|
|
41
|
+
howThisHelpsList: '• Vérifie que la localisation de votre appareil correspond à votre identité\n• Détecte et empêche les accès non autorisés\n• Garantit la conformité aux réglementations de sécurité',
|
|
42
|
+
permissionDeniedTitle: 'Permission refusée',
|
|
43
|
+
permissionDeniedMessage: 'La permission de localisation est nécessaire pour continuer.',
|
|
44
|
+
locationDisabledTitle: 'Localisation désactivée',
|
|
45
|
+
locationDisabledMessage: 'Veuillez activer la localisation sur votre appareil pour continuer.',
|
|
46
|
+
errorTitle: 'Erreur',
|
|
47
|
+
errorMessage: 'Impossible de récupérer votre localisation. Veuillez réessayer.',
|
|
48
|
+
obtained: 'Localisation obtenue',
|
|
49
|
+
latitudeLabel: 'Latitude',
|
|
50
|
+
longitudeLabel: 'Longitude',
|
|
51
|
+
accuracyLabel: 'Précision',
|
|
52
|
+
resetButton: 'Réinitialiser',
|
|
53
|
+
enableButton: 'Activer l\'accès à la localisation',
|
|
54
|
+
fetching: 'Récupération...'
|
|
55
|
+
},
|
|
56
|
+
// Country Selection
|
|
57
|
+
countrySelection: {
|
|
58
|
+
title: 'Sélectionnez Votre Pays',
|
|
59
|
+
subtitle: 'Choisissez le pays qui a émis votre document d\'identité',
|
|
60
|
+
searchPlaceholder: 'Recherchez votre pays...',
|
|
61
|
+
noResults: 'Aucun pays trouvé',
|
|
62
|
+
selectCountry: 'Sélectionner le Pays'
|
|
63
|
+
},
|
|
64
|
+
// ID Card Capture
|
|
65
|
+
idCardCapture: {
|
|
66
|
+
title: 'Capturez Votre Document d\'Identité',
|
|
67
|
+
subtitle: 'Prenez une photo claire de votre document d\'identité',
|
|
68
|
+
frontSide: 'Face Avant',
|
|
69
|
+
backSide: 'Face Arrière',
|
|
70
|
+
instructions: {
|
|
71
|
+
title: 'Instructions :',
|
|
72
|
+
list: [
|
|
73
|
+
'Placez votre pièce d\'identité sur une surface plane',
|
|
74
|
+
'Assurez-vous d\'un bon éclairage',
|
|
75
|
+
'Gardez tout le document dans le cadre',
|
|
76
|
+
'Évitez les reflets et les ombres'
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
captureButton: 'Prendre la Photo',
|
|
80
|
+
retakeButton: 'Reprendre',
|
|
81
|
+
usePhotoButton: 'Utiliser Cette Photo',
|
|
82
|
+
processing: 'Traitement de l\'image...',
|
|
83
|
+
success: 'Document d\'identité capturé avec succès',
|
|
84
|
+
error: 'Échec de la capture du document. Veuillez réessayer.'
|
|
85
|
+
},
|
|
86
|
+
// Selfie Capture
|
|
87
|
+
selfieCapture: {
|
|
88
|
+
title: 'Prenez un Selfie',
|
|
89
|
+
subtitle: 'Prenez un selfie clair pour la vérification d\'identité',
|
|
90
|
+
instructions: {
|
|
91
|
+
title: 'Instructions :',
|
|
92
|
+
list: [
|
|
93
|
+
'Regardez directement la caméra',
|
|
94
|
+
'Assurez-vous d\'un bon éclairage sur votre visage',
|
|
95
|
+
'Retirez les lunettes et les chapeaux',
|
|
96
|
+
'Gardez une expression neutre'
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
captureButton: 'Prendre le Selfie',
|
|
100
|
+
retakeButton: 'Reprendre',
|
|
101
|
+
usePhotoButton: 'Utiliser Cette Photo',
|
|
102
|
+
processing: 'Traitement du selfie...',
|
|
103
|
+
success: 'Selfie capturé avec succès',
|
|
104
|
+
error: 'Échec de la capture du selfie. Veuillez réessayer.'
|
|
105
|
+
},
|
|
106
|
+
// File Upload
|
|
107
|
+
fileUpload: {
|
|
108
|
+
title: 'Télécharger le Document',
|
|
109
|
+
subtitle: 'Téléchargez une photo claire de votre document',
|
|
110
|
+
selectFile: 'Sélectionner le Fichier',
|
|
111
|
+
uploadButton: 'Télécharger',
|
|
112
|
+
dragDropText: 'Glissez-déposez votre fichier ici, ou cliquez pour sélectionner',
|
|
113
|
+
supportedFormats: 'Formats supportés : JPG, PNG, PDF',
|
|
114
|
+
maxSize: 'Taille maximale : 10MB',
|
|
115
|
+
processing: 'Traitement du fichier...',
|
|
116
|
+
success: 'Fichier téléchargé avec succès',
|
|
117
|
+
error: 'Échec du téléchargement. Veuillez réessayer.'
|
|
118
|
+
},
|
|
119
|
+
// Verification Progress
|
|
120
|
+
verificationProgress: {
|
|
121
|
+
title: 'Vérification de Votre Identité',
|
|
122
|
+
subtitle: 'Veuillez patienter pendant que nous vérifions vos informations',
|
|
123
|
+
steps: {
|
|
124
|
+
analyzing: 'Analyse des documents...',
|
|
125
|
+
extracting: 'Extraction des informations...',
|
|
126
|
+
verifying: 'Vérification de l\'identité...',
|
|
127
|
+
complete: 'Vérification terminée'
|
|
128
|
+
},
|
|
129
|
+
estimatedTime: 'Temps estimé : 2-3 minutes',
|
|
130
|
+
status: {
|
|
131
|
+
pending: 'En attente',
|
|
132
|
+
processing: 'En cours',
|
|
133
|
+
completed: 'Terminé',
|
|
134
|
+
failed: 'Échoué'
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
// Review and Submit
|
|
138
|
+
reviewSubmit: {
|
|
139
|
+
title: 'Vérifiez Vos Informations',
|
|
140
|
+
subtitle: 'Veuillez vérifier les informations que nous avons extraites',
|
|
141
|
+
personalInfo: 'Informations Personnelles',
|
|
142
|
+
documentInfo: 'Informations du Document',
|
|
143
|
+
editButton: 'Modifier',
|
|
144
|
+
submitButton: 'Soumettre pour Vérification',
|
|
145
|
+
confirmMessage: 'Êtes-vous sûr de vouloir soumettre ces informations ?',
|
|
146
|
+
processing: 'Soumission...',
|
|
147
|
+
success: 'Informations soumises avec succès',
|
|
148
|
+
error: 'Échec de la soumission. Veuillez réessayer.'
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
// Camera and Media
|
|
152
|
+
camera: {
|
|
153
|
+
permissionTitle: 'Permission Caméra Requise',
|
|
154
|
+
permissionMessage: 'Nous avons besoin d\'accéder à votre caméra pour capturer votre pièce d\'identité et votre selfie.',
|
|
155
|
+
permissionButton: 'Accorder la Permission',
|
|
156
|
+
settingsButton: 'Ouvrir les Paramètres',
|
|
157
|
+
notAvailable: 'Caméra non disponible',
|
|
158
|
+
switchCamera: 'Changer de Caméra',
|
|
159
|
+
flashOn: 'Flash Activé',
|
|
160
|
+
flashOff: 'Flash Désactivé',
|
|
161
|
+
capturePhoto: 'Prendre la Photo',
|
|
162
|
+
processing: 'Traitement...',
|
|
163
|
+
permissionRequired: 'Permission caméra requise. Veuillez accorder la permission pour continuer.',
|
|
164
|
+
deviceNotAvailable: 'Appareil photo non disponible',
|
|
165
|
+
notReady: 'Caméra pas prête',
|
|
166
|
+
analyzing: 'Analyse en cours...',
|
|
167
|
+
errorOccurred: 'Erreur de caméra survenue',
|
|
168
|
+
failedToCapture: 'Échec de la capture photo',
|
|
169
|
+
failedToStartRecording: 'Échec du démarrage de l\'enregistrement vidéo',
|
|
170
|
+
failedToStopRecording: 'Échec de l\'arrêt de l\'enregistrement vidéo'
|
|
171
|
+
},
|
|
172
|
+
// Errors
|
|
173
|
+
errors: {
|
|
174
|
+
networkError: 'Erreur réseau. Veuillez vérifier votre connexion.',
|
|
175
|
+
serverError: 'Erreur serveur. Veuillez réessayer plus tard.',
|
|
176
|
+
validationError: 'Veuillez vérifier vos informations et réessayer.',
|
|
177
|
+
cameraError: 'Erreur caméra. Veuillez réessayer.',
|
|
178
|
+
fileError: 'Erreur fichier. Veuillez réessayer.',
|
|
179
|
+
timeoutError: 'Délai d\'attente dépassé. Veuillez réessayer.',
|
|
180
|
+
unknownError: 'Une erreur inconnue s\'est produite. Veuillez réessayer.'
|
|
181
|
+
},
|
|
182
|
+
validation: {
|
|
183
|
+
required: 'Ce champ est obligatoire',
|
|
184
|
+
invalidEmail: 'Veuillez entrer une adresse email valide',
|
|
185
|
+
invalidPhone: 'Veuillez entrer un numéro de téléphone valide',
|
|
186
|
+
invalidDate: 'Veuillez entrer une date valide',
|
|
187
|
+
minLength: 'Doit contenir au moins {min} caractères',
|
|
188
|
+
maxLength: 'Ne doit pas dépasser {max} caractères',
|
|
189
|
+
invalidFormat: 'Format invalide',
|
|
190
|
+
fileTooLarge: 'Fichier trop volumineux',
|
|
191
|
+
fileTypeNotSupported: 'Type de fichier non supporté'
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,aAAa;KACpB;IAED,WAAW;IACX,GAAG,EAAE;QACH,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,yDAAyD;QACnE,IAAI,EAAE,+BAA+B;QAErC,iBAAiB;QACjB,cAAc,EAAE;YACd,KAAK,EAAE,4CAA4C;YACnD,WAAW,EAAE,gGAAgG;YAC7G,WAAW,EAAE,2BAA2B;YACxC,YAAY,EAAE,6BAA6B;YAC3C,gBA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uDAAuD;YACvE,UAAU,EAAE,eAAe;YAC3B,OAAO,EAAE,mCAAmC;YAC5C,KAAK,EAAE,6CAA6C;SACrD;KACF;IAED,mBAAmB;IACnB,MAAM,EAAE;QACN,eAAe,EAAE,2BAA2B;QAC5C,iBAAiB,EAAE,oGAAoG;QACvH,gBAAgB,EAAE,wBAAwB;QAC1C,cAAc,EAAE,uBAAuB;QACvC,YAAY,EAAE,uBAAuB;QACrC,YAAY,EAAE,mBAAmB;QACjC,OAAO,EAAE,cAAc;QACvB,QAAQ,EAAE,iBAAiB;QAC3B,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,eAAe;QAC3B,kBAAkB,EAAE,4EAA4E;QAChG,kBAAkB,EAAE,+BAA+B;QACnD,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,qBAAqB;QAChC,aAAa,EAAE,2BAA2B;QAC1C,eAAe,EAAE,2BAA2B;QAC5C,sBAAsB,EAAE,+CAA+C;QACvE,qBAAqB,EAAE,8CAA8C;KACtE;IAED,SAAS;IACT,MAAM,EAAE;QACN,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,+CAA+C;QAC5D,eAAe,EAAE,kDAAkD;QACnE,WAAW,EAAE,oCAAoC;QACjD,SAAS,EAAE,qCAAqC;QAChD,YAAY,EAAE,+CAA+C;QAC7D,YAAY,EAAE,0DAA0D;KACzE;IAED,UAAU,EAAE;QACV,QAAQ,EAAE,0BAA0B;QACpC,YAAY,EAAE,0CAA0C;QACxD,YAAY,EAAE,+CAA+C;QAC7D,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,yCAAyC;QACpD,SAAS,EAAE,uCAAuC;QAClD,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,yBAAyB;QACvC,oBAAoB,EAAE,8BAA8B;KACrD;CACF,CAAC","sourcesContent":["export const fr = {\n // Common UI elements\n common: {\n next: 'Suivant',\n previous: 'Précédent',\n continue: 'Continuer',\n cancel: 'Annuler',\n confirm: 'Confirmer',\n submit: 'Soumettre',\n retry: 'Réessayer',\n close: 'Fermer',\n back: 'Retour',\n loading: 'Chargement...',\n error: 'Erreur',\n success: 'Succès',\n warning: 'Avertissement',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Vérification d\\'Identité',\n subtitle: 'Complétez votre vérification d\\'identité pour continuer',\n step: 'Étape %{current} sur %{total}',\n \n // Initialization\n initialization: {\n title: 'Bienvenue dans la Vérification d\\'Identité',\n description: 'Nous devons vérifier votre identité pour respecter les réglementations et assurer la sécurité.',\n startButton: 'Commencer la Vérification',\n requirements: 'Ce dont vous aurez besoin :',\n requirementsList: [\n 'Une pièce d\\'identité officielle valide',\n 'Un bon éclairage pour les photos',\n 'Une connexion internet stable'\n ]\n },\n\n // Location Capture\n locationCapture: {\n title: 'Sécurisez Votre Vérification',\n description: 'Autorisez l\\'accès à la localisation pour nous aider à protéger votre compte et à prévenir les activités frauduleuses pendant la vérification.',\n howThisHelps: 'Comment cela aide :',\n howThisHelpsList: '• Vérifie que la localisation de votre appareil correspond à votre identité\\n• Détecte et empêche les accès non autorisés\\n• Garantit la conformité aux réglementations de sécurité',\n permissionDeniedTitle: 'Permission refusée',\n permissionDeniedMessage: 'La permission de localisation est nécessaire pour continuer.',\n locationDisabledTitle: 'Localisation désactivée',\n locationDisabledMessage: 'Veuillez activer la localisation sur votre appareil pour continuer.',\n errorTitle: 'Erreur',\n errorMessage: 'Impossible de récupérer votre localisation. Veuillez réessayer.',\n obtained: 'Localisation obtenue',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Précision',\n resetButton: 'Réinitialiser',\n enableButton: 'Activer l\\'accès à la localisation',\n fetching: 'Récupération...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Sélectionnez Votre Pays',\n subtitle: 'Choisissez le pays qui a émis votre document d\\'identité',\n searchPlaceholder: 'Recherchez votre pays...',\n noResults: 'Aucun pays trouvé',\n selectCountry: 'Sélectionner le Pays'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capturez Votre Document d\\'Identité',\n subtitle: 'Prenez une photo claire de votre document d\\'identité',\n frontSide: 'Face Avant',\n backSide: 'Face Arrière',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Placez votre pièce d\\'identité sur une surface plane',\n 'Assurez-vous d\\'un bon éclairage',\n 'Gardez tout le document dans le cadre',\n 'Évitez les reflets et les ombres'\n ]\n },\n captureButton: 'Prendre la Photo',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement de l\\'image...',\n success: 'Document d\\'identité capturé avec succès',\n error: 'Échec de la capture du document. Veuillez réessayer.'\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Prenez un Selfie',\n subtitle: 'Prenez un selfie clair pour la vérification d\\'identité',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Regardez directement la caméra',\n 'Assurez-vous d\\'un bon éclairage sur votre visage',\n 'Retirez les lunettes et les chapeaux',\n 'Gardez une expression neutre'\n ]\n },\n captureButton: 'Prendre le Selfie',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement du selfie...',\n success: 'Selfie capturé avec succès',\n error: 'Échec de la capture du selfie. Veuillez réessayer.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Télécharger le Document',\n subtitle: 'Téléchargez une photo claire de votre document',\n selectFile: 'Sélectionner le Fichier',\n uploadButton: 'Télécharger',\n dragDropText: 'Glissez-déposez votre fichier ici, ou cliquez pour sélectionner',\n supportedFormats: 'Formats supportés : JPG, PNG, PDF',\n maxSize: 'Taille maximale : 10MB',\n processing: 'Traitement du fichier...',\n success: 'Fichier téléchargé avec succès',\n error: 'Échec du téléchargement. Veuillez réessayer.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Vérification de Votre Identité',\n subtitle: 'Veuillez patienter pendant que nous vérifions vos informations',\n steps: {\n analyzing: 'Analyse des documents...',\n extracting: 'Extraction des informations...',\n verifying: 'Vérification de l\\'identité...',\n complete: 'Vérification terminée'\n },\n estimatedTime: 'Temps estimé : 2-3 minutes',\n status: {\n pending: 'En attente',\n processing: 'En cours',\n completed: 'Terminé',\n failed: 'Échoué'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Vérifiez Vos Informations',\n subtitle: 'Veuillez vérifier les informations que nous avons extraites',\n personalInfo: 'Informations Personnelles',\n documentInfo: 'Informations du Document',\n editButton: 'Modifier',\n submitButton: 'Soumettre pour Vérification',\n confirmMessage: 'Êtes-vous sûr de vouloir soumettre ces informations ?',\n processing: 'Soumission...',\n success: 'Informations soumises avec succès',\n error: 'Échec de la soumission. Veuillez réessayer.'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Permission Caméra Requise',\n permissionMessage: 'Nous avons besoin d\\'accéder à votre caméra pour capturer votre pièce d\\'identité et votre selfie.',\n permissionButton: 'Accorder la Permission',\n settingsButton: 'Ouvrir les Paramètres',\n notAvailable: 'Caméra non disponible',\n switchCamera: 'Changer de Caméra',\n flashOn: 'Flash Activé',\n flashOff: 'Flash Désactivé',\n capturePhoto: 'Prendre la Photo',\n processing: 'Traitement...',\n permissionRequired: 'Permission caméra requise. Veuillez accorder la permission pour continuer.',\n deviceNotAvailable: 'Appareil photo non disponible',\n notReady: 'Caméra pas prête',\n analyzing: 'Analyse en cours...',\n errorOccurred: 'Erreur de caméra survenue',\n failedToCapture: 'Échec de la capture photo',\n failedToStartRecording: 'Échec du démarrage de l\\'enregistrement vidéo',\n failedToStopRecording: 'Échec de l\\'arrêt de l\\'enregistrement vidéo'\n },\n\n // Errors\n errors: {\n networkError: 'Erreur réseau. Veuillez vérifier votre connexion.',\n serverError: 'Erreur serveur. Veuillez réessayer plus tard.',\n validationError: 'Veuillez vérifier vos informations et réessayer.',\n cameraError: 'Erreur caméra. Veuillez réessayer.',\n fileError: 'Erreur fichier. Veuillez réessayer.',\n timeoutError: 'Délai d\\'attente dépassé. Veuillez réessayer.',\n unknownError: 'Une erreur inconnue s\\'est produite. Veuillez réessayer.'\n },\n\n validation: {\n required: 'Ce champ est obligatoire',\n invalidEmail: 'Veuillez entrer une adresse email valide',\n invalidPhone: 'Veuillez entrer un numéro de téléphone valide',\n invalidDate: 'Veuillez entrer une date valide',\n minLength: 'Doit contenir au moins {min} caractères',\n maxLength: 'Ne doit pas dépasser {max} caractères',\n invalidFormat: 'Format invalide',\n fileTooLarge: 'Fichier trop volumineux',\n fileTypeNotSupported: 'Type de fichier non supporté'\n }\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { I18n } from 'i18n-js';
|
|
2
|
+
declare const i18n: I18n;
|
|
3
|
+
export declare const setLocale: (locale: string) => void;
|
|
4
|
+
export declare const getCurrentLocale: () => string;
|
|
5
|
+
export declare const getAvailableLocales: () => string[];
|
|
6
|
+
export declare const translate: (key: string, options?: any) => string;
|
|
7
|
+
export declare const translatePlural: (key: string, count: number, options?: any) => string;
|
|
8
|
+
export { i18n };
|
|
9
|
+
export default i18n;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAK/B,QAAA,MAAM,IAAI,MAAa,CAAC;AA8BxB,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,SAOvC,CAAC;AAGF,eAAO,MAAM,gBAAgB,cAAoB,CAAC;AAGlD,eAAO,MAAM,mBAAmB,gBAAuC,CAAC;AAGxE,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,EAAE,UAAU,GAAG,WAEnD,CAAC;AAGF,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM,EAAE,UAAU,GAAG,WAExE,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,CAAC;AAGhB,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { I18n } from 'i18n-js';
|
|
2
|
+
import { en } from './en';
|
|
3
|
+
import { fr } from './fr';
|
|
4
|
+
// Create i18n instance
|
|
5
|
+
const i18n = new I18n();
|
|
6
|
+
// Set translations
|
|
7
|
+
i18n.translations = {
|
|
8
|
+
en,
|
|
9
|
+
fr,
|
|
10
|
+
};
|
|
11
|
+
// Set default locale
|
|
12
|
+
i18n.defaultLocale = 'en';
|
|
13
|
+
// Set current locale
|
|
14
|
+
i18n.locale = 'en';
|
|
15
|
+
// Enable fallback to default locale
|
|
16
|
+
i18n.enableFallback = true;
|
|
17
|
+
// Configure pluralization rules
|
|
18
|
+
i18n.pluralization = {
|
|
19
|
+
en: (count) => {
|
|
20
|
+
if (count === 1)
|
|
21
|
+
return 'one';
|
|
22
|
+
return 'other';
|
|
23
|
+
},
|
|
24
|
+
fr: (count) => {
|
|
25
|
+
if (count === 0 || count === 1)
|
|
26
|
+
return 'one';
|
|
27
|
+
return 'other';
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
// Helper function to set locale
|
|
31
|
+
export const setLocale = (locale) => {
|
|
32
|
+
if (i18n.translations[locale]) {
|
|
33
|
+
i18n.locale = locale;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
console.warn(`Locale '${locale}' not found. Falling back to default locale.`);
|
|
37
|
+
i18n.locale = i18n.defaultLocale;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
// Helper function to get current locale
|
|
41
|
+
export const getCurrentLocale = () => i18n.locale;
|
|
42
|
+
// Helper function to get available locales
|
|
43
|
+
export const getAvailableLocales = () => Object.keys(i18n.translations);
|
|
44
|
+
// Helper function to translate with interpolation
|
|
45
|
+
export const translate = (key, options) => {
|
|
46
|
+
return i18n.t(key, options);
|
|
47
|
+
};
|
|
48
|
+
// Helper function to translate with pluralization
|
|
49
|
+
export const translatePlural = (key, count, options) => {
|
|
50
|
+
return i18n.t(key, { count, ...options });
|
|
51
|
+
};
|
|
52
|
+
// Export the i18n instance
|
|
53
|
+
export { i18n };
|
|
54
|
+
// Export default
|
|
55
|
+
export default i18n;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,uBAAuB;AACvB,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;AAExB,mBAAmB;AACnB,IAAI,CAAC,YAAY,GAAG;IAClB,EAAE;IACF,EAAE;CACH,CAAC;AAEF,qBAAqB;AACrB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;AAEnB,oCAAoC;AACpC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;AAE3B,gCAAgC;AAChC,IAAI,CAAC,aAAa,GAAG;IACnB,EAAE,EAAE,CAAC,KAAa,EAAE,EAAE;QACpB,IAAI,KAAK,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAC9B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,EAAE,EAAE,CAAC,KAAa,EAAE,EAAE;QACpB,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAC7C,OAAO,OAAO,CAAC;IACjB,CAAC;CACK,CAAC;AAET,gCAAgC;AAChC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,EAAE;IAC1C,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CAAC,WAAW,MAAM,8CAA8C,CAAC,CAAC;QAC9E,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC;IACnC,CAAC;AACH,CAAC,CAAC;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;AAElD,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAExE,kDAAkD;AAClD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,OAAa,EAAE,EAAE;IACtD,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,kDAAkD;AAClD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,OAAa,EAAE,EAAE;IAC3E,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,2BAA2B;AAC3B,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,iBAAiB;AACjB,eAAe,IAAI,CAAC","sourcesContent":["import { I18n } from 'i18n-js';\nimport { en } from './en';\nimport { fr } from './fr';\n\n// Create i18n instance\nconst i18n = new I18n();\n\n// Set translations\ni18n.translations = {\n en,\n fr,\n};\n\n// Set default locale\ni18n.defaultLocale = 'en';\n\n// Set current locale\ni18n.locale = 'en';\n\n// Enable fallback to default locale\ni18n.enableFallback = true;\n\n// Configure pluralization rules\ni18n.pluralization = {\n en: (count: number) => {\n if (count === 1) return 'one';\n return 'other';\n },\n fr: (count: number) => {\n if (count === 0 || count === 1) return 'one';\n return 'other';\n },\n} as any;\n\n// Helper function to set locale\nexport const setLocale = (locale: string) => {\n if (i18n.translations[locale]) {\n i18n.locale = locale;\n } else {\n console.warn(`Locale '${locale}' not found. Falling back to default locale.`);\n i18n.locale = i18n.defaultLocale;\n }\n};\n\n// Helper function to get current locale\nexport const getCurrentLocale = () => i18n.locale;\n\n// Helper function to get available locales\nexport const getAvailableLocales = () => Object.keys(i18n.translations);\n\n// Helper function to translate with interpolation\nexport const translate = (key: string, options?: any) => {\n return i18n.t(key, options);\n};\n\n// Helper function to translate with pluralization\nexport const translatePlural = (key: string, count: number, options?: any) => {\n return i18n.t(key, { count, ...options });\n};\n\n// Export the i18n instance\nexport { i18n };\n\n// Export default\nexport default i18n;\n"]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
export interface CommonTranslations {
|
|
2
|
+
next: string;
|
|
3
|
+
previous: string;
|
|
4
|
+
continue: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
confirm: string;
|
|
7
|
+
submit: string;
|
|
8
|
+
retry: string;
|
|
9
|
+
close: string;
|
|
10
|
+
back: string;
|
|
11
|
+
loading: string;
|
|
12
|
+
error: string;
|
|
13
|
+
success: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
info: string;
|
|
16
|
+
}
|
|
17
|
+
export interface KYCTranslations {
|
|
18
|
+
title: string;
|
|
19
|
+
subtitle: string;
|
|
20
|
+
step: string;
|
|
21
|
+
initialization: {
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
startButton: string;
|
|
25
|
+
requirements: string;
|
|
26
|
+
requirementsList: string[];
|
|
27
|
+
};
|
|
28
|
+
countrySelection: {
|
|
29
|
+
title: string;
|
|
30
|
+
subtitle: string;
|
|
31
|
+
searchPlaceholder: string;
|
|
32
|
+
noResults: string;
|
|
33
|
+
selectCountry: string;
|
|
34
|
+
};
|
|
35
|
+
idCardCapture: {
|
|
36
|
+
title: string;
|
|
37
|
+
subtitle: string;
|
|
38
|
+
frontSide: string;
|
|
39
|
+
backSide: string;
|
|
40
|
+
instructions: {
|
|
41
|
+
title: string;
|
|
42
|
+
list: string[];
|
|
43
|
+
};
|
|
44
|
+
captureButton: string;
|
|
45
|
+
retakeButton: string;
|
|
46
|
+
usePhotoButton: string;
|
|
47
|
+
processing: string;
|
|
48
|
+
success: string;
|
|
49
|
+
error: string;
|
|
50
|
+
};
|
|
51
|
+
selfieCapture: {
|
|
52
|
+
title: string;
|
|
53
|
+
subtitle: string;
|
|
54
|
+
instructions: {
|
|
55
|
+
title: string;
|
|
56
|
+
list: string[];
|
|
57
|
+
};
|
|
58
|
+
captureButton: string;
|
|
59
|
+
retakeButton: string;
|
|
60
|
+
usePhotoButton: string;
|
|
61
|
+
processing: string;
|
|
62
|
+
success: string;
|
|
63
|
+
error: string;
|
|
64
|
+
};
|
|
65
|
+
fileUpload: {
|
|
66
|
+
title: string;
|
|
67
|
+
subtitle: string;
|
|
68
|
+
selectFile: string;
|
|
69
|
+
uploadButton: string;
|
|
70
|
+
dragDropText: string;
|
|
71
|
+
supportedFormats: string;
|
|
72
|
+
maxSize: string;
|
|
73
|
+
processing: string;
|
|
74
|
+
success: string;
|
|
75
|
+
error: string;
|
|
76
|
+
};
|
|
77
|
+
verificationProgress: {
|
|
78
|
+
title: string;
|
|
79
|
+
subtitle: string;
|
|
80
|
+
steps: {
|
|
81
|
+
analyzing: string;
|
|
82
|
+
extracting: string;
|
|
83
|
+
verifying: string;
|
|
84
|
+
complete: string;
|
|
85
|
+
};
|
|
86
|
+
estimatedTime: string;
|
|
87
|
+
status: {
|
|
88
|
+
pending: string;
|
|
89
|
+
processing: string;
|
|
90
|
+
completed: string;
|
|
91
|
+
failed: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
reviewSubmit: {
|
|
95
|
+
title: string;
|
|
96
|
+
subtitle: string;
|
|
97
|
+
personalInfo: string;
|
|
98
|
+
documentInfo: string;
|
|
99
|
+
editButton: string;
|
|
100
|
+
submitButton: string;
|
|
101
|
+
confirmMessage: string;
|
|
102
|
+
processing: string;
|
|
103
|
+
success: string;
|
|
104
|
+
error: string;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export interface CameraTranslations {
|
|
108
|
+
permissionTitle: string;
|
|
109
|
+
permissionMessage: string;
|
|
110
|
+
permissionButton: string;
|
|
111
|
+
settingsButton: string;
|
|
112
|
+
notAvailable: string;
|
|
113
|
+
switchCamera: string;
|
|
114
|
+
flashOn: string;
|
|
115
|
+
flashOff: string;
|
|
116
|
+
capturePhoto: string;
|
|
117
|
+
processing: string;
|
|
118
|
+
}
|
|
119
|
+
export interface ErrorTranslations {
|
|
120
|
+
networkError: string;
|
|
121
|
+
serverError: string;
|
|
122
|
+
validationError: string;
|
|
123
|
+
cameraError: string;
|
|
124
|
+
fileError: string;
|
|
125
|
+
timeoutError: string;
|
|
126
|
+
unknownError: string;
|
|
127
|
+
}
|
|
128
|
+
export interface ValidationTranslations {
|
|
129
|
+
required: string;
|
|
130
|
+
invalidEmail: string;
|
|
131
|
+
invalidPhone: string;
|
|
132
|
+
invalidDate: string;
|
|
133
|
+
minLength: string;
|
|
134
|
+
maxLength: string;
|
|
135
|
+
invalidFormat: string;
|
|
136
|
+
fileTooLarge: string;
|
|
137
|
+
fileTypeNotSupported: string;
|
|
138
|
+
}
|
|
139
|
+
export interface TranslationKeys {
|
|
140
|
+
common: CommonTranslations;
|
|
141
|
+
kyc: KYCTranslations;
|
|
142
|
+
camera: CameraTranslations;
|
|
143
|
+
errors: ErrorTranslations;
|
|
144
|
+
validation: ValidationTranslations;
|
|
145
|
+
}
|
|
146
|
+
export type SupportedLocale = 'en' | 'fr';
|
|
147
|
+
export interface TranslationOptions {
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}
|
|
150
|
+
export interface PluralizationOptions extends TranslationOptions {
|
|
151
|
+
count: number;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/i18n/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AAM,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,GAAG,EAAE,eAAe,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,sBAAsB,CAAC;CACpC;AAGD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAG1C,MAAM,WAAW,kBAAkB;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA,yCAAyC","sourcesContent":["// Type definitions for i18n translations\n\nexport interface CommonTranslations {\n next: string;\n previous: string;\n continue: string;\n cancel: string;\n confirm: string;\n submit: string;\n retry: string;\n close: string;\n back: string;\n loading: string;\n error: string;\n success: string;\n warning: string;\n info: string;\n}\n\nexport interface KYCTranslations {\n title: string;\n subtitle: string;\n step: string;\n \n initialization: {\n title: string;\n description: string;\n startButton: string;\n requirements: string;\n requirementsList: string[];\n };\n \n countrySelection: {\n title: string;\n subtitle: string;\n searchPlaceholder: string;\n noResults: string;\n selectCountry: string;\n };\n \n idCardCapture: {\n title: string;\n subtitle: string;\n frontSide: string;\n backSide: string;\n instructions: {\n title: string;\n list: string[];\n };\n captureButton: string;\n retakeButton: string;\n usePhotoButton: string;\n processing: string;\n success: string;\n error: string;\n };\n \n selfieCapture: {\n title: string;\n subtitle: string;\n instructions: {\n title: string;\n list: string[];\n };\n captureButton: string;\n retakeButton: string;\n usePhotoButton: string;\n processing: string;\n success: string;\n error: string;\n };\n \n fileUpload: {\n title: string;\n subtitle: string;\n selectFile: string;\n uploadButton: string;\n dragDropText: string;\n supportedFormats: string;\n maxSize: string;\n processing: string;\n success: string;\n error: string;\n };\n \n verificationProgress: {\n title: string;\n subtitle: string;\n steps: {\n analyzing: string;\n extracting: string;\n verifying: string;\n complete: string;\n };\n estimatedTime: string;\n status: {\n pending: string;\n processing: string;\n completed: string;\n failed: string;\n };\n };\n \n reviewSubmit: {\n title: string;\n subtitle: string;\n personalInfo: string;\n documentInfo: string;\n editButton: string;\n submitButton: string;\n confirmMessage: string;\n processing: string;\n success: string;\n error: string;\n };\n}\n\nexport interface CameraTranslations {\n permissionTitle: string;\n permissionMessage: string;\n permissionButton: string;\n settingsButton: string;\n notAvailable: string;\n switchCamera: string;\n flashOn: string;\n flashOff: string;\n capturePhoto: string;\n processing: string;\n}\n\nexport interface ErrorTranslations {\n networkError: string;\n serverError: string;\n validationError: string;\n cameraError: string;\n fileError: string;\n timeoutError: string;\n unknownError: string;\n}\n\nexport interface ValidationTranslations {\n required: string;\n invalidEmail: string;\n invalidPhone: string;\n invalidDate: string;\n minLength: string;\n maxLength: string;\n invalidFormat: string;\n fileTooLarge: string;\n fileTypeNotSupported: string;\n}\n\nexport interface TranslationKeys {\n common: CommonTranslations;\n kyc: KYCTranslations;\n camera: CameraTranslations;\n errors: ErrorTranslations;\n validation: ValidationTranslations;\n}\n\n// Type for supported locales\nexport type SupportedLocale = 'en' | 'fr';\n\n// Type for translation function parameters\nexport interface TranslationOptions {\n [key: string]: any;\n}\n\n// Type for pluralization options\nexport interface PluralizationOptions extends TranslationOptions {\n count: number;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-example.d.ts","sourceRoot":"","sources":["../../src/i18n/usage-example.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAyEnC,CAAC;AA2HF,eAAe,eAAe,CAAC"}
|