Skip to content

Commit

Permalink
feat: review application and I18n translations
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-mccombs committed Apr 2, 2021
1 parent 445b2d3 commit 42cd8cc
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 110 deletions.
8 changes: 5 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"buildNumber": "11.2.0",
"infoPlist": {
"NSLocationWhenInUseUsageDescription": "This app uses your location to geo-tag surveys accurately."
}
},
"appStoreUrl": "https://apps.apple.com/us/app/puente-collect/id1362371696"
},
"web": {
"favicon": "./assets/images/favicon.png"
Expand All @@ -38,7 +39,8 @@
"ACCESS_FINE_LOCATION",
"INTERNET"
],
"softwareKeyboardLayoutMode": "pan"
"softwareKeyboardLayoutMode": "pan",
"playStoreUrl": "https://play.google.com/store/apps/details?id=io.ionic.starter1270348"
},
"packagerOpts": {
"config": "metro.config.js",
Expand All @@ -57,4 +59,4 @@
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const FindRecords = () => {
setEdit(result.key);
}}
>
Edit
{I18n.t('findRecordSettings.edit')}
</Button>
)}
</View>
Expand Down Expand Up @@ -161,7 +161,7 @@ const FindRecords = () => {
color={theme.colors.primary}
/>
) : (
<Button onPress={() => updateUser()}>Submit</Button>
<Button onPress={() => updateUser()}>{I18n.t('global.submit')}</Button>
)}
</View>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const NamePhoneEmail = () => {
setEdit(result.key);
}}
>
Edit
{I18n.t('findRecordSettings.edit')}
</Button>
</View>
)}
Expand Down Expand Up @@ -190,7 +190,7 @@ const NamePhoneEmail = () => {
color={theme.colors.primary}
/>
) : (
<Button onPress={() => updateUser()}>Submit</Button>
<Button onPress={() => updateUser()}>{I18n.t('global.submit')}</Button>
)}
</View>
);
Expand Down
19 changes: 0 additions & 19 deletions domains/Settings/SupportHome/SupportSettings/AboutUs/index.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import email from 'react-native-email'

import styles from '../../../index.styles';
import I18n from '../../../../../modules/i18n';

const Feedback = () => {
const handleEmail = () => {
Expand All @@ -26,16 +27,16 @@ const Feedback = () => {

return (
<View style={styles.mainContainer}>
<Headline>Feedback</Headline>
<Headline>{I18n.t('feedback.feedback')}</Headline>
<View style={styles.horizontalLinePrimary} />
<Text>Please enter your feedback in the input below and press the "Send Feedback" button. This will redirect you to your email where you can send your feedback.</Text>
<Text>{I18n.t('feedback.enterFeedback')}</Text>
<View style={styles.horizontalLinePrimary} />
<TextInput multiline={true} onChangeText={(text) => setEmailBody(text)}
placeholder={"Type your feedback here..."}>
placeholder={I18n.t('feedback.typeFeedback')}>

</TextInput>
<View style={styles.languageContainer}>
<Button mode="contained" onPress={() => handleEmail()}>Send Mail</Button>
<Button mode="contained" onPress={() => handleEmail()}>{I18n.t('feedback.sendMail')}</Button>
</View>
</View>
)
Expand Down
20 changes: 0 additions & 20 deletions domains/Settings/SupportHome/SupportSettings/RateOurApp/index.js

This file was deleted.

19 changes: 0 additions & 19 deletions domains/Settings/SupportHome/SupportSettings/WhatsNew/index.js

This file was deleted.

6 changes: 2 additions & 4 deletions domains/Settings/SupportHome/SupportSettings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import {
Button, Headline, IconButton, Text
} from 'react-native-paper';

import AboutUs from './AboutUs';
import Feedback from './Feedback';
import RateOurApp from './RateOurApp';
import WhatsNew from './WhatsNew';

import styles from '../../index.styles';
import I18n from '../../../../modules/i18n';

const SupportSettings = ({
settingsView, setSettingsView, supportView, setSupportView
Expand All @@ -33,7 +31,7 @@ const SupportSettings = ({
<Button onPress={() => {
setSupportView('');
}}
>Back</Button>
>{I18n.t('supportHome.back')}</Button>

</View>
);
Expand Down
81 changes: 49 additions & 32 deletions domains/Settings/SupportHome/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import {
View
View, TouchableOpacity
} from 'react-native';
import {
Button, Headline, IconButton, Text
Expand All @@ -11,32 +11,32 @@ import I18n from '../../../modules/i18n';
import { theme } from '../../../modules/theme';

import styles from '../index.styles'
import * as StoreReview from 'expo-store-review';

const SupportHome = ({
setView, prevView, logOut, settingsView, setSettingsView
}) => {
const [supportView, setSupportView] = useState('');

const rateApp = async () => {
if (await StoreReview.isAvailableAsync()) {
StoreReview.requestReview();
}
}
const inputs = [
{
key: 'whatsNew',
label: 'What\'s New?',
button: true
},
{
key: 'aboutUs',
label: 'About us',
button: true
},
{
key: 'feedback',
label: 'Contact us / Feedback?',
button: true
label: I18n.t('supportHome.feedback'),
button: true,
touchable: false,
action: null
},
{
key: 'rateApp',
label: 'Rate our app',
button: false
label: I18n.t('supportHome.rateApp'),
button: false,
touchable: true,
action: rateApp
}
];
return (
Expand All @@ -54,24 +54,41 @@ const SupportHome = ({
</View>
</View>
<View style={{ paddingLeft: '5%', paddingRight: '5%', paddingTop: 20 }}>
<Headline style={{ fontWeight: 'bold' }}>Help Center</Headline>
<Headline style={{ fontWeight: 'bold' }}>{I18n.t('supportHome.helpCenter')}</Headline>
<View style={styles.horizontalLineGray} />
{inputs.length > 0 && inputs.map((input) => (
<View>
<View style={{ flexDirection: 'row' }}>
<Text style={styles.text}>{input.label}</Text>
{input.button && (
<IconButton
icon="chevron-right"
size={30}
color={theme.colors.primary}
style={{ marginLeft: 'auto', marginTop: -5, marginBottom: -10 }}
onPress={() => {
setSupportView(input.key);
}}
/>
<View key={input.key}>
{input.touchable ? (
<TouchableOpacity style={{ flexDirection: 'row' }} onPress={() => input.action()}>
<Text style={styles.text}>{input.label}</Text>
{input.button && (
<IconButton
icon="chevron-right"
size={30}
color={theme.colors.primary}
style={{ marginLeft: 'auto', marginTop: -5, marginBottom: -10 }}
onPress={() => {
setSupportView(input.key);
}}
/>
)}
</TouchableOpacity>
) : (
<View style={{ flexDirection: 'row' }}>
<Text style={styles.text}>{input.label}</Text>
{input.button && (
<IconButton
icon="chevron-right"
size={30}
color={theme.colors.primary}
style={{ marginLeft: 'auto', marginTop: -5, marginBottom: -10 }}
onPress={() => {
setSupportView(input.key);
}}
/>
)}
</View>
)}
</View>
<View style={styles.horizontalLineGray} />
</View>
))}
Expand All @@ -88,8 +105,8 @@ const SupportHome = ({
{supportView !== '' && (
<View>
<SupportSettings
settingsView={settingsView}
setSettingsView={setSettingsView}
// settingsView={settingsView}
// setSettingsView={setSettingsView}
supportView={supportView}
setSupportView={setSupportView}
/>
Expand Down
17 changes: 15 additions & 2 deletions modules/i18n/english/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,15 @@
"findRecords": "Find Records",
"language": "Language",
"back": "Back",
"logout":"Log out"
"logout": "Log out"
},
"findRecordSettings": {
"currentReccordsStored": "Current records stored",
"recordStorageLimit": "Record storage limit",
"errorMessage": "There was an error processing your request. Please ensure you are connected to the internet and try again.",
"successMessage": "You have updated your storage limit. You may experience app related issues if your phone cannot handle the new limit. If this occurs, your experience may be better if you reduce the limit.",
"findRecords": "Find Records"
"findRecords": "Find Records",
"edit": "Edit"
},
"languageSettings": {
"chooseLanguage": "Choose Language"
Expand All @@ -457,5 +458,17 @@
"changePassword": "Change Password",
"currentPassword": "Current Password",
"newPassword": "New Password"
},
"supportHome": {
"feedback": "Contact us / Feedback",
"rateApp": "Rate our app",
"helpCenter": "Help Center",
"back": "Back"
},
"feedback": {
"feedback": "Feedback",
"enterFeedback": "Please enter your feedback in the input below and press the \"Send Feedback\" button. This will redirect you to your email where you can send your feedback.",
"sendMail": "Send Mail",
"typeFeedback": "Type your feedback here..."
}
}
15 changes: 14 additions & 1 deletion modules/i18n/spanish/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@
"recordStorageLimit": "Límite de almacenamiento de registros",
"errorMessage": "Hubo un error al procesar su solicitud. Asegúrese de estar conectado a Internet y vuelva a intentarlo.",
"successMessage": "Has actualizado tu límite de almacenamiento. Puede experimentar problemas relacionados con la aplicación si su teléfono no puede manejar el nuevo límite. Si esto ocurre, su experiencia puede mejorar si reduce el límite.",
"findRecords": "Buscar registros"
"findRecords": "Buscar registros",
"edit": "Editar"
},
"languageSettings": {
"chooseLanguage": "Elige lengua"
Expand All @@ -457,5 +458,17 @@
"changePassword": "Cambiar la contraseña",
"currentPassword": "Contraseña actual",
"newPassword": "Nueva contraseña"
},
"supportHome": {
"feedback": "Contáctenos / Comentarios",
"rateApp": "Califica nuestra aplicación",
"helpCenter": "Centro de ayuda",
"back": "atrás"
},
"feedback": {
"feedback": "Realimentación",
"enterFeedback": "Ingrese sus comentarios en la entrada a continuación y presione el botón \"Enviar comentarios\". Esto lo redireccionará a su correo electrónico donde puede enviar sus comentarios.",
"sendMail": "Enviar correo",
"typeFeedback": "Escriba sus comentarios aquí ..."
}
}
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"react-dom": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-autocomplete-input": "4.2.0",
"react-native-email": "^1.1.0",
"react-native-email": "1.1.0",
"react-native-emoji": "1.8.0",
"react-native-gesture-handler": "1.6.0",
"react-native-localize": "1.3.3",
Expand All @@ -80,7 +80,8 @@
"react-redux": "7.2.0",
"redux": "4.0.5",
"redux-actions": "2.6.5",
"yup": "0.29.3"
"yup": "0.29.3",
"expo-store-review": "2.1.2"
},
"devDependencies": {
"@babel/core": "7.10.2",
Expand Down

0 comments on commit 42cd8cc

Please sign in to comment.