Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

French translation #361

Merged
merged 48 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5c8d98f
WIP translation
celian-rib Dec 8, 2022
1ee8acc
Add missing translations
celian-rib Dec 10, 2022
1649b9d
Fix
celian-rib Dec 10, 2022
b11f223
Fix
celian-rib Dec 10, 2022
adab2e2
Fix conflict
celian-rib Dec 10, 2022
3853649
Update src/components/overlays/ReconnectingOverlay.js
celian-rib Dec 10, 2022
8108263
Update src/screens/BlockedUsersScreen.js
celian-rib Dec 10, 2022
5e12b79
Update src/screens/ProfileEditScreen.js
celian-rib Dec 10, 2022
cc00bb5
Update src/screens/ProfileEditScreen.js
celian-rib Dec 10, 2022
a386fb9
Update src/components/other/HomeScreenTabBar.js
celian-rib Dec 11, 2022
79f454e
Update src/components/map/DropyMap.js
celian-rib Dec 11, 2022
39b94cd
Update src/components/input/FormInput.js
celian-rib Dec 11, 2022
2101403
Update src/components/overlays/ConfirmDropyOverlay.js
celian-rib Dec 11, 2022
2dfe43d
Update src/components/overlays/GeolocationModal.js
celian-rib Dec 11, 2022
38cd9fe
Update src/screens/Splash.js
celian-rib Dec 11, 2022
b054cf8
Update src/screens/UserDropiesScreen.js
celian-rib Dec 11, 2022
736a587
Update src/screens/UserDropiesScreen.js
celian-rib Dec 11, 2022
a854caa
Update src/states/BackgroundGolocationContextProvider.js
celian-rib Dec 11, 2022
c4a0a4c
Update src/utils/profiles.js
celian-rib Dec 11, 2022
22b72cd
Fix conflicts
celian-rib Dec 11, 2022
525a366
Merge branch 'DF_248-french-translation' of github.com:dropy-project/…
celian-rib Dec 11, 2022
e1e9c84
bite
celian-rib Dec 11, 2022
04d284e
Merge branch 'main' of github.com:dropy-project/front
celian-rib Dec 12, 2022
b480c83
Fix conflixts
celian-rib Dec 13, 2022
0e3a0cf
Update src/components/viewSlider/ViewSlider.js
celian-rib Dec 13, 2022
828e4be
Update src/components/overlays/MuseumOverlay.js
celian-rib Dec 13, 2022
bca5423
Update src/components/viewSlider/ViewSlider.js
celian-rib Dec 13, 2022
f29abb2
Update src/screens/AccountScreen.js
celian-rib Dec 13, 2022
90dcf40
Update src/screens/AccountScreen.js
celian-rib Dec 13, 2022
ae5fabd
Update src/screens/AccountScreen.js
celian-rib Dec 13, 2022
ec1865d
Update src/screens/BlockedUsersScreen.js
celian-rib Dec 13, 2022
7e0dfa8
Update src/screens/BlockedUsersScreen.js
celian-rib Dec 13, 2022
1d12e12
Update src/screens/ChatScreen.js
celian-rib Dec 13, 2022
6849fd0
Update src/screens/ConversationsScreen.js
celian-rib Dec 13, 2022
05ac31e
Apply suggestions from code review
celian-rib Dec 13, 2022
bc077f3
Apply suggestions from code review
celian-rib Dec 13, 2022
63628f6
Update src/screens/DisplayDropyMediaScreen.js
celian-rib Dec 13, 2022
d497477
Update src/screens/DisplayDropyMediaScreen.js
celian-rib Dec 13, 2022
2514dee
Update src/screens/GetDropyScreen.js
celian-rib Dec 13, 2022
0519216
Update src/screens/Onboarding.js
celian-rib Dec 13, 2022
005f597
Remove bite file
celian-rib Dec 13, 2022
92296a5
Update src/components/overlays/ReconnectingOverlay.js
celian-rib Dec 15, 2022
99b64f5
Update src/screens/BlockedUsersScreen.js
celian-rib Dec 15, 2022
64a9b32
Update src/screens/CreateDropyTextScreen.js
celian-rib Dec 15, 2022
f0667e8
Update src/screens/HomeScreen.js
celian-rib Dec 15, 2022
392585c
Update src/screens/Onboarding.js
celian-rib Dec 15, 2022
9739626
Update src/screens/ProfileEditScreen.js
celian-rib Dec 15, 2022
f2f6742
Update src/screens/SettingScreen.js
celian-rib Dec 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run lint
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ ANDROID :
- api : `http://<ip-locale-ordi>:<port-api>`
- socket: `http://<ip-locale-socket>:<port-socket>`

## Env

> .env à la racine du projet

```
SECRET_ENCRYPTION_KEY=<secret_encryption_key>

DEV_ACCOUNT_USERNAME=<username>
DEV_ACCOUNT_EMAIL=<email>
DEV_ACCOUNT_PASSWORD=<password>
```

## Release Checklist

0. `npm i` & `pod install` (IOS)
Expand Down Expand Up @@ -83,11 +95,3 @@ Depuis xcode:
6. Ajouter une attestation -> chiffrement = oui car protocol https dans l'app
7. Ajouter la build au groupe de test
8. Lancer une review TestFlight

## Env

> .env à la racine du projet

```
SECRET_ENCRYPTION_KEY=<secret_encryption_key>
```
2 changes: 1 addition & 1 deletion src/components/chat/ChatBubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Bubble = ({ isLeft, content, date, read, showDate, hourDifference }) => {
right: isLeft ? undefined : '7%',
left: isLeft ? '7%' : undefined,
}}>
{(read && !isLeft) && 'Read • '}{messageTimeString(date)}
{(read && !isLeft) && 'Lu • '}{messageTimeString(date)}
</Text>
)}
<DebugText showBoundingBox date={date}>{hourDifference}h diff | txt : [{content}]</DebugText>
Expand Down
2 changes: 1 addition & 1 deletion src/components/chat/ChatHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ChatHeader = ({ conversation, otherUserConnected, popToTopOnQuit }) => {

const handleOptionsButtonPress = () => {
showActionSheetWithOptions({
options: ['Report user', 'Block user', 'Cancel'],
options: ['Signaler', 'Bloquer ', 'Annuler'],
destructiveButtonIndex: 1,
cancelButtonIndex: 2,
title: conversation?.user?.displayName,
Expand Down
12 changes: 6 additions & 6 deletions src/components/input/FormInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@ const FormInput = (props, ref) => {
const notEmpty = value?.trim() !== '';
const emailValid = (!isEmail || EMAIL_REGEX.test(value.trim()));
if (!emailValid)
setValidityErrorMessage('This is not a valid email');
setValidityErrorMessage('Cet email n\'est pas valide');

const maxLengthValid = (!maxLength || value?.trim().length <= maxLength);
if (!maxLengthValid)
setValidityErrorMessage(`Maximum length is ${maxLength}`);
setValidityErrorMessage(`La taille max est de ${maxLength}`);

const minLengthValid = (!minLength || value?.trim().length >= minLength);
if (!minLengthValid)
setValidityErrorMessage(`Must be at least ${minLength} characters`);
setValidityErrorMessage(`Doit contenir au moins ${minLength} caractères`);

const passwordLengthValid = !isPassword || value?.trim().length >= 6;
if (!passwordLengthValid)
setValidityErrorMessage('Must be at least 6 characters');
setValidityErrorMessage('Doit contenir au moins 6 caractères');

const passwordContainsNumber = !isPassword || /\d/.test(value);
if (!passwordContainsNumber)
setValidityErrorMessage('Must contain at least one number');
setValidityErrorMessage('Doit contenir au moins un chiffre');

const passwordContainsUppercase = !isPassword || /[A-Z]/.test(value);
if (!passwordContainsUppercase)
setValidityErrorMessage('Must contain at least one uppercase letter');
setValidityErrorMessage('Doit contenir au moins une majuscule');

const inputValid = value != null && notEmpty && emailValid && maxLengthValid && minLengthValid && passwordLengthValid && passwordContainsNumber && passwordContainsUppercase;
setValid(inputValid);
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/SendMessageInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const SendMessageInput = ({ sendMessage, onFocus }) => {
<View style={styles.bottomContainer}>
<TextInput
onFocus={onFocus}
placeholder='Send a message...'
placeholder='Envoyer un message...'
placeholderTextColor={Colors.lightGrey}
style={styles.textInput}
onChangeText={(text) => setTextInputContent(text)}
Expand Down
8 changes: 4 additions & 4 deletions src/components/map/DropyMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const DropyMap = ({
if (result.error != null) {
if (result.status === 406) {
await sendAlert({
title: 'You don\'t have enough energy to retrieve this dropy',
description: 'Maybe drop something yourself to get some energy back?',
title: 'Oh non, tu es à cours d\'énergie !',
description: 'N\'attends pas, recharge la en posant un drop !',
validateText: 'Ok !',
});
return;
Expand All @@ -93,8 +93,8 @@ const DropyMap = ({
} catch (error) {
console.error('Dropy pressed error', error);
sendBottomAlert({
title: 'Oh no!',
description: 'Looks like there has been an issue while collecting this drop...\nCheck your internet connection',
title: 'Oups...',
description: 'Le drop a été perdu en chemin\nVérifie ta connexion internet',
});
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/map/DropyMapMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const DropyMapMarker = ({ dropy, onPress }) => {
ellipsizeMode='clip'
allowFontScaling={false}
style={{ ...Fonts.bold(11, Colors.grey), fontSize: 12 }}>
{dropTimeString} ago
Il y a {dropTimeString}
</Text>
</View>
) : (
Expand All @@ -65,7 +65,7 @@ const DropyMapMarker = ({ dropy, onPress }) => {
ellipsizeMode='clip'
allowFontScaling={false}
style={{ ...Fonts.bold(10, Colors.white), fontSize: 12 }}>
PICK UP
OUVRIR
</Text>
</View>
)}
Expand Down
17 changes: 9 additions & 8 deletions src/components/other/HomeScreenTabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ const HomeScreenTabBar = ({ onMuseumOpenPressed, onMuseumClosePressed, museumVis
}
if (!dropyMenuIsOpen) {
const validated = await sendAlert({
title: 'Take it easy!',
description: 'You can\'t drop at the same location twice in a row.',
validateText: 'OK !',
title: 'Mollo !',
description: 'Tu ne peux pas poser deux drops au même endroit !',
validateText: 'Ok !',
// eslint-disable-next-line no-undef
denyText: developerMode || __DEV__ ? 'DEV_ADD' : undefined,
});
setDropyMenuIsOpen(!validated);
Expand Down Expand Up @@ -179,14 +180,14 @@ const HomeScreenTabBar = ({ onMuseumOpenPressed, onMuseumClosePressed, museumVis
...styles.tabsContainer,
transform: [{ translateY: tabBarTranslateY }],
}}>
<TabBarItem text='Drops' onPress={onMuseumOpenPressed}>
<TabBarItem text='Galerie' onPress={onMuseumOpenPressed}>
<Ionicons
name='md-bookmark-outline'
size={iconsSize}
color={Colors.darkGrey}
/>
</TabBarItem>
<TabBarItem text='Chat' routeName='Conversations' showStatusDot={hasUnreadConversation}>
<TabBarItem text='Messages' routeName='Conversations' showStatusDot={hasUnreadConversation}>
<Ionicons
name='md-chatbubble-outline'
size={iconsSize}
Expand Down Expand Up @@ -301,9 +302,9 @@ const TabBarItem = ({ children, text, showStatusDot, routeName, onPress }) => {
const goToRoute = () => {
if (routeName == null) {
sendAlert({
title: 'Oups...',
description: 'Looks like you can\'t go there yet... \n This page is under construction !',
validateText: 'OK !',
title: 'Aïe...',
description: 'Cette page est encore en construction !',
validateText: 'Ok !',
});
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/components/overlays/AlertModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const styles = StyleSheet.create({
borderRadius: 20,
...Styles.hardShadows,
...Styles.center,
shadowColor: Colors.purple1,
paddingHorizontal: 18,
paddingVertical: 10,
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/overlays/ConfirmDropyOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const ConfirmDropyOverlay = ({ visible = false, onCloseOverlay: closeOverlay = (
}, 1300);
} catch (error) {
sendBottomAlert({
title: 'Oh no...',
description: 'This drop has been lost somewhere...\nCheck your internet connection!',
title: 'Oh non...',
description: 'Ton drop a été perdu en cours de route\nVérifie ta connexion internet',
});
console.error('Error while creating dropy', error?.response?.data || error);
closeOverlay();
Expand Down Expand Up @@ -152,7 +152,7 @@ const ConfirmDropyOverlay = ({ visible = false, onCloseOverlay: closeOverlay = (
</Animated.View>
<Animated.View style={{ ...styles.bottomContainer, transform: [{ scale: bottomContainerScaleAnimatedValue }] }}>
<Text style={styles.dropText}>{'It\'s time to drop this into the unkown'}</Text>
<GlassButton buttonText='DROP !' onPress={sendDrop} style={styles.dropButtonStyle} fontSize={18} />
<GlassButton buttonText="C'est parti !" onPress={sendDrop} style={styles.dropButtonStyle} fontSize={18} />
</Animated.View>
</SafeAreaView>
</Animated.View>
Expand Down
2 changes: 1 addition & 1 deletion src/components/overlays/MapLoadingOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const MapLoadingOverlay = ({ visible = true, isGeolocationPermissionGranted = fa
opacity: opacityAnimatedValue,
}}>
<AnimatedLogo />
<Text style={{ ...Fonts.bold(12, Colors.purple2) }}>{isGeolocationPermissionGranted ? 'Recherche de votre position...' : 'La géolocalisation n\'est pas autorisée'}</Text>
<Text style={{ ...Fonts.bold(12, Colors.purple2) }}>{isGeolocationPermissionGranted ? 'Recherche de ta position...' : 'La géolocalisation n\'est pas autorisée'}</Text>

{!isGeolocationPermissionGranted && (
<GlassButton onPress={() => Linking.openSettings()} buttonText={'Ouvrir les paramètres'} disabled={false} style={styles.openSettingsButton} fontSize={12} />
Expand Down
6 changes: 3 additions & 3 deletions src/components/overlays/MuseumOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const MuseumOverlay = ({ visible = false, setSelectedDropyIndex, setRetrievedDro
setSelectedDropyIndex(0);
} catch (error) {
sendAlert({
title: 'Oh no...',
description: 'We couldn\'t find your drops...\nCheck your internet connection!',
title: 'Oh non...',
description: 'Nous n\'avons pas réussi à charger les drops autour de toi...\nVérifie ta connexion internet !',
});
console.error('Error while fetching user dropies', error?.response?.data || error);
}
Expand Down Expand Up @@ -110,7 +110,7 @@ const MuseumOverlay = ({ visible = false, setSelectedDropyIndex, setRetrievedDro
color={Colors.white}
/>
<Text style={{ ...Fonts.bold(17, Colors.white), marginTop: 20, maxWidth: '60%', textAlign: 'center' }}>
{'You haven\'t found any drops yet'}
{'Tu n\'as pas encore récupéré de drops !'}
</Text>
</View>
) : (
Expand Down
4 changes: 2 additions & 2 deletions src/components/overlays/ReconnectingOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const ReconnectingOverlay = ({ visible }) => {
<View style={styles.alertContainer}>
{customUrls && <DebugUrlsMenu />}
<View style={Styles.center}>
<Text style={{ ...Fonts.bold(15, Colors.white) }}>{'Oups, we lost you...'}</Text>
<Text style={{ ...Fonts.regular(13, Colors.white), marginTop: 7 }}>{'Stay still, we\'re reconnecting!'}</Text>
<Text style={{ ...Fonts.bold(15, Colors.white) }}>{'On t\'as perdu...'}</Text>
<Text style={{ ...Fonts.regular(13, Colors.white), marginTop: 7 }}>{'Ne bouge pas, on te reconnecte !'}</Text>
</View>
<LoadingSpinner color={Colors.white} />
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/components/profile/ProfileScreenHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const ProfileScreenHeader = ({ user, scrollAnimValue, showControls = false, conv

const handleOptionsButtonPress = () => {
showActionSheetWithOptions({
options: ['Report user', 'Block user', 'Cancel'],
options: ['Signaler', 'Bloquer', 'Annuler'],
destructiveButtonIndex: 1,
cancelButtonIndex: 2,
title: `@${user?.username}`,
Expand Down
2 changes: 1 addition & 1 deletion src/components/viewSlider/DotIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const DotIndicator = ({ currentIndex, isSkippable = false, onPressSkip })
))}
{isSkippable && (
<TouchableOpacity style={styles.skipBtn} onPress={onPressSkip}>
<Text style={styles.skipText}>skip</Text>
<Text style={styles.skipText}>Passer</Text>
</TouchableOpacity>
)}
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/components/viewSlider/ViewSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const ViewSlider = ({ children, onViewIndexChanged = () => {} }, ref) => {
hitSlop={{ top: 30, bottom: 30, left: 30, right: 30 }}
>
<Text style={{ marginBottom: 10, ...Fonts.bold(13, Colors.lightGrey) }}>
I already have an account
{'J\'ai déjà un compte'}
</Text>
</TouchableOpacity>
)}
Expand All @@ -118,7 +118,7 @@ const ViewSlider = ({ children, onViewIndexChanged = () => {} }, ref) => {
hitSlop={{ top: 30, bottom: 30, left: 30, right: 30 }}
>
<Text style={{ marginBottom: 10, ...Fonts.bold(13, Colors.lightGrey) }}>
I dont have an account
{'Je n\'ai pas encore de compte'}
</Text>
</TouchableOpacity>
)}
Expand Down
25 changes: 12 additions & 13 deletions src/screens/AccountScreen.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { AntDesign } from '@expo/vector-icons';
import React from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { SafeAreaView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { responsiveWidth } from 'react-native-responsive-dimensions';
import { SafeAreaView } from 'react-native-safe-area-context';
import GoBackHeader from '../components/other/GoBackHeader';
import useOverlay from '../hooks/useOverlay';
import API from '../services/API';
Expand All @@ -14,10 +13,10 @@ const AccountScreen = ({ navigation }) => {

const handleDeleteAccount = async () => {
const confirmed = await sendAlert({
title: 'Are you sure?',
description: 'Your account and all your data will be deleted!',
denyText: 'Cancel',
validateText: 'Delete',
title: 'Attention !',
description: 'Ton compte et toutes tes données seront définitivement supprimés.',
denyText: 'Annuler',
validateText: 'Supprimer',
});

if (!confirmed)
Expand All @@ -38,39 +37,39 @@ const AccountScreen = ({ navigation }) => {
});
} catch (error) {
sendAlert({
title: 'Oh no...',
description: 'We couldn\'t delete your account..\nCheck your internet connection!',
title: 'Erreur',
description: 'Le serveur est injoignable...\nVérifie ta connexion internet',
});
console.error('Error while deleting user', error?.response?.data || error);
}
};

return (
<SafeAreaView style={styles.container}>
<GoBackHeader text='Account' />
<GoBackHeader text='Mon compte' />
<View style={styles.content}>
<TouchableOpacity style={{ ...styles.navigateContainer, marginTop: 10 }} disabled>
<Text style={{ ...Fonts.bold(12, Colors.darkGrey) }}>Subscription</Text>
<Text style={{ ...Fonts.bold(12, Colors.darkGrey) }}>Abonnement</Text>
<View style={styles.navigateArrow}>
<AntDesign name='arrowright' size={24} color={Colors.white} />
</View>
</TouchableOpacity>
<TouchableOpacity style={styles.navigateContainer} disabled>
<Text style={{ ...Fonts.bold(12, Colors.darkGrey) }}>Restore purchase</Text>
<Text style={{ ...Fonts.bold(12, Colors.darkGrey) }}>Restaurer les achats</Text>
<View style={styles.navigateArrow}>
<AntDesign name='arrowright' size={24} color={Colors.white} />
</View>
</TouchableOpacity>
<TouchableOpacity style={styles.navigateContainer} disabled>
<Text style={{ ...Fonts.bold(12, Colors.darkGrey) }}>Reset password</Text>
<Text style={{ ...Fonts.bold(12, Colors.darkGrey) }}>Changer mon mot de passe</Text>
<View style={styles.navigateArrow}>
<AntDesign name='arrowright' size={24} color={Colors.white} />
</View>
</TouchableOpacity>
</View>
<View style={styles.spacer} />
<TouchableOpacity onPress={handleDeleteAccount}>
<Text style={{ ...Fonts.regular(12, Colors.lightGrey) }}> Delete my account </Text>
<Text style={{ ...Fonts.regular(12, Colors.lightGrey) }}>Supprimer mon compte</Text>
</TouchableOpacity>
</SafeAreaView>
);
Expand Down
Loading