Improved translation

This commit is contained in:
Arnaud Vergnet 2020-06-25 15:40:00 +02:00
parent 23bc034b34
commit 6ac459e58a
4 changed files with 18 additions and 9 deletions

View file

@ -1,14 +1,15 @@
import * as React from 'react'; 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 {StyleSheet, View} from "react-native";
import ProxiwashConstants from "../../../constants/ProxiwashConstants"; import ProxiwashConstants from "../../../constants/ProxiwashConstants";
import i18n from "i18n-js"; import i18n from "i18n-js";
import AprilFoolsManager from "../../../managers/AprilFoolsManager"; import AprilFoolsManager from "../../../managers/AprilFoolsManager";
import * as Animatable from "react-native-animatable"; import * as Animatable from "react-native-animatable";
import type {CustomTheme} from "../../../managers/ThemeManager"; import type {CustomTheme} from "../../../managers/ThemeManager";
import type {Machine} from "../../../screens/Proxiwash/ProxiwashScreen";
type Props = { type Props = {
item: Object, item: Machine,
theme: CustomTheme, theme: CustomTheme,
onPress: Function, onPress: Function,
isWatched: boolean, isWatched: boolean,
@ -147,10 +148,17 @@ class ProxiwashListItem extends React.Component<Props> {
<View style={{justifyContent: 'center',}}> <View style={{justifyContent: 'center',}}>
<Text style={ <Text style={
machineState === ProxiwashConstants.machineStates.FINISHED ? machineState === ProxiwashConstants.machineStates.FINISHED ?
{fontWeight: 'bold',} : {}} {fontWeight: 'bold',} : {}
}
> >
{stateString} {stateString}
</Text> </Text>
{
machineState === ProxiwashConstants.machineStates.RUNNING
? <Caption>{props.item.remainingTime} min</Caption>
: null
}
</View> </View>
<View style={{justifyContent: 'center',}}> <View style={{justifyContent: 'center',}}>
<Avatar.Icon <Avatar.Icon

View file

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

View file

@ -181,9 +181,9 @@
"cancel": "Cancel", "cancel": "Cancel",
"finished": "This machine is finished. If you started it, you can get back your laundry.", "finished": "This machine is finished. If you started it, you can get back your laundry.",
"ready": "This machine is empty and ready to use.", "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.", "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.", "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.", "unknown": "This machine is in an unknown state. Sorry for the inconvenience.",
"notificationErrorTitle": "Error", "notificationErrorTitle": "Error",
@ -194,7 +194,7 @@
"ready": "READY", "ready": "READY",
"running": "RUNNING", "running": "RUNNING",
"runningNotStarted": "NOT STARTED", "runningNotStarted": "NOT STARTED",
"broken": "BROKEN", "broken": "OUT OF ORDER",
"error": "ERROR", "error": "ERROR",
"unknown": "UNKNOWN" "unknown": "UNKNOWN"
}, },

View file

@ -181,7 +181,7 @@
"cancel": "Annuler", "cancel": "Annuler",
"finished": "Cette machine est terminée. Si vous l'avez démarrée, vous pouvez récupérer votre linge.", "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.", "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.", "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.", "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.", "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.",