From 98e26de42eebe7c4fa9c10f23c96a6a748cb6503 Mon Sep 17 00:00:00 2001 From: gustavo-em Date: Tue, 1 Mar 2022 16:29:17 -0300 Subject: [PATCH] adding translations --- react-native/app/translations/index.ts | 11 +++++++++++ react-native/app/translations/resources/en-US.ts | 12 ++++++++++++ react-native/app/translations/resources/index.ts | 11 +++++++++++ react-native/app/translations/resources/pt-BR.ts | 12 ++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 react-native/app/translations/index.ts create mode 100644 react-native/app/translations/resources/en-US.ts create mode 100644 react-native/app/translations/resources/index.ts create mode 100644 react-native/app/translations/resources/pt-BR.ts diff --git a/react-native/app/translations/index.ts b/react-native/app/translations/index.ts new file mode 100644 index 0000000..b22fce0 --- /dev/null +++ b/react-native/app/translations/index.ts @@ -0,0 +1,11 @@ +import i18next from 'i18next' +import RNLanguages from 'react-native-languages'; +import resources from './resources'; + +export const initTranslation = ()=>{ + i18next.init({ + compatibilityJSON: 'v3', + lng: RNLanguages.language, + resources: resources + }) +} \ No newline at end of file diff --git a/react-native/app/translations/resources/en-US.ts b/react-native/app/translations/resources/en-US.ts new file mode 100644 index 0000000..4ed94fd --- /dev/null +++ b/react-native/app/translations/resources/en-US.ts @@ -0,0 +1,12 @@ +export default { + "mobileApp.portals.list.empty.label": "There aren't portals.", + "mobileApp.portals.list.add.button.label": "New Portal", + "mobileApp.portals.fields.name.label": "Portal Name", + "mobileApp.portals.fields.name.placeholder": "BigBlueButton demo", + "mobileApp.portals.fields.url.label": "Server URL", + "mobileApp.portals.fields.url.placeholder": "https://demo.bigbluebutton.org", + "mobileApp.portals.addPortalPopup.confirm.button.label": "Add Portal", + "mobileApp.portals.drawerNavigation.button.label": "Portals", + "mobileApp.portals.addPortalPopup.validation.emptyFilds": "Empty Fields", + "mobileApp.portals.addPortalPopup.validation.portalNameAlreadyExists": "Name Already Exists" +} \ No newline at end of file diff --git a/react-native/app/translations/resources/index.ts b/react-native/app/translations/resources/index.ts new file mode 100644 index 0000000..a797dc2 --- /dev/null +++ b/react-native/app/translations/resources/index.ts @@ -0,0 +1,11 @@ +import enUS from "./en-US"; +import ptBR from "./pt-BR"; + +export default { + 'en-US': { + translation: enUS + }, + 'pt-BR': { + translation: ptBR + } +} diff --git a/react-native/app/translations/resources/pt-BR.ts b/react-native/app/translations/resources/pt-BR.ts new file mode 100644 index 0000000..c3f95ad --- /dev/null +++ b/react-native/app/translations/resources/pt-BR.ts @@ -0,0 +1,12 @@ +export default { + "mobileApp.portals.list.empty.label": "Não há portais.", + "mobileApp.portals.list.add.button.label": "Novo Portal", + "mobileApp.portals.fields.name.label": "Nome do Portal", + "mobileApp.portals.fields.name.placeholder": "BigBlueButton demo", + "mobileApp.portals.fields.url.label": "URL do Servidor", + "mobileApp.portals.fields.url.placeholder": "https://demo.bigbluebutton.org", + "mobileApp.portals.addPortalPopup.confirm.button.label": "Adicionar Portal", + "mobileApp.portals.drawerNavigation.button.label": "Portais", + "mobileApp.portals.addPortalPopup.validation.emptyFilds": "Campos Vazios", + "mobileApp.portals.addPortalPopup.validation.portalNameAlreadyExists": "Nome Já Existe" +} \ No newline at end of file