This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1892 from HospitalRun/add-translation-resources
feat(i18n): Add translation resources
- Loading branch information
Showing
61 changed files
with
625 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default { | ||
actions: { | ||
edit: 'تصحيح', | ||
save: 'حفظ', | ||
cancel: 'إلغاء', | ||
new: 'الجديد', | ||
list: 'قائمة', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
dashboard: { | ||
label: 'لوحة القيادة', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
patient: { | ||
firstName: 'الاسم الاول', | ||
lastName: 'الكنية', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
patients: { | ||
label: 'المرضى', | ||
viewPatients: 'عرض المرضى', | ||
viewPatient: 'عرض المريض', | ||
newPatient: 'مريض جديد', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default { | ||
actions: { | ||
edit: 'Bearbeiten', | ||
save: 'speichern', | ||
cancel: 'Stornieren', | ||
new: 'Neu', | ||
list: 'Liste', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
dashboard: { | ||
label: 'Instrumententafel', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
patient: { | ||
firstName: 'Vorname', | ||
lastName: 'Nachname', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
patients: { | ||
label: 'Patienten', | ||
viewPatients: 'Patienten anzeigen', | ||
viewPatient: 'Patient anzeigen', | ||
newPatient: 'Neuer Patient', | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default { | ||
actions: { | ||
edit: 'Edit', | ||
save: 'Save', | ||
cancel: 'Cancel', | ||
new: 'New', | ||
list: 'List', | ||
search: 'Search', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
dashboard: { | ||
label: 'Dashboard', | ||
}, | ||
} |
Oops, something went wrong.
d8494d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: