diff --git a/src/components/Lists/Proxiwash/ProxiwashListItem.js b/src/components/Lists/Proxiwash/ProxiwashListItem.js index 394e537..8ff87a0 100644 --- a/src/components/Lists/Proxiwash/ProxiwashListItem.js +++ b/src/components/Lists/Proxiwash/ProxiwashListItem.js @@ -1,14 +1,15 @@ import * as React from 'react'; -import {Avatar, List, ProgressBar, Surface, Text, withTheme} from 'react-native-paper'; +import {Avatar, Caption, List, ProgressBar, Surface, Text, withTheme} from 'react-native-paper'; import {StyleSheet, View} from "react-native"; import ProxiwashConstants from "../../../constants/ProxiwashConstants"; import i18n from "i18n-js"; import AprilFoolsManager from "../../../managers/AprilFoolsManager"; import * as Animatable from "react-native-animatable"; import type {CustomTheme} from "../../../managers/ThemeManager"; +import type {Machine} from "../../../screens/Proxiwash/ProxiwashScreen"; type Props = { - item: Object, + item: Machine, theme: CustomTheme, onPress: Function, isWatched: boolean, @@ -147,10 +148,17 @@ class ProxiwashListItem extends React.Component { {stateString} + { + machineState === ProxiwashConstants.machineStates.RUNNING + ? {props.item.remainingTime} min + : null + } + { * @param isDryer True if the given item is a dryer * @return {*} */ - getModalContent(title: string, item: Object, isDryer: boolean) { + getModalContent(title: string, item: Machine, isDryer: boolean) { let button = { text: i18n.t("proxiwashScreen.modal.ok"), icon: '', @@ -287,7 +287,8 @@ class ProxiwashScreen extends React.Component { { start: item.startTime, end: item.endTime, - remaining: remainingTime + remaining: remainingTime, + program: item.program }); } else if (item.state === ProxiwashConstants.machineStates.AVAILABLE) { if (isDryer) diff --git a/translations/en.json b/translations/en.json index 473a347..3ef4104 100644 --- a/translations/en.json +++ b/translations/en.json @@ -181,9 +181,9 @@ "cancel": "Cancel", "finished": "This machine is finished. If you started it, you can get back your laundry.", "ready": "This machine is empty and ready to use.", - "running": "This machine has been started at %{start} and will end at %{end}.\nRemaining time: %{remaining} min", + "running": "This machine has been started at %{start} and will end at %{end}.\n\nRemaining time: %{remaining} min.\nProgram: %{program}", "runningNotStarted": "This machine is ready but not started. Please make sure you pressed the start button.", - "broken": "This machine is broken and cannot be used. Thank you for your comprehension.", + "broken": "This machine is out of order and cannot be used. Thank you for your comprehension.", "error": "There has been an error and we are unable to get information from this machine. Sorry for the inconvenience.", "unknown": "This machine is in an unknown state. Sorry for the inconvenience.", "notificationErrorTitle": "Error", @@ -194,7 +194,7 @@ "ready": "READY", "running": "RUNNING", "runningNotStarted": "NOT STARTED", - "broken": "BROKEN", + "broken": "OUT OF ORDER", "error": "ERROR", "unknown": "UNKNOWN" }, diff --git a/translations/fr.json b/translations/fr.json index b17d12b..76c6a33 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -181,7 +181,7 @@ "cancel": "Annuler", "finished": "Cette machine est terminée. Si vous l'avez démarrée, vous pouvez récupérer votre linge.", "ready": "Cette machine est vide et prête à être utilisée.", - "running": "Cette machine a démarré à %{start} et terminera à %{end}.\nTemps restant : %{remaining} min", + "running": "Cette machine a démarré à %{start} et terminera à %{end}.\n\nTemps restant : %{remaining} min.\nProgramme: %{program}", "runningNotStarted": "Cette machine est prête mais n'est pas démarrée. Assurez vous de bien avoir appuyé sur le bouton start.", "broken": "Cette machine est hors service. Merci pour votre compréhension.", "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.",