Browse Source

Improved translation

Arnaud Vergnet 3 years ago
parent
commit
6ac459e58a

+ 11
- 3
src/components/Lists/Proxiwash/ProxiwashListItem.js View File

1
 import * as React from 'react';
1
 import * as React from 'react';
2
-import {Avatar, List, ProgressBar, Surface, Text, withTheme} from 'react-native-paper';
2
+import {Avatar, Caption, List, ProgressBar, Surface, Text, withTheme} from 'react-native-paper';
3
 import {StyleSheet, View} from "react-native";
3
 import {StyleSheet, View} from "react-native";
4
 import ProxiwashConstants from "../../../constants/ProxiwashConstants";
4
 import ProxiwashConstants from "../../../constants/ProxiwashConstants";
5
 import i18n from "i18n-js";
5
 import i18n from "i18n-js";
6
 import AprilFoolsManager from "../../../managers/AprilFoolsManager";
6
 import AprilFoolsManager from "../../../managers/AprilFoolsManager";
7
 import * as Animatable from "react-native-animatable";
7
 import * as Animatable from "react-native-animatable";
8
 import type {CustomTheme} from "../../../managers/ThemeManager";
8
 import type {CustomTheme} from "../../../managers/ThemeManager";
9
+import type {Machine} from "../../../screens/Proxiwash/ProxiwashScreen";
9
 
10
 
10
 type Props = {
11
 type Props = {
11
-    item: Object,
12
+    item: Machine,
12
     theme: CustomTheme,
13
     theme: CustomTheme,
13
     onPress: Function,
14
     onPress: Function,
14
     isWatched: boolean,
15
     isWatched: boolean,
147
                             <View style={{justifyContent: 'center',}}>
148
                             <View style={{justifyContent: 'center',}}>
148
                                 <Text style={
149
                                 <Text style={
149
                                     machineState === ProxiwashConstants.machineStates.FINISHED ?
150
                                     machineState === ProxiwashConstants.machineStates.FINISHED ?
150
-                                        {fontWeight: 'bold',} : {}}
151
+                                        {fontWeight: 'bold',} : {}
152
+                                }
151
                                 >
153
                                 >
152
                                     {stateString}
154
                                     {stateString}
153
                                 </Text>
155
                                 </Text>
156
+                                {
157
+                                    machineState === ProxiwashConstants.machineStates.RUNNING
158
+                                        ? <Caption>{props.item.remainingTime} min</Caption>
159
+                                        : null
160
+                                }
161
+
154
                             </View>
162
                             </View>
155
                             <View style={{justifyContent: 'center',}}>
163
                             <View style={{justifyContent: 'center',}}>
156
                                 <Avatar.Icon
164
                                 <Avatar.Icon

+ 3
- 2
src/screens/Proxiwash/ProxiwashScreen.js View File

261
      * @param isDryer True if the given item is a dryer
261
      * @param isDryer True if the given item is a dryer
262
      * @return {*}
262
      * @return {*}
263
      */
263
      */
264
-    getModalContent(title: string, item: Object, isDryer: boolean) {
264
+    getModalContent(title: string, item: Machine, isDryer: boolean) {
265
         let button = {
265
         let button = {
266
             text: i18n.t("proxiwashScreen.modal.ok"),
266
             text: i18n.t("proxiwashScreen.modal.ok"),
267
             icon: '',
267
             icon: '',
287
                 {
287
                 {
288
                     start: item.startTime,
288
                     start: item.startTime,
289
                     end: item.endTime,
289
                     end: item.endTime,
290
-                    remaining: remainingTime
290
+                    remaining: remainingTime,
291
+                    program: item.program
291
                 });
292
                 });
292
         } else if (item.state === ProxiwashConstants.machineStates.AVAILABLE) {
293
         } else if (item.state === ProxiwashConstants.machineStates.AVAILABLE) {
293
             if (isDryer)
294
             if (isDryer)

+ 3
- 3
translations/en.json View File

181
       "cancel": "Cancel",
181
       "cancel": "Cancel",
182
       "finished": "This machine is finished. If you started it, you can get back your laundry.",
182
       "finished": "This machine is finished. If you started it, you can get back your laundry.",
183
       "ready": "This machine is empty and ready to use.",
183
       "ready": "This machine is empty and ready to use.",
184
-      "running": "This machine has been started at %{start} and will end at %{end}.\nRemaining time: %{remaining} min",
184
+      "running": "This machine has been started at %{start} and will end at %{end}.\n\nRemaining time: %{remaining} min.\nProgram: %{program}",
185
       "runningNotStarted": "This machine is ready but not started. Please make sure you pressed the start button.",
185
       "runningNotStarted": "This machine is ready but not started. Please make sure you pressed the start button.",
186
-      "broken": "This machine is broken and cannot be used. Thank you for your comprehension.",
186
+      "broken": "This machine is out of order and cannot be used. Thank you for your comprehension.",
187
       "error": "There has been an error and we are unable to get information from this machine. Sorry for the inconvenience.",
187
       "error": "There has been an error and we are unable to get information from this machine. Sorry for the inconvenience.",
188
       "unknown": "This machine is in an unknown state. Sorry for the inconvenience.",
188
       "unknown": "This machine is in an unknown state. Sorry for the inconvenience.",
189
       "notificationErrorTitle": "Error",
189
       "notificationErrorTitle": "Error",
194
       "ready": "READY",
194
       "ready": "READY",
195
       "running": "RUNNING",
195
       "running": "RUNNING",
196
       "runningNotStarted": "NOT STARTED",
196
       "runningNotStarted": "NOT STARTED",
197
-      "broken": "BROKEN",
197
+      "broken": "OUT OF ORDER",
198
       "error": "ERROR",
198
       "error": "ERROR",
199
       "unknown": "UNKNOWN"
199
       "unknown": "UNKNOWN"
200
     },
200
     },

+ 1
- 1
translations/fr.json View File

181
       "cancel": "Annuler",
181
       "cancel": "Annuler",
182
       "finished": "Cette machine est terminée. Si vous l'avez démarrée, vous pouvez récupérer votre linge.",
182
       "finished": "Cette machine est terminée. Si vous l'avez démarrée, vous pouvez récupérer votre linge.",
183
       "ready": "Cette machine est vide et prête à être utilisée.",
183
       "ready": "Cette machine est vide et prête à être utilisée.",
184
-      "running": "Cette machine a démarré à %{start} et terminera à %{end}.\nTemps restant : %{remaining} min",
184
+      "running": "Cette machine a démarré à %{start} et terminera à %{end}.\n\nTemps restant : %{remaining} min.\nProgramme: %{program}",
185
       "runningNotStarted": "Cette machine est prête mais n'est pas démarrée. Assurez vous de bien avoir appuyé sur le bouton start.",
185
       "runningNotStarted": "Cette machine est prête mais n'est pas démarrée. Assurez vous de bien avoir appuyé sur le bouton start.",
186
       "broken": "Cette machine est hors service. Merci pour votre compréhension.",
186
       "broken": "Cette machine est hors service. Merci pour votre compréhension.",
187
       "error": "Il y a eu une erreur et il est impossible de récupérer les informations de cette machine. Veuillez nous excuser pour le gène occasionnée.",
187
       "error": "Il y a eu une erreur et il est impossible de récupérer les informations de cette machine. Veuillez nous excuser pour le gène occasionnée.",

Loading…
Cancel
Save