From 2010170e8ba3d57295147e1749bdd4545054c1c8 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Thu, 2 Apr 2020 09:58:25 +0200 Subject: [PATCH] Updated translations --- components/AuthenticatedScreen.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/AuthenticatedScreen.js b/components/AuthenticatedScreen.js index 7e71cab..361c4bf 100644 --- a/components/AuthenticatedScreen.js +++ b/components/AuthenticatedScreen.js @@ -5,6 +5,7 @@ import {View} from "react-native"; import {ActivityIndicator, withTheme} from 'react-native-paper'; import ConnectionManager, {ERROR_TYPE} from "../managers/ConnectionManager"; import NetworkErrorComponent from "./NetworkErrorComponent"; +import i18n from 'i18n-js'; type Props = { navigation: Object, @@ -101,15 +102,15 @@ class AuthenticatedScreen extends React.Component { let icon; switch (this.errorCode) { case ERROR_TYPE.BAD_CREDENTIALS: - message = "BAD_CREDENTIALS"; + message = i18n.t("loginScreen.errors.credentials"); icon = "account-alert-outline"; break; case ERROR_TYPE.CONNECTION_ERROR: - message = "CONNECTION_ERROR"; + message = i18n.t("loginScreen.errors.connection"); icon = "access-point-network-off"; break; default: - message = "UNKNOWN"; + message = i18n.t("loginScreen.errors.unknown"); icon = "alert-circle-outline"; break; }