Browse Source

Improved translations

keplyx 4 years ago
parent
commit
6dfb8e0c38

+ 7
- 4
components/DashboardItem.js View File

@@ -8,6 +8,7 @@ import ThemeManager from "../utils/ThemeManager";
8 8
 import HTML from "react-native-render-html";
9 9
 import {LinearGradient} from "expo-linear-gradient";
10 10
 import PlatformTouchable from "react-native-platform-touchable";
11
+import i18n from "i18n-js";
11 12
 
12 13
 const CARD_BORDER_RADIUS = 10;
13 14
 
@@ -101,12 +102,14 @@ export default class DashboardItem extends React.Component<Props> {
101 102
                                   }}/>
102 103
                             <LinearGradient
103 104
                                 colors={['transparent', ThemeManager.getCurrentThemeVariables().cardDefaultBg]}
104
-                                end={[0, 0.6]}
105
+                                start={{x: 0, y: 0}}
106
+                                end={{x: 0, y: 0.6}}
107
+                                // end={[0, 0.6]}
105 108
                                 style={{
106 109
                                     position: 'absolute',
107 110
                                     width: '100%',
108
-                                    height: 60,
109
-                                    bottom: 0,
111
+                                    height: 65,
112
+                                    bottom: -5,
110 113
                                 }}>
111 114
                                 <View style={{
112 115
                                     marginLeft: 'auto',
@@ -118,7 +121,7 @@ export default class DashboardItem extends React.Component<Props> {
118 121
                                         marginBottom: 'auto',
119 122
                                         padding: 0,
120 123
                                     }}>
121
-                                        Click to see more
124
+                                        {i18n.t("homeScreen.dashboard.seeMore")}
122 125
                                     </Text>
123 126
                                     <CustomMaterialIcon icon={'chevron-right'}/>
124 127
                                 </View>

+ 1
- 1
components/Sidebar.js View File

@@ -56,7 +56,7 @@ export default class SideBar extends React.Component<Props, State> {
56 56
                 icon: "school",
57 57
             },
58 58
             {
59
-                name: "Salles dispo",
59
+                name: i18n.t('screens.availableRooms'),
60 60
                 route: "AvailableRoomScreen",
61 61
                 icon: "calendar-check",
62 62
             },

+ 2
- 2
screens/AvailableRoomScreen.js View File

@@ -1,8 +1,8 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from 'react';
4
-import ThemeManager from "../utils/ThemeManager";
5 4
 import WebViewScreen from "../components/WebViewScreen";
5
+import i18n from "i18n-js";
6 6
 
7 7
 type Props = {
8 8
     navigation: Object,
@@ -31,7 +31,7 @@ export default class AvailableRoomScreen extends React.Component<Props> {
31 31
                 navigation={nav}
32 32
                 url={URL}
33 33
                 customInjectedJS={this.customInjectedJS}
34
-                headerTitle={'SAlles dispo'}
34
+                headerTitle={i18n.t('screens.availableRooms')}
35 35
                 hasHeaderBackButton={true}
36 36
                 hasSideMenu={false}/>
37 37
         );

+ 3
- 3
screens/HomeScreen.js View File

@@ -9,7 +9,7 @@ import FetchedDataSectionList from "../components/FetchedDataSectionList";
9 9
 import Autolink from 'react-native-autolink';
10 10
 import ThemeManager from "../utils/ThemeManager";
11 11
 import DashboardItem from "../components/DashboardItem";
12
-import DATA from "../dashboard_data.json";
12
+// import DATA from "../dashboard_data.json";
13 13
 
14 14
 
15 15
 const ICON_AMICALE = require('../assets/amicale.png');
@@ -39,7 +39,7 @@ function openWebLink(link) {
39 39
 export default class HomeScreen extends FetchedDataSectionList {
40 40
 
41 41
     constructor() {
42
-        super('DATA_URL', REFRESH_TIME);
42
+        super(DATA_URL, REFRESH_TIME);
43 43
     }
44 44
 
45 45
     getHeaderTranslation() {
@@ -55,7 +55,7 @@ export default class HomeScreen extends FetchedDataSectionList {
55 55
     }
56 56
 
57 57
     createDataset(fetchedData: Object) {
58
-        fetchedData = DATA;
58
+        // fetchedData = DATA;
59 59
         let newsData = [];
60 60
         let dashboardData = [];
61 61
         if (fetchedData['news_feed'] !== undefined)

+ 2
- 0
translations/en.json View File

@@ -6,6 +6,7 @@
6 6
     "proximo": "Proximo",
7 7
     "menuSelf": "RU Menu",
8 8
     "settings": "Settings",
9
+    "availableRooms": "Available rooms",
9 10
     "about": "About",
10 11
     "debug": "Debug"
11 12
   },
@@ -72,6 +73,7 @@
72 73
     "listUpdateFail": "Error while updating list",
73 74
     "newsFeed": "Campus News",
74 75
     "dashboard": {
76
+      "seeMore": "Click to see more",
75 77
       "todayEventsTitle": "Today's events",
76 78
       "todayEventsSubtitleNA": "No events today",
77 79
       "todayEventsSubtitle": " event coming today",

+ 2
- 0
translations/fr.json View File

@@ -6,6 +6,7 @@
6 6
     "proximo": "Proximo",
7 7
     "menuSelf": "Menu du RU",
8 8
     "settings": "Paramètres",
9
+    "availableRooms": "Salles dispo",
9 10
     "about": "À Propos",
10 11
     "debug": "Debug"
11 12
   },
@@ -72,6 +73,7 @@
72 73
     "listUpdateFail": "Erreur lors de la mise à jour de la liste",
73 74
     "newsFeed": "Nouvelles du campus",
74 75
     "dashboard": {
76
+      "seeMore": "Cliquez pour plus d'infos",
75 77
       "todayEventsTitle": "Événements aujourd'hui",
76 78
       "todayEventsSubtitleNA": "Pas d'événements",
77 79
       "todayEventsSubtitle": " événement aujourd'hui",

Loading…
Cancel
Save