Updated translations

This commit is contained in:
Arnaud Vergnet 2020-04-02 09:58:25 +02:00
parent 4bc6ae07b5
commit 2010170e8b

View file

@ -5,6 +5,7 @@ import {View} from "react-native";
import {ActivityIndicator, withTheme} from 'react-native-paper'; import {ActivityIndicator, withTheme} from 'react-native-paper';
import ConnectionManager, {ERROR_TYPE} from "../managers/ConnectionManager"; import ConnectionManager, {ERROR_TYPE} from "../managers/ConnectionManager";
import NetworkErrorComponent from "./NetworkErrorComponent"; import NetworkErrorComponent from "./NetworkErrorComponent";
import i18n from 'i18n-js';
type Props = { type Props = {
navigation: Object, navigation: Object,
@ -101,15 +102,15 @@ class AuthenticatedScreen extends React.Component<Props, State> {
let icon; let icon;
switch (this.errorCode) { switch (this.errorCode) {
case ERROR_TYPE.BAD_CREDENTIALS: case ERROR_TYPE.BAD_CREDENTIALS:
message = "BAD_CREDENTIALS"; message = i18n.t("loginScreen.errors.credentials");
icon = "account-alert-outline"; icon = "account-alert-outline";
break; break;
case ERROR_TYPE.CONNECTION_ERROR: case ERROR_TYPE.CONNECTION_ERROR:
message = "CONNECTION_ERROR"; message = i18n.t("loginScreen.errors.connection");
icon = "access-point-network-off"; icon = "access-point-network-off";
break; break;
default: default:
message = "UNKNOWN"; message = i18n.t("loginScreen.errors.unknown");
icon = "alert-circle-outline"; icon = "alert-circle-outline";
break; break;
} }