Skip to content

Commit

Permalink
(fix) Fix the translated texts having same key and different value st…
Browse files Browse the repository at this point in the history
…rings (#821)

Co-authored-by: Dennis Kigen <[email protected]>
  • Loading branch information
vasharma05 and denniskigen authored Oct 19, 2023
1 parent bc23e35 commit bdadcbc
Show file tree
Hide file tree
Showing 41 changed files with 182 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const AppointmentServices: React.FC<AppointmentServicesProps> = () => {
},
(error) => {
showNotification({
title: t('errorMessage', 'Error creating appointment service'),
title: t('errorCreatingAppointmentService', 'Error creating appointment service'),
kind: 'error',
critical: true,
description: error?.message,
Expand Down Expand Up @@ -120,7 +120,7 @@ const AppointmentServices: React.FC<AppointmentServicesProps> = () => {
<Layer>
<TextInput
id="durationMins"
invalidText={t(props.errors.durationMins)}
invalidText={props.errors.durationMins}
labelText={t('durationMins', 'Duration min')}
placeholder={t('durationMins', 'Duration min')}
invalid={!!(props.touched && props.errors.durationMins)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ const CalendarPatientList: React.FC<CalendarPatientListProps> = () => {

const headers = [
{
header: t('name', 'Patient name'),
header: t('patientName', 'Patient name'),
key: 'name',
},
{
header: t('dateTime', 'Date & Time'),
header: t('date&Time', 'Date & time'),
key: 'dateTime',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const AppointmentsTable: React.FC<AppointmentsTableProps> = ({
<DataTable rows={rowData} headers={headerData} isSortable useZebraStyles>
{({ rows, headers, getHeaderProps, getRowProps, getTableProps, getToolbarProps, getTableContainerProps }) => (
<TableContainer
title={`${startCase(tableHeading)} ${t('appointments', 'appointment')}`}
title={`${startCase(tableHeading)} ${t('appointment', 'appointment')}`}
description={`${t(`Total ${appointments.length ?? 0}`)}`}
{...getTableContainerProps()}>
<TableToolbar {...getToolbarProps()} aria-label="data table toolbar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CheckInButton: React.FC<CheckInButtonProps> = ({ appointment, patientUuid
<VisitForm patientUuid={patientUuid} appointment={appointment} />,
)
}>
{t('checkIn', 'CheckIn')}
{t('checkIn', 'Check In')}
</Button>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const CancelAppointment: React.FC<CancelAppointmentProps> = ({ appointment }) =>
showToast({
critical: true,
kind: 'success',
description: t('appointmentNowVisible', 'It has been cancelled successfully'),
description: t('cancelledSuccessfully', 'It has been cancelled successfully'),
title: t('appointmentCancelled', 'Appointment cancelled'),
});
mutate(`/ws/rest/v1/appointment/appointmentStatus?forDate=${currentAppointmentDate}&status=Scheduled`);
Expand All @@ -46,7 +46,7 @@ const CancelAppointment: React.FC<CancelAppointmentProps> = ({ appointment }) =>
title: t('appointmentCancelError', 'Error cancelling appointment'),
kind: 'error',
critical: true,
description: t('errorMessage', 'Error cancelling the appointment'),
description: t('errorCancellingAppointment', 'Error cancelling the appointment'),
});
setIsSubmitting(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const AppointmentForm: React.FC<AppointmentFormProps> = ({ appointment, patientU
<p>{t('selectAppointmentLocation', 'Select where the appointment will take place')}</p>

<Select
labelText={t('selectLocation', 'Select a location')}
labelText={t('selectALocation', 'Select a location')}
id="location"
invalidText="Required"
value={selectedLocation}
Expand Down Expand Up @@ -276,7 +276,7 @@ const AppointmentForm: React.FC<AppointmentFormProps> = ({ appointment, patientU
onChange={({ selectedIndex }) => setSelectedTab(selectedIndex)}
className={styles.tabs}>
<TabList style={{ paddingLeft: '1rem' }}>
<Tab>{t('weekly', 'WeeKly')}</Tab>
<Tab>{t('weekly', 'Weekly')}</Tab>
<Tab>{t('monthly', 'Monthly')}</Tab>
</TabList>
<TabPanels>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const AppointmentsBaseTable = () => {
() => [
{
id: 0,
header: t('dateTime', 'Date and time'),
header: t('dateAndTime', 'Date and time'),
key: 'dateTime',
isSortable: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const CheckInAppointmentModal: React.FC<ChangeStatusDialogProps> = ({ closeCheck
title: t('appointmentCheckInError', 'Error checking in appointment'),
kind: 'error',
critical: true,
description: t('errorMessage', 'Error checking in the appointment'),
description: t('errorCheckingAppoitment', 'Error checking in the appointment'),
});
setIsSubmitting(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const EncounterList: React.FC<EncounterListProps> = ({ encounters }) => {
<StructuredListWrapper>
<StructuredListHead>
<StructuredListRow head>
<StructuredListCell head>{t('dateTime', 'Date & time')}</StructuredListCell>
<StructuredListCell head>{t('date&Time', 'Date & time')}</StructuredListCell>
<StructuredListCell head>{t('encounterType', 'Encounter type')}</StructuredListCell>
<StructuredListCell head>{t('provider', 'Provider')}</StructuredListCell>
</StructuredListRow>
Expand Down
12 changes: 9 additions & 3 deletions packages/esm-appointments-app/translations/am.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"addPatientToQueue": "Add patient to queue",
"age": "Age",
"all": "All",
"appointment": "appointment",
"appointmentCancelError": "Error cancelling appointment",
"appointmentCancelled": "Appointment cancelled",
"appointmentCheckedIn": "Appointment Checked-in",
Expand Down Expand Up @@ -35,6 +36,7 @@
"cancel": "Cancel",
"cancelAppointment": "Cancel Appointment",
"cancelled": "Cancelled",
"cancelledSuccessfully": "It has been cancelled successfully",
"checkedIn": "Checked in",
"checkedOut": "Checked out",
"checkFilters": "Check the filters above",
Expand All @@ -53,8 +55,9 @@
"createNewAppointment": "Create new appointment",
"daily": "Daily",
"date": "Date",
"date&Time": "Date & time",
"dateAndTime": "Date and time",
"dateAndTimeOfVisit": "Date and time of visit",
"dateTime": "Date & time",
"discard": "Discard",
"dob": "Dob",
"download": "Download",
Expand All @@ -65,7 +68,9 @@
"encounters": "Encounters",
"encounterType": "Encounter type",
"endTime": "End Time",
"errorMessage": "Error checking in the appointment",
"errorCancellingAppointment": "Error cancelling the appointment",
"errorCheckingAppoitment": "Error checking in the appointment",
"errorCreatingAppointmentService": "Error creating appointment service",
"filter": "Filter",
"gender": "Gender",
"highestServiceVolume": "High volume service: {time}",
Expand Down Expand Up @@ -110,11 +115,12 @@
"search": "Search",
"searchForAVisitType": "Search for a visit type",
"seeAllAppointments": "See all appointments",
"selectALocation": "Select a location",
"selectAppointmentLocation": "Select where the appointment will take place",
"selectAppointmentStatus": "Select status",
"selectAppointmentType": "Select an appointment type",
"selectFacility": "Select a facility",
"selectLocation": "Select a location",
"selectLocation": "Select location",
"selectOption": "Select an option",
"selectProvider": "Select a provider",
"selectService": "Select a service",
Expand Down
14 changes: 10 additions & 4 deletions packages/esm-appointments-app/translations/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"addPatientToQueue": "أضف المريض إلى الطابور",
"age": "العمر",
"all": "الكل",
"appointment": "appointment",
"appointmentCancelError": "خطأ في إلغاء الموعد",
"appointmentCancelled": "تم إلغاء الموعد",
"appointmentCheckedIn": "تم تسجيل الوصول للموعد",
Expand Down Expand Up @@ -35,6 +36,7 @@
"cancel": "إلغاء",
"cancelAppointment": "إلغاء الموعد",
"cancelled": "تم الإلغاء",
"cancelledSuccessfully": "It has been cancelled successfully",
"checkedIn": "تم تسجيل الوصول",
"checkedOut": "تم تسجيل الخروج",
"checkFilters": "تحقق من الفلاتر أعلاه",
Expand All @@ -53,8 +55,9 @@
"createNewAppointment": "إنشاء موعد جديد",
"daily": "يومي",
"date": "تاريخ",
"date&Time": "Date & time",
"dateAndTime": "Date and time",
"dateAndTimeOfVisit": "تاريخ ووقت الزيارة",
"dateTime": "تاريخ ووقت",
"discard": "تجاهل",
"dob": "تاريخ الولادة",
"download": "تحميل",
Expand All @@ -65,10 +68,11 @@
"encounters": "اللقاءات",
"encounterType": "نوع اللقاء",
"endTime": "وقت الانتهاء",
"errorMessage": "خطأ في تسجيل الوصول للموعد",
"errorCancellingAppointment": "Error cancelling the appointment",
"errorCheckingAppoitment": "Error checking in the appointment",
"errorCreatingAppointmentService": "Error creating appointment service",
"filter": "فلتر",
"gender": "الجنس",
"getAppointmentReminder": "هل ترغب في الحصول على تذكير بشأن هذا الموعد؟",
"highestServiceVolume": "خدمة بأعلى حجم: {time}",
"home": "الرئيسية",
"honored": "تم الالتزام به",
Expand Down Expand Up @@ -111,6 +115,8 @@
"search": "بحث",
"searchForAVisitType": "ابحث عن نوع الزيارة",
"seeAllAppointments": "عرض جميع المواعيد",
"selectALocation": "Select a location",
"selectAppointmentLocation": "Select where the appointment will take place",
"selectAppointmentStatus": "اختر الحالة",
"selectAppointmentType": "اختر نوع الموعد",
"selectFacility": "اختر المنشأة",
Expand Down Expand Up @@ -143,4 +149,4 @@
"vitals": "العلامات الحيوية",
"weekly": "أسبوعي",
"yes": "نعم"
}
}
12 changes: 9 additions & 3 deletions packages/esm-appointments-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"addPatientToQueue": "Add patient to queue",
"age": "Age",
"all": "All",
"appointment": "appointment",
"appointmentCancelError": "Error cancelling appointment",
"appointmentCancelled": "Appointment Cancelled",
"appointmentCheckedIn": "Appointment Checked-in",
Expand Down Expand Up @@ -35,6 +36,7 @@
"cancel": "Cancel",
"cancelAppointment": "Cancel Appointment",
"cancelled": "Cancelled",
"cancelledSuccessfully": "It has been cancelled successfully",
"checkedIn": "Checked in",
"checkedOut": "Checked out",
"checkFilters": "Check the filters above",
Expand All @@ -53,8 +55,9 @@
"createNewAppointment": "Create new appointment",
"daily": "Daily",
"date": "Date",
"date&Time": "Date & time",
"dateAndTime": "Date and time",
"dateAndTimeOfVisit": "Date and time of visit",
"dateTime": "Date & time",
"discard": "Discard",
"dob": "Dob",
"download": "Download",
Expand All @@ -65,7 +68,9 @@
"encounters": "Encounters",
"encounterType": "Encounter type",
"endTime": "End Time",
"errorMessage": "Error canceling the appointment",
"errorCancellingAppointment": "Error cancelling the appointment",
"errorCheckingAppoitment": "Error checking in the appointment",
"errorCreatingAppointmentService": "Error creating appointment service",
"filter": "Filter",
"gender": "Gender",
"highestServiceVolume": "High volume service: {time}",
Expand Down Expand Up @@ -110,11 +115,12 @@
"search": "Search",
"searchForAVisitType": "Search for a visit type",
"seeAllAppointments": "See all appointments",
"selectALocation": "Select a location",
"selectAppointmentLocation": "Select where the appointment will take place",
"selectAppointmentStatus": "Select status",
"selectAppointmentType": "Select an appointment type",
"selectFacility": "Select a facility",
"selectLocation": "Select a location",
"selectLocation": "Select location",
"selectOption": "Select an option",
"selectProvider": "Select a provider",
"selectService": "Select a service",
Expand Down
10 changes: 8 additions & 2 deletions packages/esm-appointments-app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"addPatientToQueue": "Agregar paciente a la cola",
"age": "Edad",
"all": "Todo",
"appointment": "appointment",
"appointmentCancelError": "Error al cancelar la cita",
"appointmentCancelled": "Cita cancelada",
"appointmentCheckedIn": "Cita registrada",
Expand Down Expand Up @@ -35,6 +36,7 @@
"cancel": "Cancelar",
"cancelAppointment": "Cancelar cita",
"cancelled": "Cancelada",
"cancelledSuccessfully": "It has been cancelled successfully",
"checkedIn": "Checked in",
"checkedOut": "Completada",
"checkFilters": "Compruebe los filtros anteriores",
Expand All @@ -53,8 +55,9 @@
"createNewAppointment": "Crear nueva cita",
"daily": "Diario",
"date": "Fecha",
"date&Time": "Date & time",
"dateAndTime": "Date and time",
"dateAndTimeOfVisit": "Fecha y hora de la visita",
"dateTime": "Fecha y hora",
"discard": "Descartar",
"dob": "Fecha de nacimiento",
"download": "Descargar",
Expand All @@ -65,7 +68,9 @@
"encounters": "Encuentros",
"encounterType": "Tipo de encuentro",
"endTime": "Hora de finalización",
"errorMessage": "Error al cancelar la cita",
"errorCancellingAppointment": "Error cancelling the appointment",
"errorCheckingAppoitment": "Error checking in the appointment",
"errorCreatingAppointmentService": "Error creating appointment service",
"filter": "Filtrar",
"gender": "Género",
"highestServiceVolume": "Servicio de alto volumen: {time}",
Expand Down Expand Up @@ -110,6 +115,7 @@
"search": "Buscar",
"searchForAVisitType": "Buscar un tipo de visita",
"seeAllAppointments": "Ver todas las citas",
"selectALocation": "Select a location",
"selectAppointmentLocation": "Seleccionar ubicación de la cita",
"selectAppointmentStatus": "Seleccionar estado",
"selectAppointmentType": "Seleccionar tipo de cita",
Expand Down
12 changes: 9 additions & 3 deletions packages/esm-appointments-app/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"addPatientToQueue": "Add patient to queue",
"age": "Age",
"all": "All",
"appointment": "appointment",
"appointmentCancelError": "Error cancelling appointment",
"appointmentCancelled": "Appointment cancelled",
"appointmentCheckedIn": "Appointment Checked-in",
Expand Down Expand Up @@ -35,6 +36,7 @@
"cancel": "Cancel",
"cancelAppointment": "Cancel Appointment",
"cancelled": "Cancelled",
"cancelledSuccessfully": "It has been cancelled successfully",
"checkedIn": "Checked in",
"checkedOut": "Checked out",
"checkFilters": "Check the filters above",
Expand All @@ -53,8 +55,9 @@
"createNewAppointment": "Create new appointment",
"daily": "Daily",
"date": "Date",
"date&Time": "Date & time",
"dateAndTime": "Date and time",
"dateAndTimeOfVisit": "Date and time of visit",
"dateTime": "Date & time",
"discard": "Discard",
"dob": "Dob",
"download": "Download",
Expand All @@ -65,7 +68,9 @@
"encounters": "Encounters",
"encounterType": "Encounter type",
"endTime": "End Time",
"errorMessage": "Error checking in the appointment",
"errorCancellingAppointment": "Error cancelling the appointment",
"errorCheckingAppoitment": "Error checking in the appointment",
"errorCreatingAppointmentService": "Error creating appointment service",
"filter": "Filter",
"gender": "Gender",
"highestServiceVolume": "High volume service: {time}",
Expand Down Expand Up @@ -110,11 +115,12 @@
"search": "Search",
"searchForAVisitType": "Search for a visit type",
"seeAllAppointments": "See all appointments",
"selectALocation": "Select a location",
"selectAppointmentLocation": "Select where the appointment will take place",
"selectAppointmentStatus": "Select status",
"selectAppointmentType": "Select an appointment type",
"selectFacility": "Select a facility",
"selectLocation": "Select a location",
"selectLocation": "Select location",
"selectOption": "Select an option",
"selectProvider": "Select a provider",
"selectService": "Select a service",
Expand Down
Loading

0 comments on commit bdadcbc

Please sign in to comment.