Browse Source

Improve translation and start/feedback screen

Arnaud Vergnet 3 years ago
parent
commit
5a98f5506a
3 changed files with 131 additions and 98 deletions
  1. 15
    15
      locales/en.json
  2. 14
    14
      locales/fr.json
  3. 102
    69
      src/screens/Other/FeedbackScreen.js

+ 15
- 15
locales/en.json View File

@@ -354,15 +354,15 @@
354 354
       "libs": "Libraries used"
355 355
     },
356 356
     "feedback": {
357
-      "title": "Feedback",
358
-      "bugs": "Report Bugs",
359
-      "bugsSubtitle": "Did you find a bug? Let us know!",
360
-      "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!",
361
-      "feedbackSubtitle": "Let us know what you think!",
362
-      "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!",
363
-      "contactMeans": "Using Gitea is recommended, to use it simply login with your INSA account.",
364
-      "homeButtonTitle": "Feedback/Bug report",
365
-      "homeButtonSubtitle": "Contact the devs"
357
+      "title": "Contribute",
358
+      "feedback": "Contact the dev",
359
+      "feedbackSubtitle": "A student like you!",
360
+      "feedbackDescription": "Feedback or bugs, you are always welcome.\nChoose your preferred way from the buttons bellow.",
361
+      "contribute": "Contribute to the project",
362
+      "contributeSubtitle": "With a possible \"implication citoyenne\"!",
363
+      "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.",
364
+      "homeButtonTitle": "Contribute to the project",
365
+      "homeButtonSubtitle": "Your help is important"
366 366
     },
367 367
     "game": {
368 368
       "title": "So Awesome Game",
@@ -413,16 +413,16 @@
413 413
       "text": "You can do much more with CAMPUS, but I can't explain everything here. Explore the app to find out!"
414 414
     },
415 415
     "slideDone": {
416
-      "title": "Your feedback is valuable!",
417
-      "text": "This app is the work of one student (with some help here and there), so your feedback is much appreciated!"
416
+      "title": "Contribute to the project!",
417
+      "text": "This app is the work of one student, so your feedback and your help are welcome!\nEveryone can help: communication, design or coding!"
418 418
     },
419 419
     "updateSlide0": {
420
-      "title": "New in this update!",
421
-      "text": "Hello you! I'm here to help you around the app."
420
+      "title": "Hi you!",
421
+      "text": "I'm new here and I will help you around the app. My thing is to give you lots of tips and tricks."
422 422
     },
423 423
     "updateSlide1": {
424
-      "title": "Contribute!",
425
-      "text": "Everyone is free to contribute to the project, from reporting bugs to implementing new features"
424
+      "title": "Contribute to the project!",
425
+      "text": "This app is the work of one student, so your feedback and your help are welcome!\nEveryone can help: communication, design or coding!"
426 426
     },
427 427
     "aprilFoolsSlide": {
428 428
       "title": "New in this update!",

+ 14
- 14
locales/fr.json View File

@@ -353,15 +353,15 @@
353 353
       "libs": "Librairies utilisées"
354 354
     },
355 355
     "feedback": {
356
-      "title": "Feedback",
357
-      "bugs": "Rapporter des Bugs",
358
-      "bugsSubtitle": "Tu as trouvé un bug ?",
359
-      "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 !",
360
-      "feedbackSubtitle": "Dis moi ce que tu penses !",
361
-      "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 !",
362
-      "contactMeans": "L'utilisation de Gitea est recommandée, pour l'utiliser, connecte toi avec tes identifiants INSA.",
363
-      "homeButtonTitle": "Feedback/Bugs",
364
-      "homeButtonSubtitle": "Contacte le développeur de l'appli"
356
+      "title": "Participer",
357
+      "feedback": "Contacte le développeur",
358
+      "feedbackSubtitle": "C'est un étudiant comme toi !",
359
+      "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.",
360
+      "contribute": "Contribue au projet",
361
+      "contributeSubtitle": "Avec une possible implication citoyenne !",
362
+      "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.",
363
+      "homeButtonTitle": "Participer au projet",
364
+      "homeButtonSubtitle": "Ton aide compte"
365 365
     },
366 366
     "game": {
367 367
       "title": "Jeu trop ouf",
@@ -412,16 +412,16 @@
412 412
       "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 !"
413 413
     },
414 414
     "slideDone": {
415
-      "title": "Ton avis compte !",
416
-      "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 !"
415
+      "title": "Participe au projet !",
416
+      "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 !"
417 417
     },
418 418
     "updateSlide0": {
419
-      "title": "Nouveau dans cette mise à jour !",
420
-      "text": "Coucou toi ! Je suis là pour t'aider trouver à utiliser l'appli."
419
+      "title": "Coucou toi !",
420
+      "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."
421 421
     },
422 422
     "updateSlide1": {
423 423
       "title": "Participe au projet !",
424
-      "text": "Tout le monde peut participer, que ce soit pour trouver des bugs ou ajouter des nouvelles fonctionnalités."
424
+      "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 !"
425 425
     },
426 426
     "aprilFoolsSlide": {
427 427
       "title": "Nouveau dans cette mise à jour !",

+ 102
- 69
src/screens/Other/FeedbackScreen.js View File

@@ -3,118 +3,151 @@
3 3
 import * as React from 'react';
4 4
 import {Avatar, Button, Card, Paragraph, withTheme} from 'react-native-paper';
5 5
 import i18n from 'i18n-js';
6
-import {Linking} from 'react-native';
7
-import type {CustomThemeType} from '../../managers/ThemeManager';
6
+import {Linking, View} from 'react-native';
8 7
 import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
9 8
 import type {CardTitleIconPropsType} from '../../constants/PaperStyles';
10 9
 
11
-type PropsType = {
12
-  theme: CustomThemeType,
13
-};
14
-
15 10
 const links = {
16
-  bugsMail: `mailto:app@amicale-insat.fr?subject=[BUG] Application CAMPUS
17
-&body=Coucou Arnaud ça bug c'est nul,\n\n
18
-Informations sur ton système si tu sais (iOS ou Android, modèle du tel, version):\n\n\n
19
-Nature du problème :\n\n\n
20
-Étapes pour reproduire ce pb :\n\n\n\n
21
-Stp corrige le pb, bien cordialement.`,
22
-  bugsGit:
23
-    'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/issues/new',
11
+  bugsGit: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/',
12
+  trello: 'https://trello.com/b/RMej49Uq/application-campus-insa',
24 13
   facebook: 'https://www.facebook.com/campus.insat',
25 14
   feedbackMail: `mailto:app@amicale-insat.fr?subject=[FEEDBACK] Application CAMPUS
26 15
 &body=Coucou Arnaud j'ai du feedback\n\n\n\nBien cordialement.`,
27 16
   feedbackDiscord: 'https://discord.gg/W8MeTec',
28 17
 };
29 18
 
30
-class FeedbackScreen extends React.Component<PropsType> {
19
+class FeedbackScreen extends React.Component<null> {
31 20
   /**
32 21
    * Gets link buttons
33 22
    *
34
-   * @param isBug True if buttons should redirect to bug report methods
35 23
    * @returns {*}
36 24
    */
37
-  static getButtons(isBug: boolean): React.Node {
25
+  static getButtons(isFeedback: boolean): React.Node {
38 26
     return (
39 27
       <Card.Actions
40 28
         style={{
41 29
           flex: 1,
42 30
           flexWrap: 'wrap',
43 31
         }}>
44
-        <Button
45
-          icon="email"
46
-          mode="contained"
47
-          style={{
48
-            marginLeft: 'auto',
49
-            marginTop: 5,
50
-          }}
51
-          onPress={() => {
52
-            Linking.openURL(isBug ? links.bugsMail : links.feedbackMail);
53
-          }}>
54
-          MAIL
55
-        </Button>
56
-        <Button
57
-          icon={isBug ? 'git' : 'discord'}
58
-          mode="contained"
59
-          color={isBug ? '#609927' : '#7289da'}
60
-          style={{
61
-            marginLeft: 'auto',
62
-            marginTop: 5,
63
-          }}
64
-          onPress={() => {
65
-            Linking.openURL(isBug ? links.bugsGit : links.feedbackDiscord);
66
-          }}>
67
-          {isBug ? 'GITEA' : 'Discord'}
68
-        </Button>
69
-        <Button
70
-          icon="facebook"
71
-          mode="contained"
72
-          color="#2e88fe"
73
-          style={{
74
-            marginLeft: 'auto',
75
-            marginTop: 5,
76
-          }}
77
-          onPress={() => {
78
-            Linking.openURL(links.facebook);
79
-          }}>
80
-          Facebook
81
-        </Button>
32
+        {isFeedback ? (
33
+          <View
34
+            style={{
35
+              flex: 1,
36
+              flexWrap: 'wrap',
37
+              flexDirection: 'row',
38
+              width: '100%',
39
+            }}>
40
+            <Button
41
+              icon="email"
42
+              mode="contained"
43
+              style={{
44
+                marginLeft: 'auto',
45
+                marginRight: 'auto',
46
+                marginTop: 5,
47
+              }}
48
+              onPress={() => {
49
+                Linking.openURL(links.feedbackMail);
50
+              }}>
51
+              MAIL
52
+            </Button>
53
+            <Button
54
+              icon="facebook"
55
+              mode="contained"
56
+              color="#2e88fe"
57
+              style={{
58
+                marginLeft: 'auto',
59
+                marginRight: 'auto',
60
+                marginTop: 5,
61
+              }}
62
+              onPress={() => {
63
+                Linking.openURL(links.facebook);
64
+              }}>
65
+              Facebook
66
+            </Button>
67
+            <Button
68
+              icon="discord"
69
+              mode="contained"
70
+              color="#7289da"
71
+              style={{
72
+                marginLeft: 'auto',
73
+                marginRight: 'auto',
74
+                marginTop: 5,
75
+              }}
76
+              onPress={() => {
77
+                Linking.openURL(links.feedbackDiscord);
78
+              }}>
79
+              Discord
80
+            </Button>
81
+          </View>
82
+        ) : (
83
+          <View
84
+            style={{
85
+              flex: 1,
86
+              flexWrap: 'wrap',
87
+              flexDirection: 'row',
88
+              width: '100%',
89
+            }}>
90
+            <Button
91
+              icon="git"
92
+              mode="contained"
93
+              color="#609927"
94
+              style={{
95
+                marginLeft: 'auto',
96
+                marginRight: 'auto',
97
+                marginTop: 5,
98
+              }}
99
+              onPress={() => {
100
+                Linking.openURL(links.bugsGit);
101
+              }}>
102
+              GITETUD
103
+            </Button>
104
+            <Button
105
+              icon="calendar"
106
+              mode="contained"
107
+              color="#026AA7"
108
+              style={{
109
+                marginLeft: 'auto',
110
+                marginRight: 'auto',
111
+                marginTop: 5,
112
+              }}
113
+              onPress={() => {
114
+                Linking.openURL(links.trello);
115
+              }}>
116
+              TRELLO
117
+            </Button>
118
+          </View>
119
+        )}
82 120
       </Card.Actions>
83 121
     );
84 122
   }
85 123
 
86 124
   render(): React.Node {
87
-    const {theme} = this.props;
88 125
     return (
89 126
       <CollapsibleScrollView style={{padding: 5}}>
90 127
         <Card>
91 128
           <Card.Title
92
-            title={i18n.t('screens.feedback.bugs')}
93
-            subtitle={i18n.t('screens.feedback.bugsSubtitle')}
129
+            title={i18n.t('screens.feedback.feedback')}
130
+            subtitle={i18n.t('screens.feedback.feedbackSubtitle')}
94 131
             left={(iconProps: CardTitleIconPropsType): React.Node => (
95
-              <Avatar.Icon size={iconProps.size} icon="bug" />
132
+              <Avatar.Icon size={iconProps.size} icon="comment" />
96 133
             )}
97 134
           />
98 135
           <Card.Content>
99
-            <Paragraph>{i18n.t('screens.feedback.bugsDescription')}</Paragraph>
100
-            <Paragraph style={{color: theme.colors.primary}}>
101
-              {i18n.t('screens.feedback.contactMeans')}
136
+            <Paragraph>
137
+              {i18n.t('screens.feedback.feedbackDescription')}
102 138
             </Paragraph>
103 139
           </Card.Content>
104 140
           {FeedbackScreen.getButtons(true)}
105
-        </Card>
106
-
107
-        <Card style={{marginTop: 20, marginBottom: 10}}>
108 141
           <Card.Title
109
-            title={i18n.t('screens.feedback.title')}
110
-            subtitle={i18n.t('screens.feedback.feedbackSubtitle')}
142
+            title={i18n.t('screens.feedback.contribute')}
143
+            subtitle={i18n.t('screens.feedback.contributeSubtitle')}
111 144
             left={(iconProps: CardTitleIconPropsType): React.Node => (
112
-              <Avatar.Icon size={iconProps.size} icon="comment" />
145
+              <Avatar.Icon size={iconProps.size} icon="handshake" />
113 146
             )}
114 147
           />
115 148
           <Card.Content>
116 149
             <Paragraph>
117
-              {i18n.t('screens.feedback.feedbackDescription')}
150
+              {i18n.t('screens.feedback.contributeDescription')}
118 151
             </Paragraph>
119 152
           </Card.Content>
120 153
           {FeedbackScreen.getButtons(false)}

Loading…
Cancel
Save