-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from InseeFr/develop
Develop
- Loading branch information
Showing
31 changed files
with
852 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
const addressMessage = { | ||
addressDeliveryPoint: { fr: 'Point de remise', en: 'Delivery point' }, | ||
addressAdditionalAddress: { fr: `Complément d'adresse`, en: 'Additional address' }, | ||
addressNumber: { fr: 'Numéro de voie', en: 'Street number' }, | ||
addressStreetType: { fr: 'Type de voie', en: 'Street type' }, | ||
addressStreetName: { fr: 'Numéro et libellé de voie', en: 'Street number and name' }, | ||
addressPostcode: { fr: 'Code postal', en: 'Postal code' }, | ||
addressCity: { fr: 'Commune', en: 'City' }, | ||
addressName: { fr: 'Nom', en: 'Name' }, | ||
addressFullAddress: { fr: 'Adresse', en: 'Address' }, | ||
addressCountry: { fr: 'Pays', en: 'Country' }, | ||
addressLocality: { fr: 'Lieu-dit', en: 'Locality' }, | ||
addressBuilding: { fr: 'Bâtiment', en: 'Building' }, | ||
addressFloor: { fr: 'Etage', en: 'Floor' }, | ||
addressDoor: { fr: 'Porte', en: 'Door' }, | ||
addressStaircase: { fr: 'Escalier', en: 'Staircase' }, | ||
addressElevator: { fr: 'Ascenseur', en: 'Elevator' }, | ||
addressCityPriorityDistrict: { fr: 'QPV', en: 'City Priority District' }, | ||
addressDeliveryPoint: { fr: 'Point de remise', en: 'Delivery point', sq: 'Pika e dorëzimit' }, | ||
addressAdditionalAddress: { | ||
fr: `Complément d'adresse`, | ||
en: 'Additional address', | ||
sq: 'Adresë shtesë', | ||
}, | ||
addressNumber: { fr: 'Numéro de voie', en: 'Street number', sq: 'Numri i rrugës' }, | ||
addressStreetType: { fr: 'Type de voie', en: 'Street type', sq: 'Lloji i rrugës' }, | ||
addressStreetName: { | ||
fr: 'Numéro et libellé de voie', | ||
en: 'Street number and name', | ||
sq: 'Numri dhe emri i rrugës', | ||
}, | ||
addressPostcode: { fr: 'Code postal', en: 'Postal code', sq: 'Kodi postar' }, | ||
addressCity: { fr: 'Commune', en: 'City', sq: 'Qyteti' }, | ||
addressName: { fr: 'Nom', en: 'Name', sq: 'Emri' }, | ||
addressFullAddress: { fr: 'Adresse', en: 'Address', sq: 'Adresa' }, | ||
addressCountry: { fr: 'Pays', en: 'Country', sq: 'Shteti' }, | ||
addressLocality: { fr: 'Lieu-dit', en: 'Locality', sq: 'Lokaliteti' }, | ||
addressBuilding: { fr: 'Bâtiment', en: 'Building', sq: 'Ndërtesa' }, | ||
addressFloor: { fr: 'Etage', en: 'Floor', sq: 'Kati' }, | ||
addressDoor: { fr: 'Porte', en: 'Door', sq: 'Dera' }, | ||
addressStaircase: { fr: 'Escalier', en: 'Staircase', sq: 'Shkallët' }, | ||
addressElevator: { fr: 'Ascenseur', en: 'Elevator', sq: 'Ashensori' }, | ||
addressCityPriorityDistrict: { | ||
fr: 'QPV', | ||
en: 'City Priority District', | ||
sq: 'Rajoni Prioritar i Qytetit', | ||
}, | ||
}; | ||
|
||
export default addressMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
import dictionary from './dictionary'; | ||
import { fr } from 'date-fns/locale'; | ||
// Importez le locale albanais si disponible | ||
import { fr, sq } from 'date-fns/locale'; | ||
import setDefaultOptions from 'date-fns/setDefaultOptions'; | ||
|
||
/** | ||
* Based on the locale passed as a paremeter, this function will return | ||
* Based on the locale passed as a parameter, this function will return | ||
* the corresponding dictionary. | ||
* | ||
* @param {string} lang the lang of the user | ||
*/ | ||
export const createDictionary = lang => { | ||
// Set date-fns lang | ||
// Set date-fns lang for French and Albanian | ||
if (lang === 'fr') { | ||
setDefaultOptions({ locale: fr }); | ||
} else if (lang === 'sq') { | ||
setDefaultOptions({ locale: sq }); // Supposant que `sq` est le locale pour l'albanais | ||
} | ||
|
||
return Object.keys(dictionary).reduce((_, k) => { | ||
_[k] = dictionary[k][lang]; | ||
return _; | ||
return Object.keys(dictionary).reduce((acc, key) => { | ||
acc[key] = dictionary[key][lang]; | ||
return acc; | ||
}, {}); | ||
}; | ||
|
||
/** | ||
* This function will return only the lang part of a locale | ||
* For example, with fr-FR, will return fr | ||
* If the lang is not fr, will return en | ||
* If the lang is not recognized, will return en | ||
* Now also checks for Albanian (sq) | ||
* @param {string} lang the lang of the user | ||
*/ | ||
export const getLang = defaultLang => | ||
(defaultLang || navigator.language || navigator.browserLanguage).split('-')[0] === 'fr' | ||
? 'fr' | ||
: 'en'; | ||
export const getLang = defaultLang => { | ||
const lang = (defaultLang || navigator.language || navigator.browserLanguage).split('-')[0]; | ||
return lang === 'fr' || lang === 'sq' ? lang : 'en'; | ||
}; | ||
|
||
export default createDictionary(getLang()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,53 @@ | ||
const buttonMessage = { | ||
questionnaireButton: { fr: 'Questionnaire', en: 'Survey' }, | ||
transmitButton: { fr: 'Transmettre', en: 'Send' }, | ||
cancelButton: { fr: 'Annuler', en: 'Cancel' }, | ||
saveButton: { fr: 'Enregistrer', en: 'Save' }, | ||
editButton: { fr: 'Modifier', en: 'Edit' }, | ||
validateButton: { fr: 'Valider', en: 'Validate' }, | ||
addPhoneNumberButton: { fr: 'Ajouter un numéro', en: 'Add a phone number' }, | ||
addContactAttemptButton: { fr: 'Ajouter un essai', en: 'Add a contact attempt' }, | ||
addContactOutcomeButton: { fr: 'Faire le bilan des contacts', en: 'Add contact outcome' }, | ||
editContactOutcomeButton: { fr: 'Modifier le bilan des contacts', en: 'Edit contact outcome' }, | ||
addButton: { fr: 'Ajouter', en: 'Add' }, | ||
synchronizeButton: { fr: 'Synchroniser', en: 'Synchronize' }, | ||
closeButton: { fr: 'Fermer', en: 'Close' }, | ||
updateNow: { fr: 'Mettre à jour maintenant', en: 'Update now' }, | ||
yesButton: { fr: 'Oui', en: 'Yes' }, | ||
noButton: { fr: 'Non', en: 'No' }, | ||
iUnderstand: { fr: `J'ai compris`, en: `I understand` }, | ||
deleteAll: { fr: 'Tout supprimer', en: 'Delete all' }, | ||
markAllAsRead: { fr: 'Tout marquer comme lu', en: 'Mark all as read' }, | ||
goBackToHome: { fr: "Retour à l'accueil", en: 'Go back home' }, | ||
yesDeleteAll: { fr: 'Oui, je supprime tout', en: 'Yes, I delete all' }, | ||
noImNotSure: { fr: 'Non, je ne suis pas sûr(e)', en: 'No, I am not sure' }, | ||
confirmButton: { fr: 'Confirmer', en: 'Confirm' }, | ||
previousButton: { fr: 'Précédent', en: 'Previous' }, | ||
sendButton: { fr: 'Envoyer', en: 'Send' }, | ||
questionnaireButton: { fr: 'Questionnaire', en: 'Survey', sq: 'Anketa' }, | ||
transmitButton: { fr: 'Transmettre', en: 'Send', sq: 'Dërgo' }, | ||
cancelButton: { fr: 'Annuler', en: 'Cancel', sq: 'Anulo' }, | ||
saveButton: { fr: 'Enregistrer', en: 'Save', sq: 'Ruaj' }, | ||
editButton: { fr: 'Modifier', en: 'Edit', sq: 'Ndrysho' }, | ||
validateButton: { fr: 'Valider', en: 'Validate', sq: 'Valido' }, | ||
addPhoneNumberButton: { | ||
fr: 'Ajouter un numéro', | ||
en: 'Add a phone number', | ||
sq: 'Shto një numër telefoni', | ||
}, | ||
addContactAttemptButton: { | ||
fr: 'Ajouter un essai', | ||
en: 'Add a contact attempt', | ||
sq: 'Shto një përpjekje kontakti', | ||
}, | ||
addContactOutcomeButton: { | ||
fr: 'Faire le bilan des contacts', | ||
en: 'Add contact outcome', | ||
sq: 'Shto rezultatin e kontakteve', | ||
}, | ||
editContactOutcomeButton: { | ||
fr: 'Modifier le bilan des contacts', | ||
en: 'Edit contact outcome', | ||
sq: 'Ndrysho rezultatin e kontakteve', | ||
}, | ||
addButton: { fr: 'Ajouter', en: 'Add', sq: 'Shto' }, | ||
synchronizeButton: { fr: 'Synchroniser', en: 'Synchronize', sq: 'Sinkronizo' }, | ||
closeButton: { fr: 'Fermer', en: 'Close', sq: 'Mbyll' }, | ||
updateNow: { fr: 'Mettre à jour maintenant', en: 'Update now', sq: 'Përditëso tani' }, | ||
yesButton: { fr: 'Oui', en: 'Yes', sq: 'Po' }, | ||
noButton: { fr: 'Non', en: 'No', sq: 'Jo' }, | ||
iUnderstand: { fr: `J'ai compris`, en: `I understand`, sq: `E kam kuptuar` }, | ||
deleteAll: { fr: 'Tout supprimer', en: 'Delete all', sq: 'Fshi të gjitha' }, | ||
markAllAsRead: { | ||
fr: 'Tout marquer comme lu', | ||
en: 'Mark all as read', | ||
sq: 'Shëno të gjitha si të lexuara', | ||
}, | ||
goBackToHome: { fr: "Retour à l'accueil", en: 'Go back home', sq: 'Kthehu në fillim' }, | ||
yesDeleteAll: { fr: 'Oui, je supprime tout', en: 'Yes, I delete all', sq: 'Po, fshi të gjitha' }, | ||
noImNotSure: { | ||
fr: 'Non, je ne suis pas sûr(e)', | ||
en: 'No, I am not sure', | ||
sq: 'Jo, nuk jam i sigurt', | ||
}, | ||
confirmButton: { fr: 'Confirmer', en: 'Confirm', sq: 'Konfirmo' }, | ||
previousButton: { fr: 'Précédent', en: 'Previous', sq: 'I mëparshëm' }, | ||
sendButton: { fr: 'Envoyer', en: 'Send', sq: 'Dërgo' }, | ||
}; | ||
|
||
export default buttonMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,70 @@ | ||
const contactAttemptMessage = { | ||
interviewAccepted: { fr: 'Enquête acceptée', en: 'Interview accepted' }, | ||
refusal: { fr: `Refus`, en: 'Refusal' }, | ||
noContact: { fr: 'Pas de contact', en: 'No contact' }, | ||
appointmentMade: { fr: 'Rendez-vous pris', en: 'Appointment made' }, | ||
interviewAccepted: { | ||
fr: 'Enquête acceptée', | ||
en: 'Interview accepted', | ||
sq: 'Intervista u pranua', | ||
}, | ||
refusal: { fr: `Refus`, en: 'Refusal', sq: 'Refuzim' }, | ||
noContact: { fr: 'Pas de contact', en: 'No contact', sq: 'Asnjë kontakt' }, | ||
appointmentMade: { fr: 'Rendez-vous pris', en: 'Appointment made', sq: 'Takimi u caktua' }, | ||
temporaryUnavailable: { | ||
fr: `Contact établi, à recontacter`, | ||
en: 'Contact made, to be recontacted', | ||
sq: 'Kontakti u bë, për tu rikontaktuar', | ||
}, | ||
messageSent: { | ||
fr: "Dépôt d'un message", | ||
en: 'Message sent', | ||
sq: 'Mesazhi u dërgua', | ||
}, | ||
unusableContactData: { | ||
fr: 'Données de contact inutilisables', | ||
en: 'Unusable contact data', | ||
sq: 'Të dhënat e kontaktit të papërdorshme', | ||
}, | ||
permanentlyUnavailable: { | ||
fr: 'Indisponibilité définitive', | ||
en: 'Permanently unavailable', | ||
sq: 'Përgjithmonë e padisponueshme', | ||
}, | ||
noticeOfPassageSent: { | ||
fr: "Dépôt d'un avis de passage", | ||
en: 'Notice of passage sent', | ||
sq: 'Njoftimi i kalimit u dërgua', | ||
}, | ||
permanentlyUnavailable: { fr: 'Indisponibilité définitive', en: 'Permanently unavailable' }, | ||
noticeOfPassageSent: { fr: "Dépôt d'un avis de passage", en: 'Notice of passage sent' }, | ||
notificationLetterHandDelivered: { | ||
fr: 'Lettre-avis remise en main propre', | ||
en: 'Notification letter hand-delivered', | ||
sq: 'Letra njoftimi u dorëzua personalisht', | ||
}, | ||
contactAttempts: { fr: 'Mes contacts', en: 'Contacts' }, | ||
contactAttempts: { fr: 'Mes contacts', en: 'Contacts', sq: 'Kontaktet e mia' }, | ||
contactAttempt: { | ||
fr: 'Choisir le type de contact', | ||
en: 'Select contact attempt type', | ||
sq: 'Zgjidhni llojin e përpjekjes për kontakt', | ||
}, | ||
noContactAttempt: { | ||
fr: "Pas d'essais de contact", | ||
en: 'No contacts attempts', | ||
sq: 'Asnjë përpjekje për kontakt', | ||
}, | ||
chooseAnOption: { | ||
fr: 'Choisissez une option', | ||
en: 'Choose an option', | ||
sq: 'Zgjidhni një opsion', | ||
}, | ||
telephone: { fr: 'Téléphone', en: 'Telephone', sq: 'Telefoni' }, | ||
datePicking: { | ||
fr: "Préciser la date de l'essai", | ||
en: 'Specify the date of the attempt', | ||
sq: 'Përcaktoni datën e përpjekjes', | ||
}, | ||
contactAttemptDeletion: { | ||
fr: "Supprimer l'essai de contact", | ||
en: 'Delete contact attempt', | ||
sq: 'Fshi përpjekjen për kontakt', | ||
}, | ||
noContactAttempt: { fr: "Pas d'essais de contact", en: 'No contacts attempts' }, | ||
chooseAnOption: { fr: 'Choisissez une option', en: 'Choose an option' }, | ||
telephone: { fr: 'Téléphone', en: 'Telephone' }, | ||
datePicking: { fr: "Préciser la date de l'essai", en: 'Specify the date of the attempt' }, | ||
contactAttemptDeletion: { fr: "Supprimer l'essai de contact", en: 'Delete contact attempt' }, | ||
at: { fr: 'à', en: 'at' }, | ||
at: { fr: 'à', en: 'at', sq: 'në' }, | ||
}; | ||
|
||
export default contactAttemptMessage; |
Oops, something went wrong.