diff --git a/src/__tests__/HospitalRun.test.tsx b/src/__tests__/HospitalRun.test.tsx index a089385c7c..1f79afa2fc 100644 --- a/src/__tests__/HospitalRun.test.tsx +++ b/src/__tests__/HospitalRun.test.tsx @@ -295,7 +295,7 @@ describe('HospitalRun', () => { expect(store.getActions()).toContainEqual( addBreadcrumbs([ { i18nKey: 'scheduling.appointments.label', location: '/appointments' }, - { i18nKey: 'scheduling.appointments.newAppointment', location: '/appointments/new' }, + { i18nKey: 'scheduling.appointments.new', location: '/appointments/new' }, { i18nKey: 'dashboard.label', location: '/' }, ]), ) diff --git a/src/__tests__/components/Navbar.test.tsx b/src/__tests__/components/Navbar.test.tsx index cabf023bd9..c087581ab2 100644 --- a/src/__tests__/components/Navbar.test.tsx +++ b/src/__tests__/components/Navbar.test.tsx @@ -75,7 +75,7 @@ describe('Navbar', () => { 'scheduling.appointments.label', ) expect(scheduleLinkList.first().props().children[1].props.children).toEqual( - 'scheduling.appointments.newAppointment', + 'scheduling.appointments.new', ) }) diff --git a/src/__tests__/scheduling/appointments/Appointments.test.tsx b/src/__tests__/scheduling/appointments/Appointments.test.tsx index 8e6f49108d..4c3b73282e 100644 --- a/src/__tests__/scheduling/appointments/Appointments.test.tsx +++ b/src/__tests__/scheduling/appointments/Appointments.test.tsx @@ -62,9 +62,7 @@ describe('Appointments', () => { }) const actualButtons: React.ReactNode[] = setButtonToolBarSpy.mock.calls[0][0] - expect((actualButtons[0] as any).props.children).toEqual( - 'scheduling.appointments.newAppointment', - ) + expect((actualButtons[0] as any).props.children).toEqual('scheduling.appointments.new') }) it('should render a calendar with the proper events', async () => { diff --git a/src/__tests__/scheduling/appointments/new/NewAppointment.test.tsx b/src/__tests__/scheduling/appointments/new/NewAppointment.test.tsx index f797bee5b5..393b3776dd 100644 --- a/src/__tests__/scheduling/appointments/new/NewAppointment.test.tsx +++ b/src/__tests__/scheduling/appointments/new/NewAppointment.test.tsx @@ -62,7 +62,7 @@ describe('New Appointment', () => { await setup() }) - expect(titleUtil.default).toHaveBeenCalledWith('scheduling.appointments.newAppointment') + expect(titleUtil.default).toHaveBeenCalledWith('scheduling.appointments.new') }) }) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index ef44e012b4..ebb8c1b682 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -63,7 +63,7 @@ const Navbar = () => { }, { type: 'link', - label: t('scheduling.appointments.newAppointment'), + label: t('scheduling.appointments.new'), onClick: () => { history.push('/appointments/new') }, diff --git a/src/i18n.js b/src/i18n.js deleted file mode 100644 index 648c163a6a..0000000000 --- a/src/i18n.js +++ /dev/null @@ -1,30 +0,0 @@ -import i18n from 'i18next' -import LanguageDetector from 'i18next-browser-languagedetector' -import { initReactI18next } from 'react-i18next' - -import translationEN from './locales/en-US/translation' - -const resources = { - en: { - translation: translationEN, - }, -} - -i18n - // detect user language - // learn more: https://github.com/i18next/i18next-browser-languageDetector - .use(LanguageDetector) - // pass the i18n instance to react-i18next. - .use(initReactI18next) - // init i18next - // for all options read: https://www.i18next.com/overview/configuration-options - .init({ - fallbackLng: 'en', - debug: true, - resources, - interpolation: { - escapeValue: false, // not needed for react as it escapes by default - }, - }) - -export default i18n diff --git a/src/i18n.ts b/src/i18n.ts new file mode 100644 index 0000000000..0b5c79d50e --- /dev/null +++ b/src/i18n.ts @@ -0,0 +1,64 @@ +import i18n from 'i18next' +import LanguageDetector from 'i18next-browser-languagedetector' +import { initReactI18next } from 'react-i18next' + +import translationAR from './locales/ar/translations' +import translationDE from './locales/de/translations' +import translationEnUs from './locales/enUs/translations' +import translationES from './locales/es/translations' +import translationIN from './locales/in/translations' +import translationJA from './locales/ja/translations' +import translationPtBR from './locales/ptBr/translations' +import translationRU from './locales/ru/translations' +import translationZR from './locales/zr/translations' + +const resources = { + ar: { + translation: translationAR, + }, + de: { + translation: translationDE, + }, + en: { + translation: translationEnUs, + }, + es: { + translation: translationES, + }, + in: { + translation: translationIN, + }, + ja: { + translation: translationJA, + }, + pt: { + translation: translationPtBR, + }, + ru: { + translation: translationRU, + }, + zr: { + translation: translationZR, + }, +} + +i18n + // load translation using xhr -> see /public/locales + // learn more: https://github.com/i18next/i18next-xhr-backend + // detect user language + // learn more: https://github.com/i18next/i18next-browser-languageDetector + .use(LanguageDetector) + // pass the i18n instance to react-i18next. + .use(initReactI18next) + // init i18next + // for all options read: https://www.i18next.com/overview/configuration-options + .init({ + fallbackLng: 'en', + debug: true, + resources, + interpolation: { + escapeValue: false, // not needed for react as it escapes by default + }, + }) + +export default i18n diff --git a/src/locales/ar/translations/actions/index.ts b/src/locales/ar/translations/actions/index.ts new file mode 100644 index 0000000000..3780103bfe --- /dev/null +++ b/src/locales/ar/translations/actions/index.ts @@ -0,0 +1,9 @@ +export default { + actions: { + edit: 'تصحيح', + save: 'حفظ', + cancel: 'إلغاء', + new: 'الجديد', + list: 'قائمة', + }, +} diff --git a/src/locales/ar/translations/dashboard/index.ts b/src/locales/ar/translations/dashboard/index.ts new file mode 100644 index 0000000000..75e1d4d0f7 --- /dev/null +++ b/src/locales/ar/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'لوحة القيادة', + }, +} diff --git a/src/locales/ar/translations/index.ts b/src/locales/ar/translations/index.ts new file mode 100644 index 0000000000..e948f4340c --- /dev/null +++ b/src/locales/ar/translations/index.ts @@ -0,0 +1,11 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, +} diff --git a/src/locales/ar/translations/patient/index.ts b/src/locales/ar/translations/patient/index.ts new file mode 100644 index 0000000000..ad53ac665e --- /dev/null +++ b/src/locales/ar/translations/patient/index.ts @@ -0,0 +1,6 @@ +export default { + patient: { + firstName: 'الاسم الاول', + lastName: 'الكنية', + }, +} diff --git a/src/locales/ar/translations/patients/index.ts b/src/locales/ar/translations/patients/index.ts new file mode 100644 index 0000000000..5477a71fae --- /dev/null +++ b/src/locales/ar/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: 'المرضى', + viewPatients: 'عرض المرضى', + viewPatient: 'عرض المريض', + newPatient: 'مريض جديد', + }, +} diff --git a/src/locales/de/translations/actions/index.ts b/src/locales/de/translations/actions/index.ts new file mode 100644 index 0000000000..36da829341 --- /dev/null +++ b/src/locales/de/translations/actions/index.ts @@ -0,0 +1,9 @@ +export default { + actions: { + edit: 'Bearbeiten', + save: 'speichern', + cancel: 'Stornieren', + new: 'Neu', + list: 'Liste', + }, +} diff --git a/src/locales/de/translations/dashboard/index.ts b/src/locales/de/translations/dashboard/index.ts new file mode 100644 index 0000000000..984588ceb3 --- /dev/null +++ b/src/locales/de/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'Instrumententafel', + }, +} diff --git a/src/locales/de/translations/index.ts b/src/locales/de/translations/index.ts new file mode 100644 index 0000000000..e948f4340c --- /dev/null +++ b/src/locales/de/translations/index.ts @@ -0,0 +1,11 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, +} diff --git a/src/locales/de/translations/patient/index.ts b/src/locales/de/translations/patient/index.ts new file mode 100644 index 0000000000..d1b1df3786 --- /dev/null +++ b/src/locales/de/translations/patient/index.ts @@ -0,0 +1,6 @@ +export default { + patient: { + firstName: 'Vorname', + lastName: 'Nachname', + }, +} diff --git a/src/locales/de/translations/patients/index.ts b/src/locales/de/translations/patients/index.ts new file mode 100644 index 0000000000..c29fa19da2 --- /dev/null +++ b/src/locales/de/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: 'Patienten', + viewPatients: 'Patienten anzeigen', + viewPatient: 'Patient anzeigen', + newPatient: 'Neuer Patient', + }, +} diff --git a/src/locales/en-US/translation.json b/src/locales/en-US/translation.json deleted file mode 100644 index 2fdb15464a..0000000000 --- a/src/locales/en-US/translation.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "dashboard": { - "label": "Dashboard" - }, - "patients": { - "label": "Patients", - "viewPatients": "View Patients", - "viewPatient": "View Patient", - "newPatient": "New Patient", - "editPatient": "Edit Patient", - "successfullyCreated": "Successfully created patient", - "successfullyUpdated": "Successfully updated patient" - }, - "patient": { - "suffix": "Suffix", - "prefix": "Prefix", - "givenName": "Given Name", - "familyName": "Family Name", - "dateOfBirth": "Date of Birth", - "approximateDateOfBirth": "Approximate Date of Birth", - "age": "Age", - "approximateAge": "Approximate Age", - "placeOfBirth": "Place of Birth", - "sex": "Sex", - "phoneNumber": "Phone Number", - "email": "Email", - "address": "Address", - "occupation": "Occupation", - "type": "Patient Type", - "preferredLanguage": "Preferred Language", - "basicInformation": "Basic Information", - "generalInformation": "General Information", - "contactInformation": "Contact Information", - "unknownDateOfBirth": "Unknown", - "relatedPerson": "Related Person", - "relatedPersons": { - "error": { - "relatedPersonRequired": "Related Person is required.", - "relationshipTypeRequired": "Relationship Type is required." - }, - "warning": { - "noRelatedPersons": "No Related Persons" - }, - "label": "Related Persons", - "new": "New Related Person", - "relationshipType": "Relationship Type", - "addRelatedPersonAbove": "Add a related person using the button above.", - "successfullyAdded": "Successfully added a new related person!" - }, - "types": { - "charity": "Charity", - "private": "Private" - }, - "errors": { - "patientGivenNameRequired": "Patient Given Name is required." - }, - "allergies": { - "label": "Allergies", - "new": "Add Allergy", - "error": { - "nameRequired": "Name is required." - }, - "warning": { - "noAllergies": "No Allergies" - }, - "addAllergyAbove": "Add an allergy using the button above.", - "successfullyAdded": "Successfully added a new allergy!" - }, - "diagnoses": { - "label": "Diagnoses", - "new": "Add Diagnoses", - "diagnosisName": "Diagnosis Name", - "diagnosisDate": "Diagnosis Date", - "warning": { - "noDiagnoses": "No Diagnoses" - }, - "error": { - "nameRequired": "Diagnosis Name is required.", - "dateRequired": "Diagnosis Date is required." - }, - "addDiagnosisAbove": "Add a diagnosis using the button above.", - "successfullyAdded": "Successfully added a new diagnosis!" - } - }, - "sex": { - "male": "Male", - "female": "Female", - "other": "Other", - "unknown": "Unknown" - }, - "actions": { - "edit": "Edit", - "save": "Save", - "cancel": "Cancel", - "new": "New", - "list": "List", - "search": "Search", - "delete": "Delete", - "confirmDelete": "Confirm Delete" - }, - "states": { - "success": "Success!", - "error": "Error!" - }, - "scheduling": { - "label": "Scheduling", - "appointments": { - "label": "Appointments", - "newAppointment": "New Appointment", - "editAppointment": "Edit Appointment", - "viewAppointment": "View Appointment", - "deleteAppointment": "Delete Appointment", - "successfullyDeleted": "Successfully deleted appointment!" - }, - "appointment": { - "startDate": "Start Date", - "endDate": "End Date", - "location": "Location", - "type": "Type", - "types": { - "checkup": "Checkup", - "emergency": "Emergency", - "followUp": "Follow Up", - "routine": "Routine", - "walkIn": "Walk In" - }, - "errors": { - "patientRequired": "Patient is required.", - "startDateMustBeBeforeEndDate": "Start Time must be before End Time." - }, - "reason": "Reason", - "patient": "Patient", - "deleteConfirmationMessage": "Are you sure you want to delete this appointment?" - } - } -} diff --git a/src/locales/enUs/translations/actions/index.ts b/src/locales/enUs/translations/actions/index.ts new file mode 100644 index 0000000000..e34e7424fd --- /dev/null +++ b/src/locales/enUs/translations/actions/index.ts @@ -0,0 +1,10 @@ +export default { + actions: { + edit: 'Edit', + save: 'Save', + cancel: 'Cancel', + new: 'New', + list: 'List', + search: 'Search', + }, +} diff --git a/src/locales/enUs/translations/dashboard/index.ts b/src/locales/enUs/translations/dashboard/index.ts new file mode 100644 index 0000000000..feaad5f3ee --- /dev/null +++ b/src/locales/enUs/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'Dashboard', + }, +} diff --git a/src/locales/enUs/translations/index.ts b/src/locales/enUs/translations/index.ts new file mode 100644 index 0000000000..baca847ac0 --- /dev/null +++ b/src/locales/enUs/translations/index.ts @@ -0,0 +1,17 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' +import scheduling from './scheduling' +import states from './states' +import sex from './sex' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, + ...scheduling, + ...states, + ...sex, +} diff --git a/src/locales/enUs/translations/patient/index.ts b/src/locales/enUs/translations/patient/index.ts new file mode 100644 index 0000000000..5605dc712a --- /dev/null +++ b/src/locales/enUs/translations/patient/index.ts @@ -0,0 +1,70 @@ +export default { + patient: { + firstName: 'First Name', + lastName: 'Last Name', + suffix: 'Suffix', + prefix: 'Prefix', + givenName: 'Given Name', + familyName: 'Family Name', + dateOfBirth: 'Date of Birth', + approximateDateOfBirth: 'Approximate Date of Birth', + age: 'Age', + approximateAge: 'Approximate Age', + placeOfBirth: 'Place of Birth', + sex: 'Sex', + phoneNumber: 'Phone Number', + email: 'Email', + address: 'Address', + occupation: 'Occupation', + type: 'Patient Type', + preferredLanguage: 'Preferred Language', + basicInformation: 'Basic Information', + generalInformation: 'General Information', + contactInformation: 'Contact Information', + unknownDateOfBirth: 'Unknown', + relatedPerson: 'Related Person', + relatedPersons: { + error: { + relatedPersonRequired: 'Related Person is required.', + relationshipTypeRequired: 'Relationship Type is required.', + }, + label: 'Related Persons', + new: 'New Related Person', + relationshipType: 'Relationship Type', + }, + allergies: { + label: 'Allergies', + new: 'Add Allergy', + error: { + nameRequired: 'Name is required.', + }, + warning: { + noAllergies: 'No Allergies', + }, + addAllergyAbove: 'Add an allergy using the button above.', + successfullyAdded: 'Successfully added a new allergy!', + }, + diagnoses: { + label: 'Diagnoses', + new: 'Add Diagnoses', + diagnosisName: 'Diagnosis Name', + diagnosisDate: 'Diagnosis Date', + warning: { + noDiagnoses: 'No Diagnoses', + }, + error: { + nameRequired: 'Diagnosis Name is required.', + dateRequired: 'Diagnosis Date is required.', + }, + addDiagnosisAbove: 'Add a diagnosis using the button above.', + successfullyAdded: 'Successfully added a new diagnosis!', + }, + types: { + charity: 'Charity', + private: 'Private', + }, + errors: { + patientGivenNameRequired: 'Patient Given Name is required.', + }, + }, +} diff --git a/src/locales/enUs/translations/patients/index.ts b/src/locales/enUs/translations/patients/index.ts new file mode 100644 index 0000000000..d775434ded --- /dev/null +++ b/src/locales/enUs/translations/patients/index.ts @@ -0,0 +1,9 @@ +export default { + patients: { + label: 'Patients', + viewPatients: 'View Patients', + viewPatient: 'View Patient', + newPatient: 'New Patient', + successfullyCreated: 'Successfully created patient', + }, +} diff --git a/src/locales/enUs/translations/scheduling/index.ts b/src/locales/enUs/translations/scheduling/index.ts new file mode 100644 index 0000000000..b6cd4f627a --- /dev/null +++ b/src/locales/enUs/translations/scheduling/index.ts @@ -0,0 +1,29 @@ +export default { + scheduling: { + label: 'Scheduling', + appointments: { + label: 'Appointments', + new: 'New Appointment', + }, + appointment: { + startDate: 'Start Date', + endDate: 'End Date', + location: 'Location', + type: 'Type', + types: { + checkup: 'Checkup', + emergency: 'Emergency', + followUp: 'Follow Up', + routine: 'Routine', + walkUp: 'Walk Up', + }, + errors: { + patientRequired: 'Patient is required.', + errorCreatingAppointment: 'Error Creating Appointment!', + startDateMustBeBeforeEndDate: 'Start Time must be before End Time.', + }, + reason: 'Reason', + patient: 'Patient', + }, + }, +} diff --git a/src/locales/enUs/translations/sex/index.ts b/src/locales/enUs/translations/sex/index.ts new file mode 100644 index 0000000000..8292bdda86 --- /dev/null +++ b/src/locales/enUs/translations/sex/index.ts @@ -0,0 +1,8 @@ +export default { + sex: { + male: 'Male', + female: 'Female', + other: 'Other', + unknown: 'Unknown', + }, +} diff --git a/src/locales/enUs/translations/states/index.ts b/src/locales/enUs/translations/states/index.ts new file mode 100644 index 0000000000..a15139a135 --- /dev/null +++ b/src/locales/enUs/translations/states/index.ts @@ -0,0 +1,6 @@ +export default { + states: { + success: 'Success!', + error: 'Error!', + }, +} diff --git a/src/locales/es/translations/actions/index.ts b/src/locales/es/translations/actions/index.ts new file mode 100644 index 0000000000..5c9a3ff1dc --- /dev/null +++ b/src/locales/es/translations/actions/index.ts @@ -0,0 +1,9 @@ +export default { + actions: { + edit: 'Editar', + save: 'Guardar', + cancel: 'Cancelar', + new: 'Nuevo', + list: 'Lista', + }, +} diff --git a/src/locales/es/translations/dashboard/index.ts b/src/locales/es/translations/dashboard/index.ts new file mode 100644 index 0000000000..2ef79d6355 --- /dev/null +++ b/src/locales/es/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'Panel', + }, +} diff --git a/src/locales/es/translations/index.ts b/src/locales/es/translations/index.ts new file mode 100644 index 0000000000..e948f4340c --- /dev/null +++ b/src/locales/es/translations/index.ts @@ -0,0 +1,11 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, +} diff --git a/src/locales/es/translations/patient/index.ts b/src/locales/es/translations/patient/index.ts new file mode 100644 index 0000000000..032a935abb --- /dev/null +++ b/src/locales/es/translations/patient/index.ts @@ -0,0 +1,6 @@ +export default { + patient: { + firstName: 'Nombre de pila', + lastName: 'Apellido', + }, +} diff --git a/src/locales/es/translations/patients/index.ts b/src/locales/es/translations/patients/index.ts new file mode 100644 index 0000000000..1bd4a6d5e3 --- /dev/null +++ b/src/locales/es/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: 'Pacientes', + viewPatients: 'Ver pacientes', + viewPatient: 'Ver pacientes', + newPatient: 'Nuevo paciente', + }, +} diff --git a/src/locales/in/translations/actions/index.ts b/src/locales/in/translations/actions/index.ts new file mode 100644 index 0000000000..5fa64c7d6a --- /dev/null +++ b/src/locales/in/translations/actions/index.ts @@ -0,0 +1,9 @@ +export default { + actions: { + edit: 'Edit', + save: 'Menyimpan', + cancel: 'Membatalkan', + new: 'Baru', + list: 'Daftar', + }, +} diff --git a/src/locales/in/translations/dashboard/index.ts b/src/locales/in/translations/dashboard/index.ts new file mode 100644 index 0000000000..f0f1d382ff --- /dev/null +++ b/src/locales/in/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'Dasbor', + }, +} diff --git a/src/locales/in/translations/index.ts b/src/locales/in/translations/index.ts new file mode 100644 index 0000000000..e948f4340c --- /dev/null +++ b/src/locales/in/translations/index.ts @@ -0,0 +1,11 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, +} diff --git a/src/locales/in/translations/patient/index.ts b/src/locales/in/translations/patient/index.ts new file mode 100644 index 0000000000..282ba6df2c --- /dev/null +++ b/src/locales/in/translations/patient/index.ts @@ -0,0 +1,6 @@ +export default { + patient: { + firstName: 'Nama depan', + lastName: 'Nama keluarga', + }, +} diff --git a/src/locales/in/translations/patients/index.ts b/src/locales/in/translations/patients/index.ts new file mode 100644 index 0000000000..069cd4d42b --- /dev/null +++ b/src/locales/in/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: 'Pasien', + viewPatients: 'Lihat Pasien', + viewPatient: 'Lihat Pasien', + newPatient: 'Pasien Baru', + }, +} diff --git a/src/locales/ja/translations/actions/index.ts b/src/locales/ja/translations/actions/index.ts new file mode 100644 index 0000000000..fdbc8f24b2 --- /dev/null +++ b/src/locales/ja/translations/actions/index.ts @@ -0,0 +1,9 @@ +export default { + actions: { + edit: '編集', + save: 'セーブ', + cancel: 'キャンセル', + new: '新しい', + list: 'リスト', + }, +} diff --git a/src/locales/ja/translations/dashboard/index.ts b/src/locales/ja/translations/dashboard/index.ts new file mode 100644 index 0000000000..fb15f11b7a --- /dev/null +++ b/src/locales/ja/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'ダッシュボード', + }, +} diff --git a/src/locales/ja/translations/index.ts b/src/locales/ja/translations/index.ts new file mode 100644 index 0000000000..e948f4340c --- /dev/null +++ b/src/locales/ja/translations/index.ts @@ -0,0 +1,11 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, +} diff --git a/src/locales/ja/translations/patient/index.ts b/src/locales/ja/translations/patient/index.ts new file mode 100644 index 0000000000..5c16727425 --- /dev/null +++ b/src/locales/ja/translations/patient/index.ts @@ -0,0 +1,6 @@ +export default { + patient: { + firstName: 'ファーストネーム', + lastName: '苗字', + }, +} diff --git a/src/locales/ja/translations/patients/index.ts b/src/locales/ja/translations/patients/index.ts new file mode 100644 index 0000000000..c4b9bb219a --- /dev/null +++ b/src/locales/ja/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: '患者さん', + viewPatients: '患者を見る', + viewPatient: '患者を見る', + newPatient: '新しい患者', + }, +} diff --git a/src/locales/ptBr/translations/actions/index.ts b/src/locales/ptBr/translations/actions/index.ts new file mode 100644 index 0000000000..2ba1be9a22 --- /dev/null +++ b/src/locales/ptBr/translations/actions/index.ts @@ -0,0 +1,10 @@ +export default { + actions: { + edit: 'Editar', + save: 'Salvar', + cancel: 'Cancelar', + new: 'Novo', + list: 'Lista', + search: 'Pesquisar', + }, +} diff --git a/src/locales/ptBr/translations/dashboard/index.ts b/src/locales/ptBr/translations/dashboard/index.ts new file mode 100644 index 0000000000..58656ab06c --- /dev/null +++ b/src/locales/ptBr/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'Painel de controle', + }, +} diff --git a/src/locales/ptBr/translations/index.ts b/src/locales/ptBr/translations/index.ts new file mode 100644 index 0000000000..baca847ac0 --- /dev/null +++ b/src/locales/ptBr/translations/index.ts @@ -0,0 +1,17 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' +import scheduling from './scheduling' +import states from './states' +import sex from './sex' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, + ...scheduling, + ...states, + ...sex, +} diff --git a/src/locales/ptBr/translations/patient/index.ts b/src/locales/ptBr/translations/patient/index.ts new file mode 100644 index 0000000000..06ac59dba4 --- /dev/null +++ b/src/locales/ptBr/translations/patient/index.ts @@ -0,0 +1,43 @@ +export default { + patient: { + firstName: 'Nome', + lastName: 'Sobrenome', + suffix: 'Sufixo', + prefix: 'Prefixo', + givenName: 'Nome Próprio', + familyName: 'Nome de Familia', + dateOfBirth: 'Data de Nascimento', + approximateDateOfBirth: 'Data de Nascimento Aproximada', + age: 'Idade', + approximateAge: 'Aproximada Idade', + placeOfBirth: 'Local de Nascimento', + sex: 'Sexo', + phoneNumber: 'Numero de Telefone', + email: 'Email', + address: 'Endereço', + occupation: 'Ocupação', + type: 'Tipo de Paciente', + preferredLanguage: 'Idioma de Preferência', + basicInformation: 'Informação Basica', + generalInformation: 'Informação Geral', + contactInformation: 'Informação de Contato', + unknownDateOfBirth: 'Data de Nascimento Desconhecida', + relatedPerson: 'Pessoa Relacionada', + relatedPersons: { + error: { + relatedPersonRequired: 'Pessoa relacionada é necessária.', + relationshipTypeRequired: 'Tipo de relacionamento é necessário.', + }, + label: 'Pessoas Relacionadas', + new: 'Nova Pessoa Relacionada', + relationshipType: 'Tipo de Relacionamento', + }, + types: { + charity: 'Caridade', + private: 'Particular', + }, + errors: { + patientGivenNameRequired: 'Patient Given Name is required.', + }, + }, +} diff --git a/src/locales/ptBr/translations/patients/index.ts b/src/locales/ptBr/translations/patients/index.ts new file mode 100644 index 0000000000..c80b0e87b2 --- /dev/null +++ b/src/locales/ptBr/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: 'Pacientes', + viewPatients: 'Exibir pacientes', + viewPatient: 'Ver paciente', + newPatient: 'Novo Paciente', + }, +} diff --git a/src/locales/ptBr/translations/scheduling/index.ts b/src/locales/ptBr/translations/scheduling/index.ts new file mode 100644 index 0000000000..9ecda9cea4 --- /dev/null +++ b/src/locales/ptBr/translations/scheduling/index.ts @@ -0,0 +1,29 @@ +export default { + scheduling: { + label: 'Agendamento', + appointments: { + label: 'Agendamantos', + new: 'Novo Agendamento', + }, + appointment: { + startDate: 'Data de início', + endDate: 'Data final', + location: 'Localização', + type: 'Tipo', + types: { + checkup: 'Checkup', + emergency: 'Emergência', + followUp: 'Acompanhamento', + routine: 'Rotina', + walkIn: 'Primeira consulta', + }, + errors: { + patientRequired: 'Paciente é necessario.', + errorCreatingAppointment: 'Algo deu errado criando o agendamento.', + startDateMustBeBeforeEndDate: 'Horário de início deve ser antes do horário final.', + }, + reason: 'Razão', + patient: 'Paciente', + }, + }, +} diff --git a/src/locales/ptBr/translations/sex/index.ts b/src/locales/ptBr/translations/sex/index.ts new file mode 100644 index 0000000000..f1268c8b33 --- /dev/null +++ b/src/locales/ptBr/translations/sex/index.ts @@ -0,0 +1,8 @@ +export default { + sex: { + male: 'Masculino', + female: 'Feminino', + other: 'Outro', + unknown: 'Desconhecido', + }, +} diff --git a/src/locales/ptBr/translations/states/index.ts b/src/locales/ptBr/translations/states/index.ts new file mode 100644 index 0000000000..2012064ec3 --- /dev/null +++ b/src/locales/ptBr/translations/states/index.ts @@ -0,0 +1,6 @@ +export default { + states: { + success: 'Sucesso!', + error: 'Algo deu errado..', + }, +} diff --git a/src/locales/ru/translations/actions/index.ts b/src/locales/ru/translations/actions/index.ts new file mode 100644 index 0000000000..46aca5c9e9 --- /dev/null +++ b/src/locales/ru/translations/actions/index.ts @@ -0,0 +1,9 @@ +export default { + actions: { + edit: 'редактировать', + save: 'Сохранить', + cancel: 'Отмена', + new: 'новый', + list: 'Список', + }, +} diff --git a/src/locales/ru/translations/dashboard/index.ts b/src/locales/ru/translations/dashboard/index.ts new file mode 100644 index 0000000000..1c4b9618c8 --- /dev/null +++ b/src/locales/ru/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: 'Панель приборов', + }, +} diff --git a/src/locales/ru/translations/index.ts b/src/locales/ru/translations/index.ts new file mode 100644 index 0000000000..e948f4340c --- /dev/null +++ b/src/locales/ru/translations/index.ts @@ -0,0 +1,11 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, +} diff --git a/src/locales/ru/translations/patient/index.ts b/src/locales/ru/translations/patient/index.ts new file mode 100644 index 0000000000..0dd7e58a59 --- /dev/null +++ b/src/locales/ru/translations/patient/index.ts @@ -0,0 +1,6 @@ +export default { + patient: { + firstName: 'Имя', + lastName: 'Фамилия', + }, +} diff --git a/src/locales/ru/translations/patients/index.ts b/src/locales/ru/translations/patients/index.ts new file mode 100644 index 0000000000..5d96b8c79e --- /dev/null +++ b/src/locales/ru/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: 'Пациенты', + viewPatients: 'Просмотр пациентов', + viewPatient: 'Просмотр пациента', + newPatient: 'Новый пациент', + }, +} diff --git a/src/locales/zr/translations/actions/index.ts b/src/locales/zr/translations/actions/index.ts new file mode 100644 index 0000000000..b1d02b3139 --- /dev/null +++ b/src/locales/zr/translations/actions/index.ts @@ -0,0 +1,9 @@ +export default { + actions: { + edit: '编辑', + save: '保存', + cancel: '取消', + new: '新', + list: '清单', + }, +} diff --git a/src/locales/zr/translations/dashboard/index.ts b/src/locales/zr/translations/dashboard/index.ts new file mode 100644 index 0000000000..26862ff746 --- /dev/null +++ b/src/locales/zr/translations/dashboard/index.ts @@ -0,0 +1,5 @@ +export default { + dashboard: { + label: '仪表板', + }, +} diff --git a/src/locales/zr/translations/index.ts b/src/locales/zr/translations/index.ts new file mode 100644 index 0000000000..e948f4340c --- /dev/null +++ b/src/locales/zr/translations/index.ts @@ -0,0 +1,11 @@ +import actions from './actions' +import dashboard from './dashboard' +import patient from './patient' +import patients from './patients' + +export default { + ...actions, + ...dashboard, + ...patient, + ...patients, +} diff --git a/src/locales/zr/translations/patient/index.ts b/src/locales/zr/translations/patient/index.ts new file mode 100644 index 0000000000..bd6376e464 --- /dev/null +++ b/src/locales/zr/translations/patient/index.ts @@ -0,0 +1,6 @@ +export default { + patient: { + firstName: '名字', + lastName: '姓', + }, +} diff --git a/src/locales/zr/translations/patients/index.ts b/src/locales/zr/translations/patients/index.ts new file mode 100644 index 0000000000..3f1a814277 --- /dev/null +++ b/src/locales/zr/translations/patients/index.ts @@ -0,0 +1,8 @@ +export default { + patients: { + label: '耐心', + viewPatients: '查看患者', + viewPatient: '查看患者', + newPatient: '新病人', + }, +} diff --git a/src/scheduling/appointments/Appointments.tsx b/src/scheduling/appointments/Appointments.tsx index 6d40df2996..f152f49507 100644 --- a/src/scheduling/appointments/Appointments.tsx +++ b/src/scheduling/appointments/Appointments.tsx @@ -36,7 +36,7 @@ const Appointments = () => { icon="appointment-add" onClick={() => history.push('/appointments/new')} > - {t('scheduling.appointments.newAppointment')} + {t('scheduling.appointments.new')} , ]) useAddBreadcrumbs(breadcrumbs, true) diff --git a/src/scheduling/appointments/new/NewAppointment.tsx b/src/scheduling/appointments/new/NewAppointment.tsx index 1d87fe14c6..b0dddfc7a4 100644 --- a/src/scheduling/appointments/new/NewAppointment.tsx +++ b/src/scheduling/appointments/new/NewAppointment.tsx @@ -14,14 +14,14 @@ import AppointmentDetailForm from '../AppointmentDetailForm' const breadcrumbs = [ { i18nKey: 'scheduling.appointments.label', location: '/appointments' }, - { i18nKey: 'scheduling.appointments.newAppointment', location: '/appointments/new' }, + { i18nKey: 'scheduling.appointments.new', location: '/appointments/new' }, ] const NewAppointment = () => { const { t } = useTranslation() const history = useHistory() const dispatch = useDispatch() - useTitle(t('scheduling.appointments.newAppointment')) + useTitle(t('scheduling.appointments.new')) useAddBreadcrumbs(breadcrumbs, true) const startDateTime = roundToNearestMinutes(new Date(), { nearestTo: 15 }) const endDateTime = addMinutes(startDateTime, 60)