cozy-client 37.2.1 → 38.0.1
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/dist/CozyClient.js +2 -2
- package/dist/hooks/useCapabilities.js +1 -1
- package/dist/models/document/locales/en.json +84 -85
- package/dist/models/document/locales/fr.json +78 -79
- package/dist/models/document/locales/index.js +8 -4
- package/dist/models/document/locales/index.spec.js +22 -8
- package/package.json +3 -3
- package/types/models/document/locales/index.d.ts +5 -2
package/dist/CozyClient.js
CHANGED
|
@@ -2436,7 +2436,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2436
2436
|
switch (_context18.prev = _context18.next) {
|
|
2437
2437
|
case 0:
|
|
2438
2438
|
_context18.next = 2;
|
|
2439
|
-
return this.query((0, _dsl.Q)('io.cozy.settings').getById('capabilities'));
|
|
2439
|
+
return this.query((0, _dsl.Q)('io.cozy.settings').getById('io.cozy.settings.capabilities'));
|
|
2440
2440
|
|
|
2441
2441
|
case 2:
|
|
2442
2442
|
_yield$this$query = _context18.sent;
|
|
@@ -2679,7 +2679,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2679
2679
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2680
2680
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2681
2681
|
|
|
2682
|
-
CozyClient.version = "
|
|
2682
|
+
CozyClient.version = "38.0.1";
|
|
2683
2683
|
|
|
2684
2684
|
_microee.default.mixin(CozyClient);
|
|
2685
2685
|
|
|
@@ -41,7 +41,7 @@ var useCapabilities = function useCapabilities(client) {
|
|
|
41
41
|
setFetchStatus('loading');
|
|
42
42
|
_context.prev = 1;
|
|
43
43
|
_context.next = 4;
|
|
44
|
-
return client.query((0, _dsl.Q)('io.cozy.settings').getById('capabilities'));
|
|
44
|
+
return client.query((0, _dsl.Q)('io.cozy.settings').getById('io.cozy.settings.capabilities'));
|
|
45
45
|
|
|
46
46
|
case 4:
|
|
47
47
|
capabilitiesResult = _context.sent;
|
|
@@ -19,98 +19,97 @@
|
|
|
19
19
|
"qualified_ok": "You just have successfully described your file! "
|
|
20
20
|
},
|
|
21
21
|
"items": {
|
|
22
|
-
"accommodation_proof": "Proof of accommodation",
|
|
23
|
-
"appliance_invoice": "Appliance invoice",
|
|
22
|
+
"accommodation_proof": "Proof of accommodation |||| Proof of accommodations",
|
|
23
|
+
"appliance_invoice": "Appliance invoice |||| Appliance invoices",
|
|
24
24
|
"bank_details": "IBAN",
|
|
25
|
-
"bank_statement": "Bank statement",
|
|
26
|
-
"birth_certificate": "Birth certificate",
|
|
27
|
-
"building_permit": "Building permit",
|
|
28
|
-
"caf": "Social benefit rate",
|
|
29
|
-
"car_insurance": "Car insurance certificate",
|
|
30
|
-
"citizen_registration_certificate": "Certificate of citizen registration",
|
|
31
|
-
"diploma": "Diploma",
|
|
32
|
-
"divorce": "Divorce",
|
|
33
|
-
"driver_license": "Driving license",
|
|
34
|
-
"electoral_card": "Electoral card",
|
|
35
|
-
"employment_center_certificate": "Employment center certificate",
|
|
36
|
-
"energy_contract": "Energy provider contract",
|
|
37
|
-
"energy_invoice": "Energy invoice",
|
|
38
|
-
"family_record_book": "Family record book",
|
|
25
|
+
"bank_statement": "Bank statement |||| Bank statements",
|
|
26
|
+
"birth_certificate": "Birth certificate |||| Birth certificates",
|
|
27
|
+
"building_permit": "Building permit |||| Building permits",
|
|
28
|
+
"caf": "Social benefit rate |||| Social benefit rates",
|
|
29
|
+
"car_insurance": "Car insurance certificate |||| Car insurance certificates",
|
|
30
|
+
"citizen_registration_certificate": "Certificate of citizen registration |||| Certificates of citizen registration",
|
|
31
|
+
"diploma": "Diploma |||| Diplomas",
|
|
32
|
+
"divorce": "Divorce |||| Divorces",
|
|
33
|
+
"driver_license": "Driving license |||| Driving licenses",
|
|
34
|
+
"electoral_card": "Electoral card |||| Electoral cards",
|
|
35
|
+
"employment_center_certificate": "Employment center certificate |||| Employment center certificates",
|
|
36
|
+
"energy_contract": "Energy provider contract |||| Energy provider contracts",
|
|
37
|
+
"energy_invoice": "Energy invoice |||| Energy invoices",
|
|
38
|
+
"family_record_book": "Family record book |||| Family record books",
|
|
39
39
|
"family": "Family",
|
|
40
|
-
"fidelity_card": "Fidelity card",
|
|
41
|
-
"gradebook": "Gradebook",
|
|
42
|
-
"grocery_invoice": "Grocery invoice",
|
|
43
|
-
"health_book": "Health book",
|
|
44
|
-
"health_certificate": "Health/Vaccination certificate",
|
|
45
|
-
"health_insurance_card": "Insurance card",
|
|
46
|
-
"health_invoice": "Health invoice",
|
|
40
|
+
"fidelity_card": "Fidelity card |||| Fidelity cards",
|
|
41
|
+
"gradebook": "Gradebook |||| Gradebooks",
|
|
42
|
+
"grocery_invoice": "Grocery invoice |||| Grocery invoices",
|
|
43
|
+
"health_book": "Health book |||| Health books",
|
|
44
|
+
"health_certificate": "Health/Vaccination certificate |||| Health/Vaccination certificates",
|
|
45
|
+
"health_insurance_card": "Insurance card |||| Insurance cards",
|
|
46
|
+
"health_invoice": "Health invoice |||| Health invoices",
|
|
47
47
|
"health": "Health",
|
|
48
48
|
"home": "Home",
|
|
49
|
-
"house_insurance": "Home insurance",
|
|
50
|
-
"house_sale_agreeement": "House sale agreement",
|
|
51
|
-
"identity_photo": "Identity photo",
|
|
49
|
+
"house_insurance": "Home insurance |||| Home insurances",
|
|
50
|
+
"house_sale_agreeement": "House sale agreement |||| House sale agreements",
|
|
51
|
+
"identity_photo": "Identity photo |||| Identity photos",
|
|
52
52
|
"identity": "Identity",
|
|
53
|
-
"invoice": "Invoice",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"other_work_document": "Other work document",
|
|
53
|
+
"invoice": "Invoice |||| Invoices",
|
|
54
|
+
"isp_invoice": "ISP invoice |||| ISP invoices",
|
|
55
|
+
"large_family_card": " Large Family Card |||| Large Family Cards",
|
|
56
|
+
"lease": "Lease |||| Leases",
|
|
57
|
+
"library_card": "library card |||| library cards",
|
|
58
|
+
"loan_agreement": "Loan agreement |||| Loan agreements",
|
|
59
|
+
"mechanic_invoice": "Repair bill |||| Repair bills",
|
|
60
|
+
"motivation_letter": "Motivation letter |||| Motivation letters",
|
|
61
|
+
"national_health_insurance_card": "National health insurance card |||| National health insurance cards",
|
|
62
|
+
"national_health_insurance_right_certificate": "National health insurance right certificate |||| National health insurance right certificates",
|
|
63
|
+
"national_id_card": "ID card |||| ID cards",
|
|
64
|
+
"other_activity_document": "Other sports document |||| Other sports documents",
|
|
65
|
+
"other_bank_document": "Other banking document |||| Other banking documents",
|
|
66
|
+
"other_family_document": "Other family document |||| Other family documents",
|
|
67
|
+
"other_health_document": "Other health document |||| Other health documents",
|
|
68
|
+
"other_house_document": "Other house document |||| Other house documents",
|
|
69
|
+
"other_identity_document": "Other document of identity |||| Other documents of identity",
|
|
70
|
+
"other_invoice": "Other invoice |||| Other invoices",
|
|
71
|
+
"other_revenue": "Other revenue |||| Other revenues",
|
|
72
|
+
"other_tax_document": "Other tax document |||| Other tax documents",
|
|
73
|
+
"other_transport_document": "Other transport document |||| Other transport documents",
|
|
74
|
+
"other_work_document": "Other work document |||| Other work documents",
|
|
76
75
|
"others": "Others",
|
|
77
|
-
"pacs": "Civil union",
|
|
78
|
-
"passport": "Passeport",
|
|
79
|
-
"pay_sheet": "Pay sheet",
|
|
80
|
-
"payment_proof_family_allowance": "family allowance payment proof",
|
|
81
|
-
"pension": "Pension",
|
|
82
|
-
"personal_sporting_licence": "Sporting licence",
|
|
83
|
-
"phone_invoice": "Phone invoice",
|
|
84
|
-
"pregnancy_medical_certificate": "Certificate of pregnancy",
|
|
85
|
-
"prescription": "Prescription",
|
|
86
|
-
"real_estate_tax": "Real estate tax",
|
|
87
|
-
"receipt": "Receipt",
|
|
88
|
-
"rent_receipt": "Rent receipt",
|
|
89
|
-
"residence_permit": "Residence permit",
|
|
90
|
-
"restaurant_invoice": "Restaurant invoice",
|
|
91
|
-
"resume": "Resume",
|
|
92
|
-
"school_attendance_certificate": "Certificate of school attendance",
|
|
93
|
-
"school_insurance_certificate": "Certificate of school insurance",
|
|
94
|
-
"single_parent_benefit": "Single parent benefit",
|
|
95
|
-
"student_card": "Student card",
|
|
96
|
-
"tax_notice": "Tax notice",
|
|
97
|
-
"tax_return": "Tax return",
|
|
98
|
-
"tax_timetable": "Payment Plans Installment Agreements",
|
|
99
|
-
"technical_diagnostic_record": "Technical diagnostic record",
|
|
100
|
-
"telecom_invoice": "Telecom invoice",
|
|
101
|
-
"transport_card": "Transport card",
|
|
102
|
-
"transport_invoice": "Transport invoice",
|
|
76
|
+
"pacs": "Civil union |||| Civil unions",
|
|
77
|
+
"passport": "Passeport |||| Passeports",
|
|
78
|
+
"pay_sheet": "Pay sheet |||| Pay sheets",
|
|
79
|
+
"payment_proof_family_allowance": "family allowance payment proof |||| family allowance payment proofs",
|
|
80
|
+
"pension": "Pension |||| Pensions",
|
|
81
|
+
"personal_sporting_licence": "Sporting licence |||| Sporting licences",
|
|
82
|
+
"phone_invoice": "Phone invoice |||| Phone invoices",
|
|
83
|
+
"pregnancy_medical_certificate": "Certificate of pregnancy |||| Certificates of pregnancy",
|
|
84
|
+
"prescription": "Prescription |||| Prescriptions",
|
|
85
|
+
"real_estate_tax": "Real estate tax |||| Real estate taxes",
|
|
86
|
+
"receipt": "Receipt |||| Receipts",
|
|
87
|
+
"rent_receipt": "Rent receipt |||| Rent receipts",
|
|
88
|
+
"residence_permit": "Residence permit |||| Residence permits",
|
|
89
|
+
"restaurant_invoice": "Restaurant invoice |||| Restaurant invoices",
|
|
90
|
+
"resume": "Resume |||| Resumes",
|
|
91
|
+
"school_attendance_certificate": "Certificate of school attendance |||| Certificates of school attendance",
|
|
92
|
+
"school_insurance_certificate": "Certificate of school insurance |||| Certificates of school insurance",
|
|
93
|
+
"single_parent_benefit": "Single parent benefit |||| Single parent benefits",
|
|
94
|
+
"student_card": "Student card |||| Student cards",
|
|
95
|
+
"tax_notice": "Tax notice |||| Tax notices",
|
|
96
|
+
"tax_return": "Tax return |||| Tax returns",
|
|
97
|
+
"tax_timetable": "Payment Plans Installment Agreement |||| Payment Plans Installment Agreements",
|
|
98
|
+
"technical_diagnostic_record": "Technical diagnostic record |||| Technical diagnostic records",
|
|
99
|
+
"telecom_invoice": "Telecom invoice |||| Telecom invoices",
|
|
100
|
+
"transport_card": "Transport card |||| Transport cards",
|
|
101
|
+
"transport_invoice": "Transport invoice |||| Transport invoices",
|
|
103
102
|
"transport": "Transport",
|
|
104
|
-
"unemployment_benefit": "Unemployment benefit",
|
|
105
|
-
"unfit_for_habitation_declaration": "Declaration of unfit for habitation",
|
|
106
|
-
"vehicle_registration": "Vehicle registration",
|
|
107
|
-
"water_invoice": "Water invoice",
|
|
108
|
-
"web_service_invoice": "Web service invoice",
|
|
109
|
-
"wedding": "Wedding contract",
|
|
110
|
-
"work_contract": "Work contract",
|
|
111
|
-
"work_disability_recognition": "Recognition of disability",
|
|
112
|
-
"work_invoice": "Work invoice",
|
|
113
|
-
"work_quote": "Work quote",
|
|
103
|
+
"unemployment_benefit": "Unemployment benefit |||| Unemployment benefits",
|
|
104
|
+
"unfit_for_habitation_declaration": "Declaration of unfit for habitation |||| Declarations of unfit for habitation",
|
|
105
|
+
"vehicle_registration": "Vehicle registration |||| Vehicle registrations",
|
|
106
|
+
"water_invoice": "Water invoice |||| Water invoices",
|
|
107
|
+
"web_service_invoice": "Web service invoice |||| Web service invoices",
|
|
108
|
+
"wedding": "Wedding contract |||| Wedding contracts",
|
|
109
|
+
"work_contract": "Work contract |||| Work contracts",
|
|
110
|
+
"work_disability_recognition": "Recognition of disability |||| Recognitions of disability",
|
|
111
|
+
"work_invoice": "Work invoice |||| Work invoices",
|
|
112
|
+
"work_quote": "Work quote |||| Work quotes",
|
|
114
113
|
"work_study": "Work & Study"
|
|
115
114
|
},
|
|
116
115
|
"attributes":{
|
|
@@ -19,97 +19,96 @@
|
|
|
19
19
|
"qualified_ok": "Vous venez de qualifier votre fichier avec succès !"
|
|
20
20
|
},
|
|
21
21
|
"items": {
|
|
22
|
-
"accommodation_proof": "Attestation d'hébergement",
|
|
23
|
-
"appliance_invoice": "Facture d'électroménager",
|
|
22
|
+
"accommodation_proof": "Attestation d'hébergement |||| Attestations d'hébergement",
|
|
23
|
+
"appliance_invoice": "Facture d'électroménager |||| Factures d'électroménager",
|
|
24
24
|
"bank_details": "IBAN",
|
|
25
|
-
"bank_statement": "Relevé de compte",
|
|
26
|
-
"birth_certificate": "Certificat de naissance",
|
|
25
|
+
"bank_statement": "Relevé de compte |||| Relevés de compte",
|
|
26
|
+
"birth_certificate": "Certificat de naissance |||| Certificats de naissance",
|
|
27
27
|
"building_permit": "Permis de construire",
|
|
28
|
-
"caf": "Attestation de quotient familial (CAF)",
|
|
29
|
-
"car_insurance": "Attestation d'assurance auto",
|
|
30
|
-
"citizen_registration_certificate": "Attestation de recensement citoyen",
|
|
31
|
-
"diploma": "Diplôme",
|
|
32
|
-
"divorce": "Attestation de divorce",
|
|
28
|
+
"caf": "Attestation de quotient familial (CAF) |||| Attestations de quotient familial (CAF)",
|
|
29
|
+
"car_insurance": "Attestation d'assurance auto |||| Attestations d'assurance auto",
|
|
30
|
+
"citizen_registration_certificate": "Attestation de recensement citoyen |||| Attestations de recensement citoyen",
|
|
31
|
+
"diploma": "Diplôme |||| Diplômes",
|
|
32
|
+
"divorce": "Attestation de divorce |||| Attestations de divorce",
|
|
33
33
|
"driver_license": "Permis",
|
|
34
|
-
"electoral_card": "Carte électorale",
|
|
35
|
-
"employment_center_certificate": "Attestation de Pôle emploi",
|
|
36
|
-
"energy_contract": "Contrat de fournisseur d'énergies",
|
|
37
|
-
"energy_invoice": "Facture d'énergie",
|
|
38
|
-
"family_record_book": "Livret de famille",
|
|
34
|
+
"electoral_card": "Carte électorale |||| Cartes électorales",
|
|
35
|
+
"employment_center_certificate": "Attestation de Pôle emploi |||| Attestations de Pôle emploi",
|
|
36
|
+
"energy_contract": "Contrat de fournisseur d'énergies |||| Contrats de fournisseur d'énergies",
|
|
37
|
+
"energy_invoice": "Facture d'énergie |||| Factures d'énergie",
|
|
38
|
+
"family_record_book": "Livret de famille |||| Livrets de famille",
|
|
39
39
|
"family": "Famille",
|
|
40
|
-
"fidelity_card": "Carte de fidélité",
|
|
41
|
-
"gradebook": "Bulletin de notes",
|
|
42
|
-
"grocery_invoice": "Facture de courses",
|
|
43
|
-
"health_book": "Carnet de santé",
|
|
44
|
-
"health_certificate": "Certificat de santé/vaccination",
|
|
45
|
-
"health_insurance_card": "Carte de mutuelle",
|
|
46
|
-
"health_invoice": "Facture médicale",
|
|
40
|
+
"fidelity_card": "Carte de fidélité |||| Cartes de fidélité",
|
|
41
|
+
"gradebook": "Bulletin de notes |||| Bulletins de notes",
|
|
42
|
+
"grocery_invoice": "Facture de courses |||| Factures de courses",
|
|
43
|
+
"health_book": "Carnet de santé |||| Carnets de santé",
|
|
44
|
+
"health_certificate": "Certificat de santé/vaccination |||| Certificats de santé/vaccination",
|
|
45
|
+
"health_insurance_card": "Carte de mutuelle |||| Cartes de mutuelle",
|
|
46
|
+
"health_invoice": "Facture médicale |||| Factures médicales",
|
|
47
47
|
"health": "Santé",
|
|
48
48
|
"home": "Logement",
|
|
49
|
-
"house_insurance": "Assurance logement",
|
|
49
|
+
"house_insurance": "Assurance logement |||| Assurances logement",
|
|
50
50
|
"house_sale_agreeement": "Compromis de vente",
|
|
51
|
-
"identity_photo": "Photo d'identité",
|
|
51
|
+
"identity_photo": "Photo d'identité |||| Photos d'identité",
|
|
52
52
|
"identity": "Identité",
|
|
53
|
-
"invoice": "Factures",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"other_work_document": "Autre document de travail",
|
|
53
|
+
"invoice": "Facture |||| Factures",
|
|
54
|
+
"isp_invoice": "Facture d'internet |||| Factures d'internet",
|
|
55
|
+
"large_family_card": "Carte famille nombreuse |||| Cartes famille nombreuse",
|
|
56
|
+
"lease": "Bail |||| Baux",
|
|
57
|
+
"library_card": "Carte de bibliothèque |||| Cartes de bibliothèque",
|
|
58
|
+
"loan_agreement": "Contrat de prêt |||| Contrats de prêt",
|
|
59
|
+
"mechanic_invoice": "Facture de réparation |||| Factures de réparation",
|
|
60
|
+
"motivation_letter": "Lettre de motivation |||| Lettres de motivation",
|
|
61
|
+
"national_health_insurance_card": "Carte vitale |||| Cartes vitales",
|
|
62
|
+
"national_health_insurance_right_certificate": "Attestation de droits de l'Assurance Maladie (vitale) |||| Attestations de droits de l'Assurance Maladie (vitale)",
|
|
63
|
+
"national_id_card": "Carte d'identité |||| Cartes d'identité",
|
|
64
|
+
"other_activity_document": "Autre document sportif |||| Autres documents sportifs",
|
|
65
|
+
"other_bank_document": "Autre document bancaire |||| Autres documents bancaires",
|
|
66
|
+
"other_family_document": "Autre document de famille |||| Autres documents de famille",
|
|
67
|
+
"other_health_document": "Autre document de santé |||| Autres documents de santé",
|
|
68
|
+
"other_house_document": "Autre document de logement |||| Autres documents de logement",
|
|
69
|
+
"other_identity_document": "Autre document d'identité |||| Autres documents d'identité",
|
|
70
|
+
"other_invoice": "Autre facture |||| Autres factures",
|
|
71
|
+
"other_revenue": "Autre revenu |||| Autres revenus",
|
|
72
|
+
"other_tax_document": "Impôts - Autre document |||| Impôts - Autres documents",
|
|
73
|
+
"other_transport_document": "Autre document de transport |||| Autres documents de transport",
|
|
74
|
+
"other_work_document": "Autre document de travail |||| Autres documents de travail",
|
|
76
75
|
"others": "Autres",
|
|
77
|
-
"pacs": "Attestation de PACS",
|
|
78
|
-
"passport": "Passeport",
|
|
79
|
-
"pay_sheet": "Fiche de paie",
|
|
80
|
-
"payment_proof_family_allowance": "Attestation de paiement CAF",
|
|
81
|
-
"pension": "Retraite",
|
|
82
|
-
"personal_sporting_licence": "Licences sportives",
|
|
83
|
-
"phone_invoice": "Facture de téléphone",
|
|
84
|
-
"pregnancy_medical_certificate": "Certificat de grossesse",
|
|
85
|
-
"prescription": "Ordonnance",
|
|
86
|
-
"real_estate_tax": "Taxe foncière",
|
|
87
|
-
"receipt": "Accusé de réception",
|
|
88
|
-
"rent_receipt": "Quittance de loyer",
|
|
89
|
-
"residence_permit": "Titre de séjour",
|
|
90
|
-
"restaurant_invoice": "Facture de restaurant",
|
|
76
|
+
"pacs": "Attestation de PACS |||| Attestations de PACS",
|
|
77
|
+
"passport": "Passeport |||| Passeports",
|
|
78
|
+
"pay_sheet": "Fiche de paie |||| Fiches de paie",
|
|
79
|
+
"payment_proof_family_allowance": "Attestation de paiement CAF |||| Attestations de paiement CAF",
|
|
80
|
+
"pension": "Retraite |||| Retraites",
|
|
81
|
+
"personal_sporting_licence": "Licence sportive |||| Licences sportives",
|
|
82
|
+
"phone_invoice": "Facture de téléphone |||| Factures de téléphone",
|
|
83
|
+
"pregnancy_medical_certificate": "Certificat de grossesse |||| Certificats de grossesse",
|
|
84
|
+
"prescription": "Ordonnance |||| Ordonnances",
|
|
85
|
+
"real_estate_tax": "Taxe foncière |||| Taxes foncières",
|
|
86
|
+
"receipt": "Accusé de réception |||| Accusés de réception",
|
|
87
|
+
"rent_receipt": "Quittance de loyer |||| Quittances de loyer",
|
|
88
|
+
"residence_permit": "Titre de séjour |||| Titres de séjour",
|
|
89
|
+
"restaurant_invoice": "Facture de restaurant |||| Factures de restaurant",
|
|
91
90
|
"resume": "CV",
|
|
92
|
-
"school_attendance_certificate": "Certificat de scolarité",
|
|
93
|
-
"school_insurance_certificate": "Attestation d'assurance scolaire",
|
|
94
|
-
"single_parent_benefit": "Allocation parent isolé",
|
|
95
|
-
"student_card": "Carte d'étudiant",
|
|
91
|
+
"school_attendance_certificate": "Certificat de scolarité |||| Certificats de scolarité",
|
|
92
|
+
"school_insurance_certificate": "Attestation d'assurance scolaire |||| Attestations d'assurance scolaire",
|
|
93
|
+
"single_parent_benefit": "Allocation parent isolé |||| Allocations parent isolé",
|
|
94
|
+
"student_card": "Carte d'étudiant |||| Cartes d'étudiant",
|
|
96
95
|
"tax_notice": "Impôts - Avis d'imposition",
|
|
97
|
-
"tax_return": "Impôts - Déclaration de revenus",
|
|
98
|
-
"tax_timetable": "Impôts - Echéancier",
|
|
99
|
-
"technical_diagnostic_record": "Dossier de diagnostic technique",
|
|
100
|
-
"telecom_invoice": "Facture de télécom",
|
|
101
|
-
"transport_card": "Carte de transport",
|
|
102
|
-
"transport_invoice": "Facture de transport",
|
|
96
|
+
"tax_return": "Impôts - Déclaration de revenus |||| Impôts - Déclarations de revenus",
|
|
97
|
+
"tax_timetable": "Impôts - Echéancier |||| Impôts - Echéanciers",
|
|
98
|
+
"technical_diagnostic_record": "Dossier de diagnostic technique |||| Dossiers de diagnostic technique",
|
|
99
|
+
"telecom_invoice": "Facture de télécom |||| Factures de télécom",
|
|
100
|
+
"transport_card": "Carte de transport |||| Cartes de transport",
|
|
101
|
+
"transport_invoice": "Facture de transport |||| Factures de transport",
|
|
103
102
|
"transport": "Transport",
|
|
104
|
-
"unemployment_benefit": "Allocations chômage",
|
|
105
|
-
"unfit_for_habitation_declaration": "Arrêté d'insalubrité",
|
|
106
|
-
"vehicle_registration": "Carte grise",
|
|
107
|
-
"water_invoice": "Facture d'eau",
|
|
108
|
-
"web_service_invoice": "Facture de service web",
|
|
109
|
-
"wedding": "Contrat de mariage",
|
|
110
|
-
"work_contract": "Contrat de travail",
|
|
111
|
-
"work_disability_recognition": "Reconnaissance de handicap - RQTH",
|
|
112
|
-
"work_invoice": "Facture de travaux",
|
|
103
|
+
"unemployment_benefit": "Allocation chômage |||| Allocations chômage",
|
|
104
|
+
"unfit_for_habitation_declaration": "Arrêté d'insalubrité |||| Arrêtés d'insalubrité",
|
|
105
|
+
"vehicle_registration": "Carte grise |||| Cartes grises",
|
|
106
|
+
"water_invoice": "Facture d'eau |||| Factures d'eau",
|
|
107
|
+
"web_service_invoice": "Facture de service web |||| Factures de service web",
|
|
108
|
+
"wedding": "Contrat de mariage |||| Contrats de mariage",
|
|
109
|
+
"work_contract": "Contrat de travail |||| Contrats de travail",
|
|
110
|
+
"work_disability_recognition": "Reconnaissance de handicap - RQTH |||| Reconnaissances de handicap - RQTH",
|
|
111
|
+
"work_invoice": "Facture de travaux |||| Factures de travaux",
|
|
113
112
|
"work_quote": "Devis de travaux",
|
|
114
113
|
"work_study": "Travail & Études"
|
|
115
114
|
},
|
|
@@ -29,16 +29,20 @@ for (var _i = 0, _langs = langs; _i < _langs.length; _i++) {
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* @param {string} lang - fr, en, etc
|
|
32
|
-
* @returns {(label: string, country?: string) => string}
|
|
32
|
+
* @returns {(label: string, opts?: {country?: string, smart_count?: number}) => string}
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var getBoundT = function getBoundT(lang) {
|
|
37
37
|
var polyglot = polyglots[lang] || polyglots['en'];
|
|
38
38
|
var t = polyglot.t.bind(polyglot);
|
|
39
|
-
return function (label
|
|
40
|
-
var
|
|
41
|
-
|
|
39
|
+
return function (label) {
|
|
40
|
+
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
41
|
+
var newOpts = {
|
|
42
|
+
smart_count: (opts === null || opts === void 0 ? void 0 : opts.smart_count) || 1
|
|
43
|
+
};
|
|
44
|
+
var emojiCountry = (0, _emojiCountry.getEmojiByCountry)(opts === null || opts === void 0 ? void 0 : opts.country, t);
|
|
45
|
+
return emojiCountry ? "".concat(t(label, newOpts), " (").concat(emojiCountry, ")") : t(label, newOpts);
|
|
42
46
|
};
|
|
43
47
|
};
|
|
44
48
|
|
|
@@ -3,19 +3,33 @@ import { getBoundT } from './index'
|
|
|
3
3
|
describe('getBoundT', () => {
|
|
4
4
|
const t = getBoundT('en')
|
|
5
5
|
|
|
6
|
-
it('should return
|
|
6
|
+
it('should return singular translation by default (without options param)', () => {
|
|
7
7
|
const res = t('Scan.items.national_id_card')
|
|
8
8
|
|
|
9
9
|
expect(res).toBe('ID card')
|
|
10
10
|
})
|
|
11
|
-
it('should return
|
|
12
|
-
const res = t('Scan.items.
|
|
11
|
+
it('should return translation if it has no pluralization pipes', () => {
|
|
12
|
+
const res = t('Scan.items.bank_details')
|
|
13
13
|
|
|
14
|
-
expect(res).toBe('
|
|
14
|
+
expect(res).toBe('IBAN')
|
|
15
15
|
})
|
|
16
|
-
it('should return "ID card" with "🇫🇷" suffix', () => {
|
|
17
|
-
const res = t('Scan.items.national_id_card', 'fr')
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
it.each`
|
|
18
|
+
translationKey | country | smart_count | lang | expected
|
|
19
|
+
${'Scan.items.national_id_card'} | ${undefined} | ${undefined} | ${'en'} | ${'ID card'}
|
|
20
|
+
${'Scan.items.national_id_card'} | ${'fr'} | ${undefined} | ${'en'} | ${'ID card (🇫🇷)'}
|
|
21
|
+
${'Scan.items.national_id_card'} | ${'stranger'} | ${undefined} | ${'en'} | ${'ID card (Stranger)'}
|
|
22
|
+
${'Scan.items.national_id_card'} | ${'fr'} | ${1} | ${'en'} | ${'ID card (🇫🇷)'}
|
|
23
|
+
${'Scan.items.national_id_card'} | ${'fr'} | ${2} | ${'en'} | ${'ID cards (🇫🇷)'}
|
|
24
|
+
${'Scan.items.national_id_card'} | ${undefined} | ${1} | ${'en'} | ${'ID card'}
|
|
25
|
+
${'Scan.items.national_id_card'} | ${undefined} | ${2} | ${'en'} | ${'ID cards'}
|
|
26
|
+
`(
|
|
27
|
+
'should test if the translation is suitable with the param country: $country and with the param smart_count: $smart_count',
|
|
28
|
+
({ translationKey, country, smart_count, lang, expected }) => {
|
|
29
|
+
const t = getBoundT(lang)
|
|
30
|
+
const res = t(translationKey, { country, smart_count })
|
|
31
|
+
|
|
32
|
+
expect(res).toBe(expected)
|
|
33
|
+
}
|
|
34
|
+
)
|
|
21
35
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "38.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@types/jest": "^26.0.20",
|
|
19
19
|
"@types/lodash": "^4.14.170",
|
|
20
20
|
"btoa": "^1.2.1",
|
|
21
|
-
"cozy-stack-client": "^
|
|
21
|
+
"cozy-stack-client": "^38.0.0",
|
|
22
22
|
"date-fns": "2.29.3",
|
|
23
23
|
"json-stable-stringify": "^1.0.1",
|
|
24
24
|
"lodash": "^4.17.13",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "26c3d646265a0eccde91073cdf4dd98f68276410"
|
|
77
77
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {string} lang - fr, en, etc
|
|
3
|
-
* @returns {(label: string, country?: string) => string}
|
|
3
|
+
* @returns {(label: string, opts?: {country?: string, smart_count?: number}) => string}
|
|
4
4
|
*/
|
|
5
|
-
export function getBoundT(lang: string): (label: string,
|
|
5
|
+
export function getBoundT(lang: string): (label: string, opts?: {
|
|
6
|
+
country?: string;
|
|
7
|
+
smart_count?: number;
|
|
8
|
+
}) => string;
|