From b6969cf831d9913052c2d9685e9d793e830bd17f Mon Sep 17 00:00:00 2001 From: Peter Muriuki Date: Wed, 18 Dec 2024 17:20:10 +0300 Subject: [PATCH] Update Eusm translations (#1510) * Update i18n scripts; fix repo root path * Update fr translated file * Fix missing translation strings * Update eusm en translation strings * Update fr translations * Review cleanup * Fix snapshots and tests regressions --- .../src/components/GroupList/index.tsx | 2 +- .../tests/__snapshots__/index.test.tsx.snap | 2 +- .../ImportDetailView/tests/index.test.tsx | 12 ++-- .../src/containers/StartImportView/form.tsx | 2 +- packages/fhir-import/src/mls.ts | 2 +- .../src/components/CreateEditUser/index.tsx | 2 +- .../CreateEditUser/tests/fixtures.ts | 12 ++-- .../components/UserList/ListView/index.tsx | 3 +- packages/i18n/locales/eusm/app/en.json | 1 + packages/i18n/locales/eusm/app/fr.json | 1 + .../i18n/locales/eusm/fhir-care-team/en.json | 2 - .../i18n/locales/eusm/fhir-care-team/fr.json | 2 - .../i18n/locales/eusm/fhir-client/en.json | 37 +++++++++-- .../i18n/locales/eusm/fhir-client/fr.json | 63 ++++++++++++++----- packages/i18n/locales/eusm/fhir-flag/en.json | 1 + packages/i18n/locales/eusm/fhir-flag/fr.json | 21 +++++++ .../eusm/fhir-group-management/en.json | 12 ++-- .../eusm/fhir-group-management/fr.json | 14 +++-- .../eusm/fhir-healthcare-service/fr.json | 2 +- .../i18n/locales/eusm/fhir-import/en.json | 16 +++++ .../i18n/locales/eusm/fhir-import/fr.json | 49 +++++++++++++++ .../fhir-keycloak-user-management/en.json | 12 +++- .../fhir-keycloak-user-management/fr.json | 12 +++- .../eusm/fhir-location-management/en.json | 4 ++ .../eusm/fhir-location-management/fr.json | 4 ++ .../eusm/keycloak-user-management/en.json | 7 ++- .../eusm/keycloak-user-management/fr.json | 7 ++- .../i18n/locales/eusm/react-utils/en.json | 4 ++ .../i18n/locales/eusm/react-utils/fr.json | 4 ++ .../src/ducks/user.ts | 4 +- scripts/i18n/cli.js | 1 - scripts/i18n/lib/uploadMerged.js | 11 +--- scripts/i18n/lib/utils.js | 7 +-- 33 files changed, 255 insertions(+), 80 deletions(-) create mode 100644 packages/i18n/locales/eusm/fhir-flag/fr.json create mode 100644 packages/i18n/locales/eusm/fhir-import/fr.json diff --git a/packages/fhir-group-management/src/components/GroupList/index.tsx b/packages/fhir-group-management/src/components/GroupList/index.tsx index d858b8adc..c1a3555cb 100644 --- a/packages/fhir-group-management/src/components/GroupList/index.tsx +++ b/packages/fhir-group-management/src/components/GroupList/index.tsx @@ -25,7 +25,7 @@ const keyValueDetailRender = (obj: IGroup, t: TFunction) => { [t('Id')]: id, [t('Name')]: name, [t('Active')]: active ? t('Active') : t('Inactive'), - [t('Last updated')]: t('{{val, datetime}}', { val: new Date(lastUpdated) }), + [t('Last Updated')]: t('{{val, datetime}}', { val: new Date(lastUpdated) }), [t('No. of Members')]: quantity, [t('Members')]: members?.map((member) => member.entity.display).join(', '), }; diff --git a/packages/fhir-group-management/src/components/GroupList/tests/__snapshots__/index.test.tsx.snap b/packages/fhir-group-management/src/components/GroupList/tests/__snapshots__/index.test.tsx.snap index 50579dcd7..c2184c062 100644 --- a/packages/fhir-group-management/src/components/GroupList/tests/__snapshots__/index.test.tsx.snap +++ b/packages/fhir-group-management/src/components/GroupList/tests/__snapshots__/index.test.tsx.snap @@ -44,7 +44,7 @@ exports[`renders correctly when listing resources 6`] = ` class="singleKeyValue-pair__default" >
- Last updated + Last Updated
4/27/2022 diff --git a/packages/fhir-import/src/containers/ImportDetailView/tests/index.test.tsx b/packages/fhir-import/src/containers/ImportDetailView/tests/index.test.tsx index 0b764a692..d024ef9f7 100644 --- a/packages/fhir-import/src/containers/ImportDetailView/tests/index.test.tsx +++ b/packages/fhir-import/src/containers/ImportDetailView/tests/index.test.tsx @@ -4,7 +4,7 @@ import { authenticateUser } from '@onaio/session-reducer'; import { Route, Router, Switch } from 'react-router'; import nock from 'nock'; import * as reactQuery from 'react-query'; -import { waitForElementToBeRemoved, render, cleanup } from '@testing-library/react'; +import { waitForElementToBeRemoved, render, cleanup, screen } from '@testing-library/react'; import { store } from '@opensrp/store'; import * as constants from '../../../constants'; import { createMemoryHistory } from 'history'; @@ -100,11 +100,11 @@ describe('Care Teams list view', () => { await waitForElementToBeRemoved(document.querySelector('.ant-spin')); expect(nock.pendingMocks()).toEqual([]); - expect(document.querySelector('title')).toMatchInlineSnapshot(` - - View details | 26aae779-0e6f-482d-82c3-a0fad1fd3689_orgToLocationAssignment - - `); + expect( + screen.getByTitle( + 'View details | 26aae779-0e6f-482d-82c3-a0fad1fd3689_orgToLocationAssignment' + ) + ).toBeInTheDocument(); expect( (document.querySelector('.view-details-container') as HTMLElement).textContent diff --git a/packages/fhir-import/src/containers/StartImportView/form.tsx b/packages/fhir-import/src/containers/StartImportView/form.tsx index 8a548a2a6..0ee735cdf 100644 --- a/packages/fhir-import/src/containers/StartImportView/form.tsx +++ b/packages/fhir-import/src/containers/StartImportView/form.tsx @@ -142,7 +142,7 @@ export const DataImportForm = (props: DataImportFormProps) => { { formFieldName: orgToLocationAssignment, label: t('Organization location assignment'), - UploadBtnText: 'Attach assignment file', + UploadBtnText: t('Attach assignment file'), permissions: ['OrganizationAffiliation.create', 'OrganizationAffiliation.update'], }, { diff --git a/packages/fhir-import/src/mls.ts b/packages/fhir-import/src/mls.ts index 35ae0f9c7..ca6bd66c5 100644 --- a/packages/fhir-import/src/mls.ts +++ b/packages/fhir-import/src/mls.ts @@ -1,7 +1,7 @@ import { useTranslation as useOrigTranslation } from '@opensrp/i18n'; import type { UseTranslationOptions } from '@opensrp/i18n'; -export const namespace = 'fhir-views'; +export const namespace = 'fhir-import'; export const useTranslation = (ns?: string, options?: UseTranslationOptions) => { return useOrigTranslation(ns ? ns : namespace, options); diff --git a/packages/fhir-keycloak-user-management/src/components/CreateEditUser/index.tsx b/packages/fhir-keycloak-user-management/src/components/CreateEditUser/index.tsx index ea999d6ab..93a0ff8e6 100644 --- a/packages/fhir-keycloak-user-management/src/components/CreateEditUser/index.tsx +++ b/packages/fhir-keycloak-user-management/src/components/CreateEditUser/index.tsx @@ -278,7 +278,7 @@ export const practitionerUpdater = { use: IdentifierUseCodes.OFFICIAL, family: values.lastName, - given: [values.firstName, ''], + given: values.firstName ? [values.firstName] : [], }, ], telecom: values.phoneNumber diff --git a/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/fixtures.ts b/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/fixtures.ts index 44e99d670..b9e45fe5a 100644 --- a/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/fixtures.ts +++ b/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/fixtures.ts @@ -66,7 +66,7 @@ export const newPractitioner = { }, ], active: true, - name: [{ use: 'official', family: 'plotus', given: ['flotus', ''] }], + name: [{ use: 'official', family: 'plotus', given: ['flotus'] }], telecom: [{ system: 'email', value: 'flotus@plotus.duck' }], }; @@ -84,7 +84,7 @@ export const newPractitionerRole = { active: true, practitioner: { reference: 'Practitioner/c1d36d9a-b771-410b-959e-af2c04d132a2', - display: 'Demoflotus kenyaplotus', + display: 'Demoflotus kenyaplotus', }, code: [ { @@ -189,7 +189,7 @@ export const updatedPractitioner = { }, ], active: true, - name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus', ''] }], + name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus'] }], telecom: [{ system: 'email', value: 'test@onatest.comflotus@plotus.duck' }], }; @@ -228,7 +228,7 @@ export const extraFieldsPractitioner = { }, ], active: true, - name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus', ''] }], + name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus'] }], telecom: [ { system: 'email', value: 'test@onatest.comflotus@plotus.duck' }, { system: 'phone', value: '0700123456', use: 'mobile' }, @@ -270,7 +270,7 @@ export const updatedExtraFieldsPractitioner = { }, ], active: true, - name: [{ use: 'official', family: 'plotus', given: ['flotus', ''] }], + name: [{ use: 'official', family: 'plotus', given: ['flotus'] }], telecom: [ { system: 'email', value: 'flotus@plotus.duck' }, { system: 'phone', value: '0700123456', use: 'mobile' }, @@ -450,7 +450,7 @@ export const updatedPractitionerRole = { active: true, practitioner: { reference: 'Practitioner/c1d36d9a-b771-410b-959e-af2c04d132a2', - display: 'Demoflotus kenyaplotus', + display: 'Demoflotus kenyaplotus', }, code: [ { diff --git a/packages/fhir-keycloak-user-management/src/components/UserList/ListView/index.tsx b/packages/fhir-keycloak-user-management/src/components/UserList/ListView/index.tsx index 334f83b17..764692b15 100644 --- a/packages/fhir-keycloak-user-management/src/components/UserList/ListView/index.tsx +++ b/packages/fhir-keycloak-user-management/src/components/UserList/ListView/index.tsx @@ -21,9 +21,10 @@ import { BodyLayout } from '@opensrp/react-utils'; import { getExtraData } from '@onaio/session-reducer'; import { KeycloakUser } from '@opensrp/user-management'; import { useSelector } from 'react-redux'; -import { Trans, useTranslation } from '@opensrp/i18n'; +import { Trans } from '@opensrp/i18n'; import { RbacCheck, useUserRole } from '@opensrp/rbac'; import { UserDetailsOverview } from '../ViewdetailsOverview'; +import { useTranslation } from '../../../mls'; interface OrganizationListProps { fhirBaseURL: string; diff --git a/packages/i18n/locales/eusm/app/en.json b/packages/i18n/locales/eusm/app/en.json index 7fb0fcd4e..f5ebace11 100644 --- a/packages/i18n/locales/eusm/app/en.json +++ b/packages/i18n/locales/eusm/app/en.json @@ -4,6 +4,7 @@ "All Locations": "All Locations", "Care Teams Management": "Care Teams Management", "Commodity Management": "Product Catalogue", + "Data Imports": "Data imports", "Group Management": "Group Management", "Healthcare Services": "Healthcare Services", "Hierarchy": "Hierarchy", diff --git a/packages/i18n/locales/eusm/app/fr.json b/packages/i18n/locales/eusm/app/fr.json index 45662db3b..7c2c8f4bd 100644 --- a/packages/i18n/locales/eusm/app/fr.json +++ b/packages/i18n/locales/eusm/app/fr.json @@ -4,6 +4,7 @@ "All Locations": "Tous les lieux", "Care Teams Management": "Gestion du Care Teams", "Commodity Management": "Catalogue des Produits", + "Data Imports": "Importation des données", "Group Management": "Gestion du groupe", "Healthcare Services": "Centre de santé", "Hierarchy": "Hierarchie", diff --git a/packages/i18n/locales/eusm/fhir-care-team/en.json b/packages/i18n/locales/eusm/fhir-care-team/en.json index fea401cab..9ea2b7255 100644 --- a/packages/i18n/locales/eusm/fhir-care-team/en.json +++ b/packages/i18n/locales/eusm/fhir-care-team/en.json @@ -33,8 +33,6 @@ "Successfully updated CareTeams": "Successfully updated CareTeams", "There was a problem creating the Care Team": "There was a problem creating the Care Team", "There was a problem deleting the Care Team": "There was a problem deleting the Care Team", - "There was a problem fetching organizations": "There was a problem fetching organizations", - "There was a problem fetching practitioners": "There was a problem fetching practitioners", "There was a problem fetching the Care Team": "There was a problem fetching the Care Team", "There was a problem updating the Care Team": "There was a problem updating the Care Team", "UUID": "UUID", diff --git a/packages/i18n/locales/eusm/fhir-care-team/fr.json b/packages/i18n/locales/eusm/fhir-care-team/fr.json index 053a639bf..65d6f100f 100644 --- a/packages/i18n/locales/eusm/fhir-care-team/fr.json +++ b/packages/i18n/locales/eusm/fhir-care-team/fr.json @@ -33,8 +33,6 @@ "Successfully updated CareTeams": "Mise à jour réussi de Care Teams", "There was a problem creating the Care Team": "Un problème est survenu lors de la création de la Care Team", "There was a problem deleting the Care Team": "Un problème est survenu lors de la suppression de la Care Team", - "There was a problem fetching organizations": "Un problème est survenu lors de la recherche de l'organisation", - "There was a problem fetching practitioners": "Il y a eu un problème pour trouver des praticiens.", "There was a problem fetching the Care Team": "Un problème est survenu lors de la recherche de la Care Team", "There was a problem updating the Care Team": "Un problème est survenu lors de la mise à jour du Care Team", "UUID": "UUID", diff --git a/packages/i18n/locales/eusm/fhir-client/en.json b/packages/i18n/locales/eusm/fhir-client/en.json index f4dd837c7..fa3f06f46 100644 --- a/packages/i18n/locales/eusm/fhir-client/en.json +++ b/packages/i18n/locales/eusm/fhir-client/en.json @@ -1,15 +1,19 @@ { "{{val, datetime}}": "{{val, datetime}}", + "Abatement date": "", "Achievement status": "Achievement status", "Actions": "Actions", "Active": "Active", "Address": "Address", "Administration Date": "Administration Date", "Authored on": "Authored on", - "Birth Date": "Birth Date", + "Business status": "", + "Canonical (PlanDefinition)": "", + "Care plan": "", "Category": "Category", "City": "City", "Class": "Class", + "Clinical status": "", "Conclusion": "Conclusion", "Condition": "Condition", "Context": "Context", @@ -17,20 +21,31 @@ "Created at": "Created at", "Date asserted": "Date asserted", "Date authored": "Date authored", + "Date created": "", "Date Created": "Date Created", "Date issued": "Date issued", + "Date of birth": "", "Date Of Birth": "Date Of Birth", + "Date recorded": "", "Deceased": "Deceased", "Description": "Description", "Details": "Details", "Document type": "Document type", + "Dose quantity": "", + "Encounter Duration": "", + "Episode of care": "", "Event": "Event", "Facility": "Facility", + "Fetching Patient details": "", + "First name": "", "Format": "Format", "Gender": "Gender", "Id": "Id", "ID": "ID", + "Immunization": "", "Inactive": "Inactive", + "Intent": "", + "Last name": "", "Manufacturer": "Manufacturer", "Medication": "Medication", "MRN": "MRN", @@ -40,27 +55,41 @@ "Observation Issue Date": "Observation Issue Date", "Observation value": "Observation value", "Occurence Date": "Occurence Date", - "Patient Details": "Patient Details", + "Onset date": "", + "Patient encounter": "", + "Patient profile": "", "Patients": "Patients", "Performed Date": "Performed Date", "Period": "Period", "Phone": "Phone", "Practice Setting": "Practice Setting", "Preview/Download": "Preview/Download", + "Primary source": "", "Priority": "Priority", "Procedure": "Procedure", + "protocol applied": "", + "reason": "", "Reason": "Reason", + "Report origin": "", "S.no": "S.no", "Security label": "Security label", + "Service provider": "", + "Service type": "", + "Service Type": "", "Severity": "Severity", + "stage": "", "State": "State", + "status": "", "Status": "Status", - "There was a problem fetching the patient": "There was a problem fetching the patient", + "Task": "", "Title": "Title", "Type": "Type", "UUID": "UUID", "Vaccine Admnistered": "Vaccine Admnistered", + "Vaccine expiry date": "", + "Verification status": "", "Verification Status": "Verification Status", "View": "View", - "Work in progress": "Work in progress" + "View details": "", + "View full details": "" } diff --git a/packages/i18n/locales/eusm/fhir-client/fr.json b/packages/i18n/locales/eusm/fhir-client/fr.json index c19aa632f..b64b8556f 100644 --- a/packages/i18n/locales/eusm/fhir-client/fr.json +++ b/packages/i18n/locales/eusm/fhir-client/fr.json @@ -1,66 +1,95 @@ { "{{val, datetime}}": "{{val, datetime}}", - "Achievement status": "Etat d'avancement", + "Abatement date": "Date d'annulation", + "Achievement status": "État d'avancement", "Actions": "Actions", "Active": "Actif", "Address": "Adresse", "Administration Date": "Date d'administration", "Authored on": "Auteur de", - "Birth Date": "Date de naissance", + "Business status": "Statut de l'entreprise", + "Canonical (PlanDefinition)": "Canonique (PlanDefinition)", + "Care plan": "Plan de soins", "Category": "Catégorie", "City": "Ville", "Class": "Catégorie", - "Conclusion": "Conlusion", + "Clinical status": "État clinique", + "Conclusion": "Conclusion", "Condition": "Condition", "Context": "Contexte", "Country": "Pays", - "Created at": "Créé au", - "Date asserted": "Données validées", + "Created at": "Créé à", + "Date asserted": "Date de l'affirmation", "Date authored": "Date de la création", + "Date created": "Date de création", "Date Created": "Date de création", "Date issued": "Date d'émission", + "Date of birth": "Date de naissance", "Date Of Birth": "Date de naissance", + "Date recorded": "Date d'enregistrement", "Deceased": "Décédé", "Description": "Description", "Details": "Détails", "Document type": "Type de document", - "Event": "Evènement", + "Dose quantity": "Quantité de doses", + "Encounter Duration": "Durée de la rencontre", + "Episode of care": "Épisode de soins", + "Event": "Événement", "Facility": "Facilité", + "Fetching Patient details": "Récupération des données du patient", + "First name": "Prénom", "Format": "Format", "Gender": "Genre", "Id": "ID", "ID": "ID", + "Immunization": "Immunisation", "Inactive": "Inactif", - "Manufacturer": "Fabrication", + "Intent": "Intention", + "Last name": "Nom", + "Manufacturer": "Fabricant", "Medication": "Médicaments", "MRN": "MRN", "Name": "Prénom", "Next Dose Date": "Date de la prochaine dose", "Number of doses": "Nombre de doses", "Observation Issue Date": "Date d'émission de l'observation", - "Observation value": "Valeur observée", - "Occurence Date": "Date de survenance", - "Patient Details": "Informations sur le patient", + "Observation value": "Valeur d'observation", + "Occurence Date": "Date de l'événement", + "Onset date": "Date de début", + "Patient encounter": "Rencontre avec le patient", + "Patient profile": "Profil du patient", "Patients": "Patients", - "Performed Date": "Date de réalisation", + "Performed Date": "Date d'exécution", "Period": "Période", "Phone": "Téléphone", "Practice Setting": "Cadre de la pratique", - "Preview/Download": "Aperçu/Téléchargement", + "Preview/Download": "Prévisualisation/téléchargement", + "Primary source": "Source primaire", "Priority": "Priorité", "Procedure": "Procédure", - "Reason": "Raison", + "protocol applied": "protocole appliqué", + "reason": "raison", + "Reason": "raison", + "Report origin": "Origine du rapport", "S.no": "S.no", "Security label": "Étiquette de sécurité", - "Severity": "Gravité", + "Service provider": "Prestataire de services", + "Service type": "Type de service", + "Service Type": "Type de service", + "Severity": "Sévérité", + "stage": "étape", "State": "État", + "status": "Statut", "Status": "Statut", - "There was a problem fetching the patient": "Un problème est survenu lors de la recherche du patient", + "Task": "Tâche", "Title": "Titre", "Type": "Type", "UUID": "UUID", "Vaccine Admnistered": "Vaccin administré", - "Verification Status": "Etat de la vérification", + "Vaccine expiry date": "Date d'expiration du vaccin", + "Verification status": "Statut de vérification", + "Verification Status": "Statut de vérification", "View": "Voir", - "Work in progress": "Travaux en cours" + "View details": "Voir les détails", + "View full details": "Voir tous les détails" } diff --git a/packages/i18n/locales/eusm/fhir-flag/en.json b/packages/i18n/locales/eusm/fhir-flag/en.json index 0fa0e2027..639dc20dc 100644 --- a/packages/i18n/locales/eusm/fhir-flag/en.json +++ b/packages/i18n/locales/eusm/fhir-flag/en.json @@ -11,6 +11,7 @@ "Inactive": "", "Invalid Flag": "", "Missing location field. This information is required to close the flag form.": "", + "Missing Required permissions to perform this action": "", "Product": "", "Save": "", "Saving": "", diff --git a/packages/i18n/locales/eusm/fhir-flag/fr.json b/packages/i18n/locales/eusm/fhir-flag/fr.json new file mode 100644 index 000000000..070eff032 --- /dev/null +++ b/packages/i18n/locales/eusm/fhir-flag/fr.json @@ -0,0 +1,21 @@ +{ + "(Auto generated)": "(Auto généré)", + "Active": "Actif", + "An error occurred while fetching the inventory": "Une erreur s'est produite lors de l'extraction de l'inventaire.", + "Close App": "Fermer l'application", + "Error Occurred When Closing Flag": "Une erreur s'est produite lors de la fermeture du signalement d'un problème.", + "Error occurred while trying to fetch flag data": "Une erreur s'est produite lors de l'extraction des données du signalement de problèmes", + "Error occurred while trying to fetch practitioners data": "Une erreur s'est produite lors de la recherche de données sur les praticiens.", + "Flag Closed successfully": "Signalement de problème fermé avec succès", + "How was the flag resolved?": "Comment le problème a-t-il été résolu ?", + "Inactive": "Inactif", + "Invalid Flag": "Signalement de problème non valide", + "Missing location field. This information is required to close the flag form.": "Champ de localisation manquant. Cette information est nécessaire pour fermer le formulaire de signalement.", + "Missing Required permissions to perform this action": "Missing Required permissions to perform this action", + "Product": "Produit", + "Save": "Sauvegarder", + "Saving": "Sauvegarde", + "Select flag status": "Sélectionner le statut du signalement", + "Service Point": "Point de service", + "Status": "Statut" +} diff --git a/packages/i18n/locales/eusm/fhir-group-management/en.json b/packages/i18n/locales/eusm/fhir-group-management/en.json index 50834a292..44d54e88b 100644 --- a/packages/i18n/locales/eusm/fhir-group-management/en.json +++ b/packages/i18n/locales/eusm/fhir-group-management/en.json @@ -9,9 +9,9 @@ "Actual": "Actual", "Add commodity": "Add Product", "Add Group": "Add Group", - "Add locations Inventory": "Add locations Inventory", + "Add Service Point Inventory": "", "Are you sure you want to delete this commodity?": "Are you sure you want to delete this product?", - "Attractive item": "Attractive item", + "attractiveFilter": "<0>Asset:<1><0>{t('Yes')}<1>{t('No')}<2>{t('Show all')}", "Cancel": "Cancel", "Commodity Id": "Product Id", "Commodity List": "Product Catalogue", @@ -28,21 +28,23 @@ "Donor": "Donor", "Edit": "Edit", "Edit commodity | {{name}}": "Edit product | {{name}}", - "Edit locations Inventory": "Edit locations Inventory", + "Edit Service Point Inventory": "", "End date": "End date", "Enter commodity name": "Enter product name", "Enter the product's material number": "Enter the product's material number", "Expiry date": "Expiry date", "Failed to refresh data, please refresh the page": "Failed to refresh data, please refresh the page", + "File must be smaller than 5MB!": "", "Groups List": "Groups List", + "groupStatusFilter": "<0>Status:<1><0>{t('Active')}<1>{t('Inactive')}<2>{t('Show all')}", "Id": "Id", "Identifier": "Identifier", "Inactive": "Inactive", "Incorrect/Missing Configuration": "Incorrect/Missing Configuration", + "Is it an Asset": "", "Is it being used appropriately": "Is it being used appropriately", "Is it in good condition": "Is it in good condition", "Is it there": "Is it there", - "Last updated": "Last updated", "Last Updated": "Last Updated", "List id is either incorrectly configured or missing. Kindly contact support to fix this.": "List id is either incorrectly configured or missing. Kindly contact support to fix this.", "Location inventory created successfully": "Location inventory created successfully", @@ -57,7 +59,6 @@ "No. of Members": "No. of Members", "Photo of the product": "Photo of the product", "PO number": "PO number", - "PO number is required": "PO number is required", "product Id": "product Id", "Product Id": "Product Id", "Product is required": "Product is required", @@ -76,6 +77,7 @@ "Select UNICEF section": "Select UNICEF section", "Serial number": "Serial number", "Serial number is required": "Serial number is required", + "Show all": "", "Successfully deleted commodity": "Successfully deleted product", "type": "type", "Type": "Type", diff --git a/packages/i18n/locales/eusm/fhir-group-management/fr.json b/packages/i18n/locales/eusm/fhir-group-management/fr.json index 24834f12c..633a69ffb 100644 --- a/packages/i18n/locales/eusm/fhir-group-management/fr.json +++ b/packages/i18n/locales/eusm/fhir-group-management/fr.json @@ -9,9 +9,9 @@ "Actual": "Actuel", "Add commodity": "Ajouter un produit", "Add Group": "Ajout d'un groupe", - "Add locations Inventory": "Ajouter des lieux à l'Inventaire", + "Add Service Point Inventory": "Ajouter un inventaire des points de service", "Are you sure you want to delete this commodity?": "Êtes-vous sûr de vouloir supprimer ce produit ?", - "Attractive item": "Produit prioritaire", + "attractiveFilter": "<0>Actif:<1><0>{t('Oui')}<1>{t('Non')}<2>{t('Afficher tout')}", "Cancel": "Annuler", "Commodity Id": "Produit Id", "Commodity List": "Catalogue des Produits", @@ -28,22 +28,24 @@ "Donor": "Donateur", "Edit": "Modifier", "Edit commodity | {{name}}": "Modifier le produit | {{name}}", - "Edit locations Inventory": "Modifier l'inventaire des lieux", + "Edit Service Point Inventory": "Modifier l'inventaire des points de service", "End date": "Date de fin", "Enter commodity name": "Saisir le nom du produit", "Enter the product's material number": "Saisir le material number du produit.", "Expiry date": "Date d'expiration", "Failed to refresh data, please refresh the page": "Échec de l'actualisation des données, veuillez actualiser la page.", + "File must be smaller than 5MB!": "File must be smaller than 5MB!", "Groups List": "Liste des groupes", + "groupStatusFilter": "<0>Statut:<1><0>{t('Actif')}<1>{t('Inactif')}<2>{t('Afficher tout')}", "Id": "ID", "Identifier": "Identifiant", "Inactive": "Inactif", "Incorrect/Missing Configuration": "Configuration incorrecte/manquante", + "Is it an Asset": "S'agit-il d'un actif ?", "Is it being used appropriately": "Est-il utilisé de manière appropriée ?", "Is it in good condition": "Est-il en bon état ?", "Is it there": "Est-il là ?", - "Last updated": "Dernière mise à jour", - "Last Updated": "Last Updated", + "Last Updated": "Dernière mise à jour", "List id is either incorrectly configured or missing. Kindly contact support to fix this.": "L'identifiant de la liste est soit mal configuré, soit manquant. Veuillez contacter le support pour résoudre ce problème.", "Location inventory created successfully": "Création réussie de l'inventaire des lieux", "Location inventory updated successfully": "Mise à jour réussie de l'inventaire des lieux", @@ -57,7 +59,6 @@ "No. of Members": "No. des Membres", "Photo of the product": "Photo du produit", "PO number": "PO number", - "PO number is required": "Le PO number est requis", "product Id": "Identifiant du produit", "Product Id": "Produit Id", "Product is required": "Le produit est requis", @@ -76,6 +77,7 @@ "Select UNICEF section": "Sélectionner la section de l'UNICEF", "Serial number": "Numéro de série", "Serial number is required": "Le numéro de série est requis", + "Show all": "Afficher tout", "Successfully deleted commodity": "Successfully deleted product", "type": "Type", "Type": "Type", diff --git a/packages/i18n/locales/eusm/fhir-healthcare-service/fr.json b/packages/i18n/locales/eusm/fhir-healthcare-service/fr.json index 9abeefff0..d7c169f7d 100644 --- a/packages/i18n/locales/eusm/fhir-healthcare-service/fr.json +++ b/packages/i18n/locales/eusm/fhir-healthcare-service/fr.json @@ -18,7 +18,7 @@ "Id": "ID", "Identifier": "Identifiant", "Inactive": "Inactif", - "Last Updated": "Last Updated", + "Last Updated": "Dernière mise à jour", "Must be a valid string": "Doit être une chaîne de caractères valide", "Name": "Prénom", "Provided by": "Fourni par", diff --git a/packages/i18n/locales/eusm/fhir-import/en.json b/packages/i18n/locales/eusm/fhir-import/en.json index 4975035bd..8a64b87c8 100644 --- a/packages/i18n/locales/eusm/fhir-import/en.json +++ b/packages/i18n/locales/eusm/fhir-import/en.json @@ -1,8 +1,17 @@ { + "A list resource Id is not correctly configured": "", "Actions": "", "An error occurred while fetching the csv templates": "", + "Attach assignment file": "", + "Attach careTeams file": "", + "Attach inventory file": "", + "Attach locations file": "", + "Attach organizations file": "", + "Attach product file": "", + "Attach users file": "", "Author": "", "Bulk upload": "", + "CareTeams": "", "Check for any data inconsistencies or errors (e.g. missing values, incorrect data types) before uploading": "", "Click the \"Attach\" button to select your prepared data file.": "", "Click the button below to download the bulk upload template file(s).": "", @@ -17,15 +26,22 @@ "Failed to refresh data, please refresh the page": "", "File name": "", "Follow these simple instructions to help you prepare, upload, and verify your data smoothly and efficiently": "", + "Inventory": "", + "Locations": "", "Log Output": "", "Once the file or files are selected, click \"Start Import\" to begin the upload": "", + "Organization location assignment": "", + "Organizations": "", "Prepare your data file": "", + "Products": "", "Resource upload": "", "Start Import": "", "status": "", "Step by step guide for bulk upload": "", "Upload your data file": "", "Uploading": "", + "User organization assignment": "", + "Users": "", "View": "", "View details | {{workflowId}}": "", "Workflow Id": "", diff --git a/packages/i18n/locales/eusm/fhir-import/fr.json b/packages/i18n/locales/eusm/fhir-import/fr.json new file mode 100644 index 000000000..0fe5df5f2 --- /dev/null +++ b/packages/i18n/locales/eusm/fhir-import/fr.json @@ -0,0 +1,49 @@ +{ + "A list resource Id is not correctly configured": "Un identifiant de ressource de liste n'est pas correctement configuré", + "Actions": "Actions", + "An error occurred while fetching the csv templates": "Une erreur s'est produite lors de la récupération des modèles de fichier csv.", + "Attach assignment file": "Joindre le fichier d'affectation", + "Attach careTeams file": "Joindre le fichier des équipes de soins", + "Attach inventory file": "Joindre le fichier d'inventaire", + "Attach locations file": "Joindre le fichier des emplacements", + "Attach organizations file": "Joindre le fichier des organisations", + "Attach product file": "Joindre le fichier des produits", + "Attach users file": "Joindre le fichier des utilisateurs", + "Author": "Auteur", + "Bulk upload": "Téléchargement en masse", + "CareTeams": "Équipes de soins", + "Check for any data inconsistencies or errors (e.g. missing values, incorrect data types) before uploading": "Vérifier l'absence d'incohérences ou d'erreurs dans les données (par exemple, valeurs manquantes, types de données incorrects) avant de les télécharger.", + "Click the \"Attach\" button to select your prepared data file.": "Cliquez sur le bouton « Joindre » pour sélectionner le fichier de données que vous avez préparé.", + "Click the button below to download the bulk upload template file(s).": "Cliquez sur le bouton ci-dessous pour télécharger le ou les modèle(s) de téléchargement en masse.", + "Data import started successfully": "L'importation des données a commencé avec succès", + "Data imports": "Importations de données", + "Date created": "Date de création", + "Date Created": "Date de création", + "Date Ended": "Date de clôture", + "Date Started": "Date de début", + "Download Template": "Télécharger le modèle", + "Enter your data into the template file. Ensure all required fields are filled and follow the specified format(e.g. date format)": "Saisissez vos données dans le modèle de fichier. Assurez-vous que tous les champs obligatoires sont remplis et qu'ils respectent le format spécifié (par exemple, le format de la date).", + "Failed to refresh data, please refresh the page": "Échec de l'actualisation des données, veuillez actualiser la page.", + "File name": "Nom du fichier", + "Follow these simple instructions to help you prepare, upload, and verify your data smoothly and efficiently": "Suivez ces instructions simples pour vous aider à préparer, télécharger et vérifier vos données de manière simple et efficace.", + "Inventory": "Inventaire", + "Locations": "Emplacements", + "Log Output": "Sortie", + "Once the file or files are selected, click \"Start Import\" to begin the upload": "Une fois le ou les fichiers sélectionnés, cliquez sur « Démarrer l'importation » pour commencer le téléchargement.", + "Organization location assignment": "Affectation d'emplacement d'organisation", + "Organizations": "Organisations", + "Prepare your data file": "Préparez votre fichier de données", + "Products": "Produits", + "Resource upload": "Téléchargement de ressources", + "Start Import": "Démarrer l'importation", + "status": "Statut", + "Step by step guide for bulk upload": "Guide étape par étape pour le téléchargement en masse", + "Upload your data file": "Téléchargez votre fichier de données", + "Uploading": "Téléchargement", + "User organization assignment": "Affectation des utilisateurs à des organisations", + "Users": "Utilisateurs", + "View": "Voir", + "View details | {{workflowId}}": "Afficher les détails {{workflowId}}", + "Workflow Id": "Id du workflow", + "Workflow type": "Type de workflow" +} diff --git a/packages/i18n/locales/eusm/fhir-keycloak-user-management/en.json b/packages/i18n/locales/eusm/fhir-keycloak-user-management/en.json index c784a29fc..5c7449e2f 100644 --- a/packages/i18n/locales/eusm/fhir-keycloak-user-management/en.json +++ b/packages/i18n/locales/eusm/fhir-keycloak-user-management/en.json @@ -10,8 +10,10 @@ "CareTeams": "CareTeams", "Category": "Category", "Client": "Client", + "Could not fetch this user's details.": "", "Could not find the user.": "Could not find the user.", "Credentials": "Credentials", + "Date Created": "", "Delete": "Delete", "Description": "Description", "Disabled": "Disabled", @@ -27,19 +29,25 @@ "Failed to update practitioner": "Failed to update practitioner", "Failed to update practitionerRole": "Failed to update practitionerRole", "False": "False", + "Fetching user details": "", + "FHIR Core App Id": "", "First name": "First name", "First Name": "First Name", "Group deactivated": "Group deactivated", "Group resource created successfully": "Group resource created successfully", "Group resource updated successfully": "Group resource updated successfully", "Id": "Id", + "ID": "", + "keycloakUserStatusFilter": "<0>Status:<1><0>{t('Enabled')}<1>{t('Disabled')}<2>{t('Show all')}", "Last name": "Last name", "Last Name": "Last Name", "Leave": "Leave", "Name": "Name", + "National ID": "", "No": "No", "Organizations": "Organizations", "Path": "Path", + "Phone Number": "", "Practitioner created successfully": "Practitioner created successfully", "Practitioner deactivated": "Practitioner deactivated", "Practitioner Role Coding": "Practitioner Role Coding", @@ -48,8 +56,8 @@ "PractitionerRole created successfully": "PractitionerRole created successfully", "PractitionerRole updated successfully": "PractitionerRole updated successfully", "Practitioners": "Practitioners", + "Show all": "", "Status": "Status", - "This user does not have any attributes": "This user does not have any attributes", "True": "True", "Type": "Type", "User deleted successfully": "User deleted successfully", @@ -63,5 +71,7 @@ "Verified": "Verified", "View details": "View details", "View Details": "View Details", + "View details | {{userName}}": "", + "View full details": "", "Yes": "Yes" } diff --git a/packages/i18n/locales/eusm/fhir-keycloak-user-management/fr.json b/packages/i18n/locales/eusm/fhir-keycloak-user-management/fr.json index 661b4d5af..d27918ff5 100644 --- a/packages/i18n/locales/eusm/fhir-keycloak-user-management/fr.json +++ b/packages/i18n/locales/eusm/fhir-keycloak-user-management/fr.json @@ -10,8 +10,10 @@ "CareTeams": "CareTeams", "Category": "Catégorie", "Client": "Clients", + "Could not fetch this user's details.": "Impossible d'obtenir les détails de cet utilisateur.", "Could not find the user.": "Impossible de trouver l'utilisateur.", "Credentials": "Références", + "Date Created": "Date de création", "Delete": "Supprimer", "Description": "Description", "Disabled": "Désactivé", @@ -27,19 +29,25 @@ "Failed to update practitioner": "Échec de la mise à jour du praticien", "Failed to update practitionerRole": "Échec de la mise à jour du rôle du praticien", "False": "Faux", + "Fetching user details": "Récupération des données de l'utilisateur", + "FHIR Core App Id": "FHIR Core App Id", "First name": "Prénom", "First Name": "Prénom", "Group deactivated": "Déactiver", "Group resource created successfully": "Création réussie d'une ressource de groupe", "Group resource updated successfully": "La ressource du groupe a été mise à jour avec succès", "Id": "ID", + "ID": "ID", + "keycloakUserStatusFilter": "<0>Statut:<1><0>{t('Activé')}<1>{t('Désactivé')}<2>{t('Afficher tout')}", "Last name": "Nom", "Last Name": "Nom", "Leave": "Quitter", "Name": "Prénom", + "National ID": "National ID", "No": "Non", "Organizations": "Organisations", "Path": "Parcours", + "Phone Number": "Numéro de téléphone", "Practitioner created successfully": "Création réussie d'un praticien", "Practitioner deactivated": "Praticien désactivé", "Practitioner Role Coding": "Codage du rôle du praticien", @@ -48,8 +56,8 @@ "PractitionerRole created successfully": "Création réussie d'un rôle de praticien", "PractitionerRole updated successfully": "Mise à jour réussie du rôle de praticien", "Practitioners": "Praticiens", + "Show all": "Afficher tout", "Status": "Statut", - "This user does not have any attributes": "Cet utilisateur n'a pas d'attributs", "True": "Vrai", "Type": "Type", "User deleted successfully": "Supression d'utilisateur réussie", @@ -63,5 +71,7 @@ "Verified": "Vérifié", "View details": "Voir les détails", "View Details": "Voir les détails", + "View details | {{userName}}": "Voir détails | {{userName}}", + "View full details": "Voir tous les détails", "Yes": "Oui" } diff --git a/packages/i18n/locales/eusm/fhir-location-management/en.json b/packages/i18n/locales/eusm/fhir-location-management/en.json index 8f8d98d38..6ea73d739 100644 --- a/packages/i18n/locales/eusm/fhir-location-management/en.json +++ b/packages/i18n/locales/eusm/fhir-location-management/en.json @@ -1,5 +1,6 @@ { " JSON": " JSON", + "Accountability status:": "", "Acct. end dt.": "Acct. end dt.", "Actions": "Actions", "Active": "Active", @@ -42,6 +43,7 @@ "Location was successfully updated": "Location was successfully updated", "Locations": "Locations", "locationsOnServer": "<0>There exists {{locationNum}} locations on the server.<1> One of these could be the intended but wrongly configured, root location. <2> If you are not sure, kindly reach out to the web administrator for help.", + "locationStatusFilter": "<0>Status:<1>", "Longitude": "Longitude", "LookingForUploadedLocations": "<0> Looking for uploaded locations on the server.", "Name": "Name", @@ -52,6 +54,7 @@ "Only decimal values allowed": "Only decimal values allowed", "Parent": "Parent", "Parent ID can only contain letters, numbers and spaces": "Parent ID can only contain letters, numbers and spaces", + "parentLocationFilter": "<0>Parent Location:<1>", "Part Of": "Part Of", "Physical type": "Physical type", "Physical Type": "Physical Type", @@ -72,6 +75,7 @@ "Serial no.": "Serial no.", "Service points": "Service points", "service type is required": "service type is required", + "Show all": "", "Status": "Status", "Status is required": "Status is required", "This action will create a new location with id {{rootLocationId}}. The web application will then use the created location as the root location.": "This action will create a new location with id {{rootLocationId}}. The web application will then use the created location as the root location.", diff --git a/packages/i18n/locales/eusm/fhir-location-management/fr.json b/packages/i18n/locales/eusm/fhir-location-management/fr.json index 2e0c31ae7..48c762603 100644 --- a/packages/i18n/locales/eusm/fhir-location-management/fr.json +++ b/packages/i18n/locales/eusm/fhir-location-management/fr.json @@ -1,5 +1,6 @@ { " JSON": " JSON", + "Accountability status:": "Statut de la redevabilité :", "Acct. end dt.": "Acct. end dt.", "Actions": "Actions", "Active": "Actif", @@ -42,6 +43,7 @@ "Location was successfully updated": "Le point de service a été mis à jour avec succès", "Locations": "Emplacements", "locationsOnServer": "<0>Il existe des emplacements {{locationNum}} sur le serveur. <1>L'un d'entre eux pourrait être l'emplacement racine prévu mais mal configuré. <2>Si vous n'êtes pas sûr, veuillez contacter l'administrateur web pour obtenir de l'aide.", + "locationStatusFilter": "<0>Statut:<1>", "Longitude": "Longitude", "LookingForUploadedLocations": "<0>Recherche des emplacements téléchargés sur le serveur.", "Name": "Prénom", @@ -52,6 +54,7 @@ "Only decimal values allowed": "Seules les valeurs décimales sont autorisées", "Parent": "Parent", "Parent ID can only contain letters, numbers and spaces": "Parent ID ne peut contenir que des lettres, des chiffres et des espaces.", + "parentLocationFilter": "<0>Parent Location:<1>", "Part Of": "Partie de", "Physical type": "Type de physique", "Physical Type": "Type de physique", @@ -72,6 +75,7 @@ "Serial no.": "Serial no.", "Service points": "Points de service", "service type is required": "Le type de service est requis", + "Show all": "Afficher tout", "Status": "Statut", "Status is required": "Le statut est requis", "This action will create a new location with id {{rootLocationId}}. The web application will then use the created location as the root location.": "Cette action crée un nouvel emplacement avec l'identifiant {{rootLocationId}}. L'application web utilisera alors l'emplacement créé comme root location", diff --git a/packages/i18n/locales/eusm/keycloak-user-management/en.json b/packages/i18n/locales/eusm/keycloak-user-management/en.json index bbe9317ee..9e5b79bd8 100644 --- a/packages/i18n/locales/eusm/keycloak-user-management/en.json +++ b/packages/i18n/locales/eusm/keycloak-user-management/en.json @@ -11,9 +11,6 @@ "Composite": "Composite", "Confirm Password": "Confirm Password", "Confirm Password is required": "Confirm Password is required", - "Contact": "Contact", - "Contact is required": "Contact is required", - "Contact should be 10 digits and start with 0": "Contact should be 10 digits and start with 0", "Credentials": "Credentials", "Credentials updated successfully": "Credentials updated successfully", "Delete": "Delete", @@ -34,8 +31,11 @@ "Last Name is required": "Last Name is required", "Mark as Practitioner": "Mark as Practitioner", "Members": "Members", + "Mobile Phone Number": "", "Name": "Name", "Name is required": "Name is required", + "National Id": "", + "National Id number with 16 digits": "", "New User Group": "New User Group", "No": "No", "No Active Practitioner": "No Active Practitioner", @@ -44,6 +44,7 @@ "No Assigned Teams": "No Assigned Teams", "Password": "Password", "Password is required": "Password is required", + "Please enter a Phone number with 10 to 16 digits.": "", "Please select": "Please select", "Practitioner": "Practitioner", "Practitioner created successfully": "Practitioner created successfully", diff --git a/packages/i18n/locales/eusm/keycloak-user-management/fr.json b/packages/i18n/locales/eusm/keycloak-user-management/fr.json index 6ff9cd906..1d6f16b3a 100644 --- a/packages/i18n/locales/eusm/keycloak-user-management/fr.json +++ b/packages/i18n/locales/eusm/keycloak-user-management/fr.json @@ -11,9 +11,6 @@ "Composite": "Composite", "Confirm Password": "Confirmer le mot de passe", "Confirm Password is required": "Confirmer le mot de passe est obligatoire", - "Contact": "Contact", - "Contact is required": "Contact est obligatoire", - "Contact should be 10 digits and start with 0": "Le contact doit être composé de 10 chiffres et commencer par 0.", "Credentials": "Références", "Credentials updated successfully": "Mise à jour réussie des données d'identification", "Delete": "Supprimer", @@ -34,8 +31,11 @@ "Last Name is required": "Nom est requis", "Mark as Practitioner": "Marquer en tant que praticien", "Members": "Les membres", + "Mobile Phone Number": "Numéro de téléphone mobile", "Name": "Prénom", "Name is required": "Prénom est requis", + "National Id": "Numéro d'identification national", + "National Id number with 16 digits": "Numéro d'identification national à 16 chiffres", "New User Group": "Nouveau groupe d'utilisateurs", "No": "Non", "No Active Practitioner": "Pas de praticien actif", @@ -44,6 +44,7 @@ "No Assigned Teams": "Pas d'équipes assignées", "Password": "Mot de passe", "Password is required": "Le mot de passe est obligatoire", + "Please enter a Phone number with 10 to 16 digits.": "Veuillez saisir un numéro de téléphone de 10 à 16 chiffres.", "Please select": "Veuillez sélectionner", "Practitioner": "Praticien", "Practitioner created successfully": "Création réussie d'un praticien", diff --git a/packages/i18n/locales/eusm/react-utils/en.json b/packages/i18n/locales/eusm/react-utils/en.json index 654d96575..8c0c8d13c 100644 --- a/packages/i18n/locales/eusm/react-utils/en.json +++ b/packages/i18n/locales/eusm/react-utils/en.json @@ -1,10 +1,13 @@ { "404": "404", "Actions": "Actions", + "Class": "", + "Date created": "", "Error": "Error", "Fetching next page": "Fetching next page", "Go back": "Go back", "Go home": "Go home", + "ID": "", "Load more options": "Load more options", "No data": "No data", "No data available": "No data available", @@ -13,6 +16,7 @@ "Something went wrong": "Something went wrong", "Sorry, the resource you requested for, does not exist": "Sorry, the resource you requested for, does not exist", "Sorry, you are not authorized to access this page": "Sorry, you are not authorized to access this page", + "status": "", "Unable to load dropdown options.": "Unable to load dropdown options.", "View details": "View details" } diff --git a/packages/i18n/locales/eusm/react-utils/fr.json b/packages/i18n/locales/eusm/react-utils/fr.json index a6b3366f6..7f2b86315 100644 --- a/packages/i18n/locales/eusm/react-utils/fr.json +++ b/packages/i18n/locales/eusm/react-utils/fr.json @@ -1,10 +1,13 @@ { "404": "404", "Actions": "Actions", + "Class": "Catégorie", + "Date created": "Date de création", "Error": "Erreur", "Fetching next page": "Consultation de la page suivante", "Go back": "Retour", "Go home": "Retour à l'accueil", + "ID": "ID", "Load more options": "Charger plus d'options", "No data": "Aucune donnée", "No data available": "Pas de données disponibles", @@ -13,6 +16,7 @@ "Something went wrong": "Quelque chose n'a pas fonctionné", "Sorry, the resource you requested for, does not exist": "Désolé, la ressource demandée n'existe pas.", "Sorry, you are not authorized to access this page": "Désolé, vous n'êtes pas autorisé à accéder à cette page", + "status": "Statut", "Unable to load dropdown options.": "Impossible de charger les options de la liste déroulante.", "View details": "Voir les détails" } diff --git a/packages/keycloak-user-management/src/ducks/user.ts b/packages/keycloak-user-management/src/ducks/user.ts index 4c0bf4cd4..1417de099 100644 --- a/packages/keycloak-user-management/src/ducks/user.ts +++ b/packages/keycloak-user-management/src/ducks/user.ts @@ -59,9 +59,9 @@ export interface KeycloakUser { email?: string; emailVerified?: boolean; enabled?: boolean; - firstName: string; + firstName?: string; id: string; - lastName: string; + lastName?: string; nationalId?: string; phoneNumber?: string; notBefore?: number; diff --git a/scripts/i18n/cli.js b/scripts/i18n/cli.js index 843486156..f195e6c11 100755 --- a/scripts/i18n/cli.js +++ b/scripts/i18n/cli.js @@ -55,7 +55,6 @@ yargs(hideBin(process.argv)) }); }, async (argv) => { - console.log({ argv }); await runExtractions(argv); } ) diff --git a/scripts/i18n/lib/uploadMerged.js b/scripts/i18n/lib/uploadMerged.js index 84566f765..8fe8abaad 100644 --- a/scripts/i18n/lib/uploadMerged.js +++ b/scripts/i18n/lib/uploadMerged.js @@ -1,11 +1,6 @@ import path from 'path'; import fs from 'fs'; -import { - ensureFilePath, - getLocaleFilePaths, - getLocaleFolderPaths, - REPO_ROOT_PATH, -} from './utils.js'; +import { ensureFilePath, getLocaleFolderPaths, REPO_ROOT_PATH } from './utils.js'; function processNamespace(namespace, unifiedJson, locale) { const baseLocale = 'en'; @@ -14,7 +9,6 @@ function processNamespace(namespace, unifiedJson, locale) { const referenceDict = JSON.parse(fs.readFileSync(enReferenceResourceFile, 'utf-8')); ensureFilePath(destReferenceResourceFile); const updatedStringMap = {}; - console.log({ referenceDict }); for (const key in referenceDict) { let updateValue = unifiedJson[key] ?? key; updatedStringMap[key] = updateValue; @@ -26,9 +20,6 @@ export async function uploadTranslations(inFile, projectCode = 'core', locale = const unifiedJson = JSON.parse(fs.readFileSync(inFile, 'utf-8')); const resourceFolders = await getLocaleFolderPaths(projectCode); for (const namespace of resourceFolders) { - if (!namespace.includes('fhir-client')) { - continue; - } const qualifiedNamespacePath = path.resolve(REPO_ROOT_PATH, namespace); processNamespace(qualifiedNamespacePath, unifiedJson, locale); } diff --git a/scripts/i18n/lib/utils.js b/scripts/i18n/lib/utils.js index 07d69efb7..46bd879f9 100644 --- a/scripts/i18n/lib/utils.js +++ b/scripts/i18n/lib/utils.js @@ -7,7 +7,7 @@ import * as fs from 'fs'; // Get __filename and __dirname equivalents const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -export const REPO_ROOT_PATH = path.resolve(__dirname, '..'); +export const REPO_ROOT_PATH = path.resolve(__dirname, '../../../'); export const promisedGlob = promisify(glob); @@ -32,7 +32,7 @@ export const getLocaleFilePaths = async (projectCode, locale) => { * @param {string} locale informs which local files to pick under the project code namespace * @Returns {string[]} - matched paths */ -export const getLocaleFolderPaths = async (projectCode, locale) => { +export const getLocaleFolderPaths = async (projectCode) => { const workspacesGlob = `packages/i18n/locales/${projectCode}/*/`; return promisedGlob(workspacesGlob, { cwd: REPO_ROOT_PATH }).catch(() => { return []; @@ -47,8 +47,7 @@ export function ensureFilePath(filePath) { const dirPath = path.dirname(filePath); // Extract the directory path try { if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { recursive: true }); // Create the directory if it doesn't exist - console.log(`Directory ensured: ${dirPath}`); + fs.mkdirSync(dirPath, { recursive: true }); } } catch (error) { console.error(`Error ensuring file path: ${error.message}`);