Update install langs + Sentry on install

This commit is contained in:
Vincent BRIDIER 2023-01-04 15:09:56 +01:00
parent a2b5fff2d2
commit d6936df2f5
No known key found for this signature in database
GPG key ID: 8571BFA20420D512
4 changed files with 25 additions and 17 deletions

View file

@ -116,6 +116,7 @@ class HomeScreen extends React.Component {
}
openFolder(id) {
this.props.initDocuments(this.props.locale, this.props.directories.global);
const folder = this.props.directories.treeview.filter(tmp => tmp.id === id);
this.props.navigation.navigate('DirectoriesScreen', { folder: folder });
}

View file

@ -2,6 +2,8 @@ import React from 'react';
import { ImageBackground, View, Image, Text, TextInput, Button, Alert } from 'react-native';
// Redux
import { connect } from 'react-redux';
// Sentry
import * as Sentry from "@sentry/react-native";
// SplashScreen
import * as SplashScreen from 'expo-splash-screen';
// Helpers
@ -24,7 +26,8 @@ import * as FileSystem from 'expo-file-system';
function mapStateToProps(state) {
return {
isSetup: state.app.isSetup
isSetup: state.app.isSetup,
locale: state.locale.locale,
};
}
@ -46,6 +49,7 @@ class InstallScreen extends React.Component {
}
render() {
i18n.locale = this.props.locale;
return (
<ImageBackground source={require('../../Resources/assets/img/background_ldc.png')} style={commonStyles.background}>
<View style={styles.container}>
@ -133,11 +137,14 @@ class InstallScreen extends React.Component {
}
}
}).catch(function (error) {
console.log(error)
Sentry.captureException(error);
Alert.alert(i18n.t("alert.error"), i18n.t("error.error_has_occurred"));
return false;
});
if (!toDL) {
this.setState({ processing: false, txtStep: "" });
return false;
}
for await (const file of toDL) {
await FileSystem.downloadAsync(
file.source,

View file

@ -1,13 +1,13 @@
{
"install": {
"installation": "Installation",
"install": "Installer",
"enter_url": "Veuillez entrer le lien de votre back-office",
"url_invalid": "Le lien saisi est invalide.",
"resource_dl_error": "Une erreur est survenue lors du téléchargement de la ressource suivante : ",
"install_complete": "Installation terminée !",
"get_app_setting": "Récupération de la configuration de l'application",
"get_content_setting": "Récupération de la configuration du contenu de l'application"
"install": "Installieren Sie",
"enter_url": "Bitte geben Sie den Link zu Ihrem Backoffice ein",
"url_invalid": "Der eingegebene Link ist ungültig.",
"resource_dl_error": "Beim Herunterladen der folgenden Lerneinheit ist ein Fehler aufgetreten: ",
"install_complete": "Installation abgeschlossen!",
"get_app_setting": "Wiederherstellen der Konfiguration der Anwendung",
"get_content_setting": "Abrufen der Konfiguration des Inhalts der Anwendung"
},
"global": {
"change_lang": "Sprache wechseln",

View file

@ -1,13 +1,13 @@
{
"install": {
"installation": "Installation",
"install": "Installer",
"enter_url": "Veuillez entrer le lien de votre back-office",
"url_invalid": "Le lien saisi est invalide.",
"resource_dl_error": "Une erreur est survenue lors du téléchargement de la ressource suivante : ",
"install_complete": "Installation terminée !",
"get_app_setting": "Récupération de la configuration de l'application",
"get_content_setting": "Récupération de la configuration du contenu de l'application"
"install": "Install",
"enter_url": "Please enter your back office link",
"url_invalid": "The link you entered is invalid.",
"resource_dl_error": "An error occurred while downloading the following resource: ",
"install_complete": "Installation is complete!",
"get_app_setting": "Retrieving the application's configuration",
"get_content_setting": "Retrieving the configuration of the application content"
},
"global": {
"change_lang": "Change language",