Browse Source

Improved translation

Arnaud Vergnet 1 year ago
parent
commit
6ac459e58a

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

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

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

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

+ 3
- 3
translations/en.json View File

@@ -181,9 +181,9 @@
181 181
       "cancel": "Cancel",
182 182
       "finished": "This machine is finished. If you started it, you can get back your laundry.",
183 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 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 187
       "error": "There has been an error and we are unable to get information from this machine. Sorry for the inconvenience.",
188 188
       "unknown": "This machine is in an unknown state. Sorry for the inconvenience.",
189 189
       "notificationErrorTitle": "Error",
@@ -194,7 +194,7 @@
194 194
       "ready": "READY",
195 195
       "running": "RUNNING",
196 196
       "runningNotStarted": "NOT STARTED",
197
-      "broken": "BROKEN",
197
+      "broken": "OUT OF ORDER",
198 198
       "error": "ERROR",
199 199
       "unknown": "UNKNOWN"
200 200
     },

+ 1
- 1
translations/fr.json View File

@@ -181,7 +181,7 @@
181 181
       "cancel": "Annuler",
182 182
       "finished": "Cette machine est terminée. Si vous l'avez démarrée, vous pouvez récupérer votre linge.",
183 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 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 186
       "broken": "Cette machine est hors service. Merci pour votre compréhension.",
187 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