From b625ac72552a61522c5cb4de1ddfdbee5090edab Mon Sep 17 00:00:00 2001 From: keplyx Date: Sun, 8 Mar 2020 12:17:04 +0100 Subject: [PATCH] Updated translations --- components/Sidebar.js | 4 ++-- navigation/DrawerNavigator.js | 15 ++++++++------- translations/en.json | 1 + translations/fr.json | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/components/Sidebar.js b/components/Sidebar.js index 8cf54bd..d6805c8 100644 --- a/components/Sidebar.js +++ b/components/Sidebar.js @@ -41,7 +41,7 @@ export default class SideBar extends React.Component { // Dataset used to render the drawer this.dataSet = [ { - name: "Home", + name: i18n.t('screens.home'), route: "Main", icon: "home", }, @@ -60,7 +60,7 @@ export default class SideBar extends React.Component { icon: "calendar-check", }, { - name: 'Bib', + name: i18n.t('screens.bib'), route: "BibScreen", icon: "book", }, diff --git a/navigation/DrawerNavigator.js b/navigation/DrawerNavigator.js index 2d7c698..3b7a56b 100644 --- a/navigation/DrawerNavigator.js +++ b/navigation/DrawerNavigator.js @@ -13,6 +13,7 @@ import DebugScreen from '../screens/DebugScreen'; import Sidebar from "../components/Sidebar"; import {createStackNavigator, TransitionPresets} from "@react-navigation/stack"; import HeaderButton from "../components/HeaderButton"; +import i18n from "i18n-js"; const defaultScreenOptions = { gestureEnabled: true, @@ -41,7 +42,7 @@ function AboutStackComponent() { options={({navigation}) => { const openDrawer = getDrawerButton.bind(this, navigation); return { - title: 'About', + title: i18n.t('screens.about'), headerLeft: openDrawer }; }} @@ -50,14 +51,14 @@ function AboutStackComponent() { name="AboutDependenciesScreen" component={AboutDependenciesScreen} options={{ - title: 'Dependencies' + title: i18n.t('aboutScreen.libs') }} /> @@ -79,7 +80,7 @@ function SettingsStackComponent() { options={({navigation}) => { const openDrawer = getDrawerButton.bind(this, navigation); return { - title: 'Settings', + title: i18n.t('screens.settings'), headerLeft: openDrawer }; }} @@ -103,7 +104,7 @@ function SelfMenuStackComponent() { options={({navigation}) => { const openDrawer = getDrawerButton.bind(this, navigation); return { - title: 'Menu RU', + title: i18n.t('screens.menuSelf'), headerLeft: openDrawer }; }} @@ -127,7 +128,7 @@ function AvailableRoomStackComponent() { options={({navigation}) => { const openDrawer = getDrawerButton.bind(this, navigation); return { - title: 'Available Rooms', + title: i18n.t('screens.availableRooms'), headerLeft: openDrawer }; }} @@ -151,7 +152,7 @@ function BibStackComponent() { options={({navigation}) => { const openDrawer = getDrawerButton.bind(this, navigation); return { - title: 'Bib', + title: i18n.t('screens.bib'), headerLeft: openDrawer }; }} diff --git a/translations/en.json b/translations/en.json index 24ab416..19eb9e0 100644 --- a/translations/en.json +++ b/translations/en.json @@ -8,6 +8,7 @@ "menuSelf": "RU Menu", "settings": "Settings", "availableRooms": "Available rooms", + "bib": "Bib'Box", "bluemind": "INSA Mails", "ent": "INSA ENT", "about": "About", diff --git a/translations/fr.json b/translations/fr.json index bc2771c..7da6def 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -8,6 +8,7 @@ "menuSelf": "Menu du RU", "settings": "Paramètres", "availableRooms": "Salles dispo", + "bib": "Bib'Box", "bluemind": "Mails INSA", "ent": "ENT INSA", "about": "À Propos",