forked from vergnet/application-amicale
Improve translation and start/feedback screen
This commit is contained in:
parent
12c0a76667
commit
5a98f5506a
3 changed files with 136 additions and 103 deletions
|
@ -354,15 +354,15 @@
|
||||||
"libs": "Libraries used"
|
"libs": "Libraries used"
|
||||||
},
|
},
|
||||||
"feedback": {
|
"feedback": {
|
||||||
"title": "Feedback",
|
"title": "Contribute",
|
||||||
"bugs": "Report Bugs",
|
"feedback": "Contact the dev",
|
||||||
"bugsSubtitle": "Did you find a bug? Let us know!",
|
"feedbackSubtitle": "A student like you!",
|
||||||
"bugsDescription": "Reporting bugs helps us make the app better. To do so, use one of the buttons below and be as precise as possible when describing your problem!",
|
"feedbackDescription": "Feedback or bugs, you are always welcome.\nChoose your preferred way from the buttons bellow.",
|
||||||
"feedbackSubtitle": "Let us know what you think!",
|
"contribute": "Contribute to the project",
|
||||||
"feedbackDescription": "Do you have a feature you want to be added/changed/removed, want to give your opinion on the app or simply chat with the dev? Use one of the links below!",
|
"contributeSubtitle": "With a possible \"implication citoyenne\"!",
|
||||||
"contactMeans": "Using Gitea is recommended, to use it simply login with your INSA account.",
|
"contributeDescription": "Everyone can help: communication, design or coding! You are free to contribute as you like.\nYou can find bellow a link to Trello for project organization, and a link to the source code on GitEtud.",
|
||||||
"homeButtonTitle": "Feedback/Bug report",
|
"homeButtonTitle": "Contribute to the project",
|
||||||
"homeButtonSubtitle": "Contact the devs"
|
"homeButtonSubtitle": "Your help is important"
|
||||||
},
|
},
|
||||||
"game": {
|
"game": {
|
||||||
"title": "So Awesome Game",
|
"title": "So Awesome Game",
|
||||||
|
@ -413,16 +413,16 @@
|
||||||
"text": "You can do much more with CAMPUS, but I can't explain everything here. Explore the app to find out!"
|
"text": "You can do much more with CAMPUS, but I can't explain everything here. Explore the app to find out!"
|
||||||
},
|
},
|
||||||
"slideDone": {
|
"slideDone": {
|
||||||
"title": "Your feedback is valuable!",
|
"title": "Contribute to the project!",
|
||||||
"text": "This app is the work of one student (with some help here and there), so your feedback is much appreciated!"
|
"text": "This app is the work of one student, so your feedback and your help are welcome!\nEveryone can help: communication, design or coding!"
|
||||||
},
|
},
|
||||||
"updateSlide0": {
|
"updateSlide0": {
|
||||||
"title": "New in this update!",
|
"title": "Hi you!",
|
||||||
"text": "Hello you! I'm here to help you around the app."
|
"text": "I'm new here and I will help you around the app. My thing is to give you lots of tips and tricks."
|
||||||
},
|
},
|
||||||
"updateSlide1": {
|
"updateSlide1": {
|
||||||
"title": "Contribute!",
|
"title": "Contribute to the project!",
|
||||||
"text": "Everyone is free to contribute to the project, from reporting bugs to implementing new features"
|
"text": "This app is the work of one student, so your feedback and your help are welcome!\nEveryone can help: communication, design or coding!"
|
||||||
},
|
},
|
||||||
"aprilFoolsSlide": {
|
"aprilFoolsSlide": {
|
||||||
"title": "New in this update!",
|
"title": "New in this update!",
|
||||||
|
|
|
@ -353,15 +353,15 @@
|
||||||
"libs": "Librairies utilisées"
|
"libs": "Librairies utilisées"
|
||||||
},
|
},
|
||||||
"feedback": {
|
"feedback": {
|
||||||
"title": "Feedback",
|
"title": "Participer",
|
||||||
"bugs": "Rapporter des Bugs",
|
"feedback": "Contacte le développeur",
|
||||||
"bugsSubtitle": "Tu as trouvé un bug ?",
|
"feedbackSubtitle": "C'est un étudiant comme toi !",
|
||||||
"bugsDescription": "Rapporter les bugs m'aide à améliorer l'appli. Pour cela, merci d'utiliser un des boutons ci-dessous et de décrire ton problème le plus précisément possible !",
|
"feedbackDescription": "Que ce soit pour donner ton avis ou rapporter des bugs, tu es le bienvenue.\nUtilise le moyen de ton choix parmi les boutons ci-dessous.",
|
||||||
"feedbackSubtitle": "Dis moi ce que tu penses !",
|
"contribute": "Contribue au projet",
|
||||||
"feedbackDescription": "Tu veux voir une fonctionnalité ajoutée/modifiée/supprimée ? Tu veux donner ton opinion sur l'appli ou simplement discuter avec le développeur (c'est moi coucou) ? Utilise un des liens ci-dessous !",
|
"contributeSubtitle": "Avec une possible implication citoyenne !",
|
||||||
"contactMeans": "L'utilisation de Gitea est recommandée, pour l'utiliser, connecte toi avec tes identifiants INSA.",
|
"contributeDescription": "Il y en a pour tous les goûts : de la com', du design ou de la technique. Tu es libre de participer comme tu veux.\nTu trouveras ci-dessous un Trello de l'organisation du projet, ainsi que le code source sur GitEtud.",
|
||||||
"homeButtonTitle": "Feedback/Bugs",
|
"homeButtonTitle": "Participer au projet",
|
||||||
"homeButtonSubtitle": "Contacte le développeur de l'appli"
|
"homeButtonSubtitle": "Ton aide compte"
|
||||||
},
|
},
|
||||||
"game": {
|
"game": {
|
||||||
"title": "Jeu trop ouf",
|
"title": "Jeu trop ouf",
|
||||||
|
@ -412,16 +412,16 @@
|
||||||
"text": "Tu peux faire bien plus avec CAMPUS, mais je n'ai pas le temps de tout dire ici. Balade toi sur l'appli pour tout découvrir !"
|
"text": "Tu peux faire bien plus avec CAMPUS, mais je n'ai pas le temps de tout dire ici. Balade toi sur l'appli pour tout découvrir !"
|
||||||
},
|
},
|
||||||
"slideDone": {
|
"slideDone": {
|
||||||
"title": "Ton avis compte !",
|
"title": "Participe au projet !",
|
||||||
"text": "Cette appli à été réalisée par un seul étudiant (avec un peu d'aide par-ci par-là), donc tes retours sont les bienvenus !"
|
"text": "Cette appli à été réalisée par un seul étudiant, donc tes retours et ton aide sont les bienvenus !\nIl y en a pour tous les goûts : de la com', du design ou de la technique !"
|
||||||
},
|
},
|
||||||
"updateSlide0": {
|
"updateSlide0": {
|
||||||
"title": "Nouveau dans cette mise à jour !",
|
"title": "Coucou toi !",
|
||||||
"text": "Coucou toi ! Je suis là pour t'aider trouver à utiliser l'appli."
|
"text": "Je suis le petit nouveau qui t'accompagnera sur l'appli. Mon dada c'est de te donner plein d'astuces et d'infos."
|
||||||
},
|
},
|
||||||
"updateSlide1": {
|
"updateSlide1": {
|
||||||
"title": "Participe au projet !",
|
"title": "Participe au projet !",
|
||||||
"text": "Tout le monde peut participer, que ce soit pour trouver des bugs ou ajouter des nouvelles fonctionnalités."
|
"text": "Cette appli à été réalisée par un seul étudiant, donc tes retours et ton aide sont les bienvenus !\nIl y en a pour tous les goûts : de la com', du design ou de la technique !"
|
||||||
},
|
},
|
||||||
"aprilFoolsSlide": {
|
"aprilFoolsSlide": {
|
||||||
"title": "Nouveau dans cette mise à jour !",
|
"title": "Nouveau dans cette mise à jour !",
|
||||||
|
|
|
@ -3,110 +3,130 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Avatar, Button, Card, Paragraph, withTheme} from 'react-native-paper';
|
import {Avatar, Button, Card, Paragraph, withTheme} from 'react-native-paper';
|
||||||
import i18n from 'i18n-js';
|
import i18n from 'i18n-js';
|
||||||
import {Linking} from 'react-native';
|
import {Linking, View} from 'react-native';
|
||||||
import type {CustomThemeType} from '../../managers/ThemeManager';
|
|
||||||
import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
|
import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
|
||||||
import type {CardTitleIconPropsType} from '../../constants/PaperStyles';
|
import type {CardTitleIconPropsType} from '../../constants/PaperStyles';
|
||||||
|
|
||||||
type PropsType = {
|
|
||||||
theme: CustomThemeType,
|
|
||||||
};
|
|
||||||
|
|
||||||
const links = {
|
const links = {
|
||||||
bugsMail: `mailto:app@amicale-insat.fr?subject=[BUG] Application CAMPUS
|
bugsGit: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/',
|
||||||
&body=Coucou Arnaud ça bug c'est nul,\n\n
|
trello: 'https://trello.com/b/RMej49Uq/application-campus-insa',
|
||||||
Informations sur ton système si tu sais (iOS ou Android, modèle du tel, version):\n\n\n
|
|
||||||
Nature du problème :\n\n\n
|
|
||||||
Étapes pour reproduire ce pb :\n\n\n\n
|
|
||||||
Stp corrige le pb, bien cordialement.`,
|
|
||||||
bugsGit:
|
|
||||||
'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/issues/new',
|
|
||||||
facebook: 'https://www.facebook.com/campus.insat',
|
facebook: 'https://www.facebook.com/campus.insat',
|
||||||
feedbackMail: `mailto:app@amicale-insat.fr?subject=[FEEDBACK] Application CAMPUS
|
feedbackMail: `mailto:app@amicale-insat.fr?subject=[FEEDBACK] Application CAMPUS
|
||||||
&body=Coucou Arnaud j'ai du feedback\n\n\n\nBien cordialement.`,
|
&body=Coucou Arnaud j'ai du feedback\n\n\n\nBien cordialement.`,
|
||||||
feedbackDiscord: 'https://discord.gg/W8MeTec',
|
feedbackDiscord: 'https://discord.gg/W8MeTec',
|
||||||
};
|
};
|
||||||
|
|
||||||
class FeedbackScreen extends React.Component<PropsType> {
|
class FeedbackScreen extends React.Component<null> {
|
||||||
/**
|
/**
|
||||||
* Gets link buttons
|
* Gets link buttons
|
||||||
*
|
*
|
||||||
* @param isBug True if buttons should redirect to bug report methods
|
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
static getButtons(isBug: boolean): React.Node {
|
static getButtons(isFeedback: boolean): React.Node {
|
||||||
return (
|
return (
|
||||||
<Card.Actions
|
<Card.Actions
|
||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
}}>
|
}}>
|
||||||
<Button
|
{isFeedback ? (
|
||||||
icon="email"
|
<View
|
||||||
mode="contained"
|
style={{
|
||||||
style={{
|
flex: 1,
|
||||||
marginLeft: 'auto',
|
flexWrap: 'wrap',
|
||||||
marginTop: 5,
|
flexDirection: 'row',
|
||||||
}}
|
width: '100%',
|
||||||
onPress={() => {
|
}}>
|
||||||
Linking.openURL(isBug ? links.bugsMail : links.feedbackMail);
|
<Button
|
||||||
}}>
|
icon="email"
|
||||||
MAIL
|
mode="contained"
|
||||||
</Button>
|
style={{
|
||||||
<Button
|
marginLeft: 'auto',
|
||||||
icon={isBug ? 'git' : 'discord'}
|
marginRight: 'auto',
|
||||||
mode="contained"
|
marginTop: 5,
|
||||||
color={isBug ? '#609927' : '#7289da'}
|
}}
|
||||||
style={{
|
onPress={() => {
|
||||||
marginLeft: 'auto',
|
Linking.openURL(links.feedbackMail);
|
||||||
marginTop: 5,
|
}}>
|
||||||
}}
|
MAIL
|
||||||
onPress={() => {
|
</Button>
|
||||||
Linking.openURL(isBug ? links.bugsGit : links.feedbackDiscord);
|
<Button
|
||||||
}}>
|
icon="facebook"
|
||||||
{isBug ? 'GITEA' : 'Discord'}
|
mode="contained"
|
||||||
</Button>
|
color="#2e88fe"
|
||||||
<Button
|
style={{
|
||||||
icon="facebook"
|
marginLeft: 'auto',
|
||||||
mode="contained"
|
marginRight: 'auto',
|
||||||
color="#2e88fe"
|
marginTop: 5,
|
||||||
style={{
|
}}
|
||||||
marginLeft: 'auto',
|
onPress={() => {
|
||||||
marginTop: 5,
|
Linking.openURL(links.facebook);
|
||||||
}}
|
}}>
|
||||||
onPress={() => {
|
Facebook
|
||||||
Linking.openURL(links.facebook);
|
</Button>
|
||||||
}}>
|
<Button
|
||||||
Facebook
|
icon="discord"
|
||||||
</Button>
|
mode="contained"
|
||||||
|
color="#7289da"
|
||||||
|
style={{
|
||||||
|
marginLeft: 'auto',
|
||||||
|
marginRight: 'auto',
|
||||||
|
marginTop: 5,
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
Linking.openURL(links.feedbackDiscord);
|
||||||
|
}}>
|
||||||
|
Discord
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
flexDirection: 'row',
|
||||||
|
width: '100%',
|
||||||
|
}}>
|
||||||
|
<Button
|
||||||
|
icon="git"
|
||||||
|
mode="contained"
|
||||||
|
color="#609927"
|
||||||
|
style={{
|
||||||
|
marginLeft: 'auto',
|
||||||
|
marginRight: 'auto',
|
||||||
|
marginTop: 5,
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
Linking.openURL(links.bugsGit);
|
||||||
|
}}>
|
||||||
|
GITETUD
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
icon="calendar"
|
||||||
|
mode="contained"
|
||||||
|
color="#026AA7"
|
||||||
|
style={{
|
||||||
|
marginLeft: 'auto',
|
||||||
|
marginRight: 'auto',
|
||||||
|
marginTop: 5,
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
Linking.openURL(links.trello);
|
||||||
|
}}>
|
||||||
|
TRELLO
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
</Card.Actions>
|
</Card.Actions>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): React.Node {
|
render(): React.Node {
|
||||||
const {theme} = this.props;
|
|
||||||
return (
|
return (
|
||||||
<CollapsibleScrollView style={{padding: 5}}>
|
<CollapsibleScrollView style={{padding: 5}}>
|
||||||
<Card>
|
<Card>
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title={i18n.t('screens.feedback.bugs')}
|
title={i18n.t('screens.feedback.feedback')}
|
||||||
subtitle={i18n.t('screens.feedback.bugsSubtitle')}
|
|
||||||
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
|
||||||
<Avatar.Icon size={iconProps.size} icon="bug" />
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<Card.Content>
|
|
||||||
<Paragraph>{i18n.t('screens.feedback.bugsDescription')}</Paragraph>
|
|
||||||
<Paragraph style={{color: theme.colors.primary}}>
|
|
||||||
{i18n.t('screens.feedback.contactMeans')}
|
|
||||||
</Paragraph>
|
|
||||||
</Card.Content>
|
|
||||||
{FeedbackScreen.getButtons(true)}
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card style={{marginTop: 20, marginBottom: 10}}>
|
|
||||||
<Card.Title
|
|
||||||
title={i18n.t('screens.feedback.title')}
|
|
||||||
subtitle={i18n.t('screens.feedback.feedbackSubtitle')}
|
subtitle={i18n.t('screens.feedback.feedbackSubtitle')}
|
||||||
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
||||||
<Avatar.Icon size={iconProps.size} icon="comment" />
|
<Avatar.Icon size={iconProps.size} icon="comment" />
|
||||||
|
@ -117,6 +137,19 @@ class FeedbackScreen extends React.Component<PropsType> {
|
||||||
{i18n.t('screens.feedback.feedbackDescription')}
|
{i18n.t('screens.feedback.feedbackDescription')}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Card.Content>
|
</Card.Content>
|
||||||
|
{FeedbackScreen.getButtons(true)}
|
||||||
|
<Card.Title
|
||||||
|
title={i18n.t('screens.feedback.contribute')}
|
||||||
|
subtitle={i18n.t('screens.feedback.contributeSubtitle')}
|
||||||
|
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
||||||
|
<Avatar.Icon size={iconProps.size} icon="handshake" />
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Card.Content>
|
||||||
|
<Paragraph>
|
||||||
|
{i18n.t('screens.feedback.contributeDescription')}
|
||||||
|
</Paragraph>
|
||||||
|
</Card.Content>
|
||||||
{FeedbackScreen.getButtons(false)}
|
{FeedbackScreen.getButtons(false)}
|
||||||
</Card>
|
</Card>
|
||||||
</CollapsibleScrollView>
|
</CollapsibleScrollView>
|
||||||
|
|
Loading…
Reference in a new issue