From 6cc70903603bd958c43732b540e8f05f0130559e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Wed, 5 Apr 2023 01:35:03 +0200 Subject: [PATCH] translated Settings categories names and added icons --- .../components/navigators/TabRowNavigator.tsx | 1 - front/i18n/Translations.ts | 26 +++++++++ front/views/settings/SettingsView.tsx | 57 ++++++++++++++++--- 3 files changed, 75 insertions(+), 9 deletions(-) diff --git a/front/components/navigators/TabRowNavigator.tsx b/front/components/navigators/TabRowNavigator.tsx index be6c900..87b70bd 100644 --- a/front/components/navigators/TabRowNavigator.tsx +++ b/front/components/navigators/TabRowNavigator.tsx @@ -169,7 +169,6 @@ function TabNavigator({ as={options.iconProvider} name={options.iconName} size="xl" - borderRadius="full" /> ) : undefined } diff --git a/front/i18n/Translations.ts b/front/i18n/Translations.ts index da8e797..7db1f6b 100644 --- a/front/i18n/Translations.ts +++ b/front/i18n/Translations.ts @@ -110,6 +110,15 @@ export const en = { passwordUpdated: 'Password updated', emailUpdated: 'Email updated', + + SettingsCategoryProfile: 'Profile', + SettingsCategoryPreferences: 'Preferences', + SettingsCategoryNotifications: 'Notifications', + SettingsCategoryPrivacy: 'Privacy', + SettingsCategorySecurity: 'Security', + SettingsCategoryEmail: 'Email', + SettingsCategoryGoogle: 'Google', + SettingsCategoryPiano: 'Piano', }; export const fr: typeof en = { @@ -220,6 +229,15 @@ export const fr: typeof en = { passwordUpdated: 'Mot de passe mis à jour', emailUpdated: 'Email mis à jour', + + SettingsCategoryProfile: 'Profil', + SettingsCategoryPreferences: 'Préférences', + SettingsCategoryNotifications: 'Notifications', + SettingsCategoryPrivacy: 'Confidentialité', + SettingsCategorySecurity: 'Sécurité', + SettingsCategoryEmail: 'Email', + SettingsCategoryGoogle: 'Google', + SettingsCategoryPiano: 'Piano', }; export const sp: typeof en = { @@ -334,4 +352,12 @@ export const sp: typeof en = { passwordUpdated: 'Contraseña actualizada', emailUpdated: 'Email actualizado', + + SettingsCategoryProfile: 'Perfil', + SettingsCategoryPreferences: 'Preferencias', + SettingsCategoryNotifications: 'Notificaciones', + SettingsCategoryPrivacy: 'Privacidad', + SettingsCategorySecurity: 'Seguridad', + SettingsCategoryEmail: 'Email', + SettingsCategoryGoogle: 'Google', }; \ No newline at end of file diff --git a/front/views/settings/SettingsView.tsx b/front/views/settings/SettingsView.tsx index ad8dd7f..7251a10 100644 --- a/front/views/settings/SettingsView.tsx +++ b/front/views/settings/SettingsView.tsx @@ -10,7 +10,7 @@ import { SettingsState, updateSettings } from '../../state/SettingsSlice'; import { AvailableLanguages, translate, Translate } from "../../i18n/i18n"; import TextButton from '../../components/TextButton'; import createTabRowNavigator from '../../components/navigators/TabRowNavigator'; -import { FontAwesome } from '@expo/vector-icons'; +import { FontAwesome, MaterialCommunityIcons, FontAwesome5 } from '@expo/vector-icons'; import ChangePasswordForm from '../../components/forms/changePasswordForm'; import ChangeEmailForm from '../../components/forms/changeEmailForm'; import ProfileSettings from './SettingsProfileView'; @@ -246,6 +246,14 @@ export const GoogleAccountView = ({navigation}) => { ) } +export const PianoSettingsView = ({navigation}) => { + return ( +
+ Global settings for the virtual piano +
+ ) +} + const TabRow = createTabRowNavigator(); const SetttingsNavigator = () => { @@ -254,13 +262,46 @@ const SetttingsNavigator = () => { {/* I'm doing this to be able to land on the summary of settings when clicking on settings and directly to the wanted settings page if needed so I need to do special work with the 0 index */} - - - - - - - + + + + + + + + ) }