[FIX] SettingsView: setting up the translation system for settings

This commit is contained in:
mathysPaul
2023-10-27 23:00:03 +02:00
parent 77f0c2f06f
commit b87ec1dd44
6 changed files with 219 additions and 54 deletions
+171
View File
@@ -150,6 +150,63 @@ export const en = {
passwordUpdated: 'Password updated', passwordUpdated: 'Password updated',
emailUpdated: 'Email updated', emailUpdated: 'Email updated',
//Settings
// Profile Tab
settingsProfileTabGoogleSectionTitle: 'Google account',
settingsProfileTabGoogleSectionDescription: 'Link your Google account to ChromaCase',
settingsProfileTabGoogleSectionLinkedText: 'Linked',
settingsProfileTabGoogleSectionNotLinkedText: 'Not linked',
settingsProfileTabVerifiedSectionTitle: 'Verified',
settingsProfileTabVerifiedSectionDescription: 'Verify your email address',
settingsProfileTabVerifiedSectionVerifiedText: 'verified',
settingsProfileTabVerifiedSectionNotVerifiedText: 'not verified',
settingsProfileTabVerifiedSectionVerificationToast: 'Verification mail sent',
settingsProfileTabVerifiedSectionVerificationToastError: 'Verification mail send error',
settingsProfileTabAvatarSectionTitle: 'Avatar',
settingsProfileTabAvatarSectionDescription: 'Change your profile picture',
settingsProfileTabAvatarSectionChangeItText: 'Change It',
settingsProfileTabAvatarSectionUpdateToast: 'Update successful',
settingsProfileTabAvatarSectionUpdateToastError: 'Update failed',
settingsProfileTabChangeEmailSectionTitle: 'Change email',
settingsProfileTabChangeEmailSectionDescription: 'Enter your current email and set your new email',
settingsProfileTabChangePasswordSectionTitle: 'Change password',
settingsProfileTabChangePasswordSectionDescription: 'Enter your current password and set your new password',
// Premium Tab
settingsPremiumTabPremiumAccountSectionTitle: 'Premium account',
settingsPremiumTabPremiumAccountSectionDescription: 'Premium customization and tools to take you to the next level',
settingsPremiumTabPianoMagiqueSectionTitle: 'Magic Piano',
settingsPremiumTabPianoMagiqueSectionDescription: 'Brings light to the piano during games',
settingsPremiumTabPianoMagiqueSectionHelper: 'You must own the Chromacase light module to use this feature',
settingsPremiumTabThemePianoSectionTitle: 'Piano Theme',
settingsPremiumTabThemePianoSectionDescription: 'Set your piano theme',
// Preferences Tab
SettingsPreferencesTabThemeSectionTitle: 'Theme',
SettingsPreferencesTabThemeSectionDescription: 'Set the theme (Dark or Light) of your application',
SettingsPreferencesTabLanguageSectionTitle: 'Language',
SettingsPreferencesTabLanguageSectionDescription: 'Set the language of your application',
SettingsPreferencesTabDifficultySectionTitle: 'Difficulty',
SettingsPreferencesTabDifficultySectionDescription: 'The precision of the tempo increases',
SettingsPreferencesTabColorblindModeSectionTitle: 'Colorblind Mode',
SettingsPreferencesTabColorblindModeSectionDescription: 'Increases contrast',
SettingsPreferencesTabMicVolumeSectionTitle: 'Mic Volume',
SettingsPreferencesTabMicVolumeSectionDescription: 'Adjust the volume of your microphone according to your preference',
// Notifications Tab
SettingsNotificationsTabPushNotificationsSectionTitle: 'Push Notifications',
SettingsNotificationsTabPushNotificationsSectionDescription: 'This notification will appear on your device as a pop-up',
SettingsNotificationsTabEmailNotificationsSectionTitle: 'Email',
SettingsNotificationsTabEmailNotificationsSectionDescription: 'Receive emails to reach your goals',
SettingsNotificationsTabTrainingReminderSectionTitle: 'Training Reminder',
SettingsNotificationsTabTrainingReminderSectionDescription: 'Regular training is the key',
SettingsNotificationsTabReleaseAlertSectionTitle: 'New Release Alerts',
SettingsNotificationsTabReleaseAlertSectionDescription: 'Stay informed of our updates',
// Privacy Tab
SettingsPrivacyTabDataCollectionSectionTitle: 'Data Collection',
SettingsPrivacyTabDataCollectionSectionDescription: 'Do you accept the collection of your data for the improvement of Chromacase?',
SettingsPrivacyTabCustomAdsSectionTitle: 'Customized Ads',
SettingsPrivacyTabCustomAdsSectionDescription: 'Display suggestions in the recommendations section',
SettingsPrivacyTabRecommendationsSectionTitle: 'Recommendations',
SettingsPrivacyTabRecommendationsSectionDescription: 'Would you like to receive our advice and recommendations?',
SettingsCategoryProfile: 'Profile', SettingsCategoryProfile: 'Profile',
SettingsCategoryPreferences: 'Preferences', SettingsCategoryPreferences: 'Preferences',
SettingsCategoryNotifications: 'Notifications', SettingsCategoryNotifications: 'Notifications',
@@ -348,6 +405,63 @@ export const fr: typeof en = {
passwordUpdated: 'Mot de passe mis à jour', passwordUpdated: 'Mot de passe mis à jour',
emailUpdated: 'Email mis à jour', emailUpdated: 'Email mis à jour',
//Settings
// Profile Tab
settingsProfileTabGoogleSectionTitle: 'Compte Google',
settingsProfileTabGoogleSectionDescription: 'Liez votre compte Google à ChromaCase',
settingsProfileTabGoogleSectionLinkedText: 'Lié',
settingsProfileTabGoogleSectionNotLinkedText: 'Non lié',
settingsProfileTabVerifiedSectionTitle: 'Vérifié',
settingsProfileTabVerifiedSectionDescription: 'Vérifiez votre adresse e-mail',
settingsProfileTabVerifiedSectionVerifiedText: 'vérifié',
settingsProfileTabVerifiedSectionNotVerifiedText: 'non vérifié',
settingsProfileTabVerifiedSectionVerificationToast: 'Courrier de vérification envoyé',
settingsProfileTabVerifiedSectionVerificationToastError: 'Erreur d\'envoi du courrier de vérification',
settingsProfileTabAvatarSectionTitle: 'Avatar',
settingsProfileTabAvatarSectionDescription: 'Changez votre photo de profil',
settingsProfileTabAvatarSectionChangeItText: 'Modifier',
settingsProfileTabAvatarSectionUpdateToast: 'Mise à jour réussie',
settingsProfileTabAvatarSectionUpdateToastError: 'Échec de la mise à jour',
settingsProfileTabChangeEmailSectionTitle: 'Changer l\'email',
settingsProfileTabChangeEmailSectionDescription: 'Saisissez votre adresse électronique actuelle et définissez votre nouvelle adresse électronique',
settingsProfileTabChangePasswordSectionTitle: 'Changer le mot de passe',
settingsProfileTabChangePasswordSectionDescription: 'Saisissez votre mot de passe actuel et définissez votre nouveau mot de passe',
// Premium Tab
settingsPremiumTabPremiumAccountSectionTitle: 'Compte premium',
settingsPremiumTabPremiumAccountSectionDescription: 'Personnalisation premium et outils vous permettant de passer au niveau supérieur',
settingsPremiumTabPianoMagiqueSectionTitle: 'Piano Magique',
settingsPremiumTabPianoMagiqueSectionDescription: 'Fait apparaître de la lumière sur le piano pendant les parties',
settingsPremiumTabPianoMagiqueSectionHelper: 'Vous devez posséder le module physique lumineux Chromacase pour pouvoir utiliser cette fonctionnalité',
settingsPremiumTabThemePianoSectionTitle: 'Thème de piano',
settingsPremiumTabThemePianoSectionDescription: 'Définissez le thème de votre piano',
// Preferences Tab
SettingsPreferencesTabThemeSectionTitle: 'Thème',
SettingsPreferencesTabThemeSectionDescription: 'Définissez le thème (Sombre ou Clair) de votre application',
SettingsPreferencesTabLanguageSectionTitle: 'Langue',
SettingsPreferencesTabLanguageSectionDescription: 'Définissez la langue de votre application',
SettingsPreferencesTabDifficultySectionTitle: 'Difficulté',
SettingsPreferencesTabDifficultySectionDescription: 'La précision du tempo est de plus en plus élevée',
SettingsPreferencesTabColorblindModeSectionTitle: 'Mode daltonien',
SettingsPreferencesTabColorblindModeSectionDescription: 'Augmente le contraste',
SettingsPreferencesTabMicVolumeSectionTitle: 'Volume du micro',
SettingsPreferencesTabMicVolumeSectionDescription: 'Réglez le volume de votre micro selon vos préférences',
// Notifications Tab
SettingsNotificationsTabPushNotificationsSectionTitle: 'Notifications push',
SettingsNotificationsTabPushNotificationsSectionDescription: 'Cette notification apparaîtra sur votre appareil en pop-up',
SettingsNotificationsTabEmailNotificationsSectionTitle: 'Email',
SettingsNotificationsTabEmailNotificationsSectionDescription: 'Recevez des mails pour atteindre vos objectifs',
SettingsNotificationsTabTrainingReminderSectionTitle: 'Rappel d\'entraînement',
SettingsNotificationsTabTrainingReminderSectionDescription: 'Un apprentissage régulier est la clé',
SettingsNotificationsTabReleaseAlertSectionTitle: 'Alertes de nouvelles sorties',
SettingsNotificationsTabReleaseAlertSectionDescription: 'Restez informé de nos mises à jour',
// Privacy Tab
SettingsPrivacyTabDataCollectionSectionTitle: 'Collecte de données',
SettingsPrivacyTabDataCollectionSectionDescription: 'Acceptez-vous la récupération de vos données pour l\'amélioration de Chromacase ?',
SettingsPrivacyTabCustomAdsSectionTitle: 'Publicités personnalisées',
SettingsPrivacyTabCustomAdsSectionDescription: 'Afficher les suggestions dans la section des recommandations',
SettingsPrivacyTabRecommendationsSectionTitle: 'Recommandations',
SettingsPrivacyTabRecommendationsSectionDescription: 'Souhaitez-vous recevoir nos conseils et recommandations ?',
SettingsCategoryProfile: 'Profil', SettingsCategoryProfile: 'Profil',
SettingsCategoryPreferences: 'Préférences', SettingsCategoryPreferences: 'Préférences',
SettingsCategoryNotifications: 'Notifications', SettingsCategoryNotifications: 'Notifications',
@@ -549,6 +663,63 @@ export const sp: typeof en = {
passwordUpdated: 'Contraseña actualizada', passwordUpdated: 'Contraseña actualizada',
emailUpdated: 'Email actualizado', emailUpdated: 'Email actualizado',
//Settings
// Profile Tab
settingsProfileTabGoogleSectionTitle: 'Cuenta de Google',
settingsProfileTabGoogleSectionDescription: 'Vincula tu cuenta de Google con ChromaCase',
settingsProfileTabGoogleSectionLinkedText: 'Vinculado',
settingsProfileTabGoogleSectionNotLinkedText: 'No vinculado',
settingsProfileTabVerifiedSectionTitle: 'Verificado',
settingsProfileTabVerifiedSectionDescription: 'Verifica tu dirección de correo electrónico',
settingsProfileTabVerifiedSectionVerifiedText: 'verificado',
settingsProfileTabVerifiedSectionNotVerifiedText: 'no verificado',
settingsProfileTabVerifiedSectionVerificationToast: 'Correo de verificación enviado',
settingsProfileTabVerifiedSectionVerificationToastError: 'Error de envío del correo de verificación',
settingsProfileTabAvatarSectionTitle: 'Avatar',
settingsProfileTabAvatarSectionDescription: 'Cambia tu foto de perfil',
settingsProfileTabAvatarSectionChangeItText: 'Cambiar',
settingsProfileTabAvatarSectionUpdateToast: 'Actualización correcta',
settingsProfileTabAvatarSectionUpdateToastError: 'Actualización fallida',
settingsProfileTabChangeEmailSectionTitle: 'Cambiar correo electrónico',
settingsProfileTabChangeEmailSectionDescription: 'Introduce tu correo electrónico actual y establece tu nuevo correo electrónico',
settingsProfileTabChangePasswordSectionTitle: 'Cambiar contraseña',
settingsProfileTabChangePasswordSectionDescription: 'Introduce tu contraseña actual y establece tu nueva contraseña',
// Premium Tab
settingsPremiumTabPremiumAccountSectionTitle: 'Cuenta premium',
settingsPremiumTabPremiumAccountSectionDescription: 'Personalización premium y herramientas para llevarte al siguiente nivel',
settingsPremiumTabPianoMagiqueSectionTitle: 'Piano Mágico',
settingsPremiumTabPianoMagiqueSectionDescription: 'Hace aparecer luz en el piano durante los juegos',
settingsPremiumTabPianoMagiqueSectionHelper: 'Debes poseer el módulo de luz Chromacase para usar esta función',
settingsPremiumTabThemePianoSectionTitle: 'Tema de piano',
settingsPremiumTabThemePianoSectionDescription: 'Establece el tema de tu piano',
// Preferences Tab
SettingsPreferencesTabThemeSectionTitle: 'Tema',
SettingsPreferencesTabThemeSectionDescription: 'Establece el tema (Oscuro o Claro) de tu aplicación',
SettingsPreferencesTabLanguageSectionTitle: 'Idioma',
SettingsPreferencesTabLanguageSectionDescription: 'Establece el idioma de tu aplicación',
SettingsPreferencesTabDifficultySectionTitle: 'Dificultad',
SettingsPreferencesTabDifficultySectionDescription: 'La precisión del tempo aumenta',
SettingsPreferencesTabColorblindModeSectionTitle: 'Modo para daltónicos',
SettingsPreferencesTabColorblindModeSectionDescription: 'Aumenta el contraste',
SettingsPreferencesTabMicVolumeSectionTitle: 'Volumen del micrófono',
SettingsPreferencesTabMicVolumeSectionDescription: 'Ajusta el volumen de tu micrófono según tus preferencias',
// Notifications Tab
SettingsNotificationsTabPushNotificationsSectionTitle: 'Notificaciones push',
SettingsNotificationsTabPushNotificationsSectionDescription: 'Esta notificación aparecerá en tu dispositivo como un pop-up',
SettingsNotificationsTabEmailNotificationsSectionTitle: 'Correo electrónico',
SettingsNotificationsTabEmailNotificationsSectionDescription: 'Recibe correos electrónicos para alcanzar tus objetivos',
SettingsNotificationsTabTrainingReminderSectionTitle: 'Recordatorio de entrenamiento',
SettingsNotificationsTabTrainingReminderSectionDescription: 'El entrenamiento regular es la clave',
SettingsNotificationsTabReleaseAlertSectionTitle: 'Alertas de nuevos lanzamientos',
SettingsNotificationsTabReleaseAlertSectionDescription: 'Mantente informado de nuestras actualizaciones',
// Privacy Tab
SettingsPrivacyTabDataCollectionSectionTitle: 'Recolección de datos',
SettingsPrivacyTabDataCollectionSectionDescription: '¿Aceptas la recopilación de tus datos para la mejora de Chromacase?',
SettingsPrivacyTabCustomAdsSectionTitle: 'Anuncios personalizados',
SettingsPrivacyTabCustomAdsSectionDescription: 'Muestra sugerencias en la sección de recomendaciones',
SettingsPrivacyTabRecommendationsSectionTitle: 'Recomendaciones',
SettingsPrivacyTabRecommendationsSectionDescription: '¿Deseas recibir nuestros consejos y recomendaciones?',
SettingsCategoryProfile: 'Perfil', SettingsCategoryProfile: 'Perfil',
SettingsCategoryPreferences: 'Preferencias', SettingsCategoryPreferences: 'Preferencias',
SettingsCategoryNotifications: 'Notificaciones', SettingsCategoryNotifications: 'Notificaciones',
@@ -22,8 +22,8 @@ const NotificationsSettings = () => {
{ {
type: 'toggle', type: 'toggle',
icon: <MonitorMobbile size="24" color={color} style={{ minWidth: 24 }} />, icon: <MonitorMobbile size="24" color={color} style={{ minWidth: 24 }} />,
title: translate('SettingsNotificationsPushNotifications'), title: translate('SettingsNotificationsTabPushNotificationsSectionTitle'),
description: 'Cette notification apparaitra sur votre apparail en pop-up', description: translate('SettingsNotificationsTabPushNotificationsSectionDescription'),
data: { data: {
value: settings.data.notifications.pushNotif, value: settings.data.notifications.pushNotif,
onToggle: () => { onToggle: () => {
@@ -38,8 +38,8 @@ const NotificationsSettings = () => {
{ {
type: 'toggle', type: 'toggle',
icon: <Send2 size="24" color={color} style={{ minWidth: 24 }} />, icon: <Send2 size="24" color={color} style={{ minWidth: 24 }} />,
title: translate('SettingsNotificationsEmailNotifications'), title: translate('SettingsNotificationsTabEmailNotificationsSectionTitle'),
description: 'Recevez des mails pour atteindre vos objectifs', description: translate('SettingsNotificationsTabEmailNotificationsSectionDescription'),
data: { data: {
value: settings.data.notifications.emailNotif, value: settings.data.notifications.emailNotif,
onToggle: () => { onToggle: () => {
@@ -54,8 +54,8 @@ const NotificationsSettings = () => {
{ {
type: 'toggle', type: 'toggle',
icon: <Calendar1 size="24" color={color} style={{ minWidth: 24 }} />, icon: <Calendar1 size="24" color={color} style={{ minWidth: 24 }} />,
title: translate('SettingsNotificationsTrainingReminder'), title: translate('SettingsNotificationsTabTrainingReminderSectionTitle'),
description: 'Un apprentissage régulier est la clé', description: translate('SettingsNotificationsTabTrainingReminderSectionDescription'),
data: { data: {
value: settings.data.notifications.trainNotif, value: settings.data.notifications.trainNotif,
onToggle: () => { onToggle: () => {
@@ -70,8 +70,8 @@ const NotificationsSettings = () => {
{ {
type: 'toggle', type: 'toggle',
icon: <Warning2 size="24" color={color} style={{ minWidth: 24 }} />, icon: <Warning2 size="24" color={color} style={{ minWidth: 24 }} />,
title: translate('SettingsNotificationsReleaseAlert'), title: translate('SettingsNotificationsTabReleaseAlertSectionTitle'),
description: 'Restez informé de nos mises à jour', description: translate('SettingsNotificationsTabReleaseAlertSectionDescription'),
data: { data: {
value: settings.data.notifications.newSongNotif, value: settings.data.notifications.newSongNotif,
onToggle: () => { onToggle: () => {
+10 -10
View File
@@ -23,8 +23,8 @@ const PreferencesSettings = () => {
{ {
icon: <Brush2 size="24" color={color} style={{ minWidth: 24 }} />, icon: <Brush2 size="24" color={color} style={{ minWidth: 24 }} />,
type: 'dropdown', type: 'dropdown',
title: translate('SettingsPreferencesTheme'), title: translate('SettingsPreferencesTabThemeSectionTitle'),
description: 'Définissez le theme (Dark ou Light) de votre application', description: translate('SettingsPreferencesTabThemeSectionDescription'),
data: { data: {
value: settings.colorScheme, value: settings.colorScheme,
defaultValue: 'system', defaultValue: 'system',
@@ -45,8 +45,8 @@ const PreferencesSettings = () => {
{ {
icon: <LanguageSquare size="24" color={color} style={{ minWidth: 24 }} />, icon: <LanguageSquare size="24" color={color} style={{ minWidth: 24 }} />,
type: 'dropdown', type: 'dropdown',
title: translate('SettingsPreferencesLanguage'), title: translate('SettingsPreferencesTabLanguageSectionTitle'),
description: 'Définissez la langue de votre application', description: translate('SettingsPreferencesTabLanguageSectionDescription'),
data: { data: {
value: language, value: language,
defaultValue: DefaultLanguage, defaultValue: DefaultLanguage,
@@ -63,8 +63,8 @@ const PreferencesSettings = () => {
{ {
icon: <Rank size="24" color={color} style={{ minWidth: 24 }} />, icon: <Rank size="24" color={color} style={{ minWidth: 24 }} />,
type: 'dropdown', type: 'dropdown',
title: translate('SettingsPreferencesDifficulty'), title: translate('SettingsPreferencesTabDifficultySectionTitle'),
description: 'La précision du tempo est de plus en plus élevée', description: translate('SettingsPreferencesTabDifficultySectionDescription'),
data: { data: {
value: settings.difficulty, value: settings.difficulty,
defaultValue: 'medium', defaultValue: 'medium',
@@ -89,8 +89,8 @@ const PreferencesSettings = () => {
{ {
icon: <Colorfilter size="24" color={color} style={{ minWidth: 24 }} />, icon: <Colorfilter size="24" color={color} style={{ minWidth: 24 }} />,
type: 'toggle', type: 'toggle',
title: translate('SettingsPreferencesColorblindMode'), title: translate('SettingsPreferencesTabColorblindModeSectionTitle'),
description: 'Augmente le contraste', description: translate('SettingsPreferencesTabColorblindModeSectionDescription'),
data: { data: {
value: settings.colorBlind, value: settings.colorBlind,
onToggle: () => { onToggle: () => {
@@ -105,8 +105,8 @@ const PreferencesSettings = () => {
{ {
icon: <Sound size="24" color={color} style={{ minWidth: 24 }} />, icon: <Sound size="24" color={color} style={{ minWidth: 24 }} />,
type: 'range', type: 'range',
title: translate('SettingsPreferencesMicVolume'), title: translate('SettingsPreferencesTabMicVolumeSectionTitle'),
description: 'Régler le volume de votre micro selon vos preference', description: translate('SettingsPreferencesTabMicVolumeSectionDescription'),
data: { data: {
value: settings.micVolume, value: settings.micVolume,
min: 0, min: 0,
+6 -7
View File
@@ -27,9 +27,8 @@ const PrivacySettings = () => {
{ {
type: 'toggle', type: 'toggle',
icon: <Driver size="24" color={color} style={{ minWidth: 24 }} />, icon: <Driver size="24" color={color} style={{ minWidth: 24 }} />,
title: translate('dataCollection'), title: translate('SettingsPrivacyTabDataCollectionSectionTitle'),
description: description: translate('SettingsPrivacyTabDataCollectionSectionDescription'),
"Acceptez-vous la récupération de vos données pour l'amélioration de Chromacase ?",
data: { data: {
value: settings.dataCollection, value: settings.dataCollection,
onToggle: () => onToggle: () =>
@@ -41,8 +40,8 @@ const PrivacySettings = () => {
{ {
type: 'toggle', type: 'toggle',
icon: <Shop size="24" color={color} style={{ minWidth: 24 }} />, icon: <Shop size="24" color={color} style={{ minWidth: 24 }} />,
title: translate('customAds'), title: translate('SettingsPrivacyTabCustomAdsSectionTitle'),
description: 'Afficher les suggestions dans la section des recommandations', description: translate('SettingsPrivacyTabCustomAdsSectionDescription'),
data: { data: {
value: settings.customAds, value: settings.customAds,
onToggle: () => onToggle: () =>
@@ -52,8 +51,8 @@ const PrivacySettings = () => {
{ {
type: 'toggle', type: 'toggle',
icon: <Like1 size="24" color={color} style={{ minWidth: 24 }} />, icon: <Like1 size="24" color={color} style={{ minWidth: 24 }} />,
title: translate('recommendations'), title: translate('SettingsPrivacyTabRecommendationsSectionTitle'),
description: 'Souhaitez-vous recevoir nos conseils et recommandations ?', description: translate('SettingsPrivacyTabRecommendationsSectionDescription'),
data: { data: {
value: userSettings.data.recommendations, value: userSettings.data.recommendations,
onToggle: () => onToggle: () =>
+7 -10
View File
@@ -26,9 +26,8 @@ const PremiumSettings = () => {
{ {
icon: <Star1 size="24" color={color} style={{ minWidth: 24 }} />, icon: <Star1 size="24" color={color} style={{ minWidth: 24 }} />,
type: 'text', type: 'text',
title: translate('premiumAccount'), title: translate('settingsPremiumTabPremiumAccountSectionTitle'),
description: description: translate('settingsPremiumTabPremiumAccountSectionDescription'),
'Personalisation premium et outils vous permetant de passer au niveau supperieur',
data: { data: {
text: translate(user.premium ? 'yes' : 'no'), text: translate(user.premium ? 'yes' : 'no'),
}, },
@@ -36,11 +35,9 @@ const PremiumSettings = () => {
{ {
icon: <Magicpen size="24" color={color} style={{ minWidth: 24 }} />, icon: <Magicpen size="24" color={color} style={{ minWidth: 24 }} />,
type: 'toggle', type: 'toggle',
title: 'Piano Magique', title: translate('settingsPremiumTabPianoMagiqueSectionTitle'),
description: description: translate('settingsPremiumTabPianoMagiqueSectionDescription'),
'Fait apparaître de la lumière sur le piano pendant les parties', helperText: translate('settingsPremiumTabPianoMagiqueSectionHelper'),
helperText:
'Vous devez posséder le module physique lumineux Chromacase pour pouvoir utiliser cette fonctionnalité',
disabled: true, disabled: true,
data: { data: {
value: false, value: false,
@@ -50,8 +47,8 @@ const PremiumSettings = () => {
{ {
icon: <Designtools size="24" color={color} style={{ minWidth: 24 }} />, icon: <Designtools size="24" color={color} style={{ minWidth: 24 }} />,
type: 'dropdown', type: 'dropdown',
title: 'Thème de piano', title: translate('settingsPremiumTabThemePianoSectionTitle'),
description: 'Définissez le theme de votre piano', description: translate('settingsPremiumTabThemePianoSectionDescription'),
disabled: true, disabled: true,
data: { data: {
value: 'default', value: 'default',
+17 -19
View File
@@ -42,32 +42,32 @@ const ProfileSettings = () => {
{ {
icon: <Google size="24" color={color} style={{ minWidth: 24 }} />, icon: <Google size="24" color={color} style={{ minWidth: 24 }} />,
type: 'text', type: 'text',
title: 'Google account', // TODO translate title: translate('settingsProfileTabGoogleSectionTitle'),
description: 'Liez votre compte Google à ChromaCase', // TODO translate description: translate('settingsProfileTabGoogleSectionDescription'),
data: { data: {
text: user.googleID ? 'Linked' : 'Not linked', text: translate(user.googleID ? 'settingsProfileTabGoogleSectionLinkedText' : 'settingsProfileTabGoogleSectionNotLinkedText')
}, },
}, },
{ {
icon: <Verify size="24" color={color} style={{ minWidth: 24 }} />, icon: <Verify size="24" color={color} style={{ minWidth: 24 }} />,
type: 'text', type: 'text',
description: 'Vérifiez votre adresse e-mail', // TODO translate title: translate('settingsProfileTabVerifiedSectionTitle'),
title: translate('verified'), description: translate('settingsProfileTabVerifiedSectionDescription'),
data: { data: {
text: user.emailVerified ? 'verified' : 'not verified', text: translate(user.emailVerified ? 'settingsProfileTabVerifiedSectionVerifiedText' : 'settingsProfileTabVerifiedSectionNotVerifiedText'),
onPress: user.emailVerified onPress: user.emailVerified
? undefined ? undefined
: () => : () =>
API.fetch({ route: '/auth/reverify', method: 'PUT' }) API.fetch({ route: '/auth/reverify', method: 'PUT' })
.then(() => .then(() =>
Toast.show({ Toast.show({
description: 'Verification mail sent', description: translate('settingsProfileTabVerifiedSectionVerificationToast')
}) })
) )
.catch((e) => { .catch((e) => {
console.error(e); console.error(e);
Toast.show({ Toast.show({
description: 'Verification mail send error', description: translate('settingsProfileTabVerifiedSectionVerificationToastError')
}); });
}), }),
}, },
@@ -75,10 +75,10 @@ const ProfileSettings = () => {
{ {
icon: <UserSquare size="24" color={color} style={{ minWidth: 24 }} />, icon: <UserSquare size="24" color={color} style={{ minWidth: 24 }} />,
type: 'text', type: 'text',
title: translate('avatar'), title: translate('settingsProfileTabAvatarSectionTitle'),
description: 'Changer votre photo de profile', // TODO translate description: translate('settingsProfileTabAvatarSectionDescription'),
data: { data: {
text: translate('changeIt'), text: translate('settingsProfileTabAvatarSectionChangeItText'),
onPress: () => { onPress: () => {
ImagePicker.launchImageLibraryAsync({ ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images, mediaTypes: ImagePicker.MediaTypeOptions.Images,
@@ -94,12 +94,12 @@ const ProfileSettings = () => {
.then(() => { .then(() => {
userQuery.refetch(); userQuery.refetch();
Toast.show({ Toast.show({
description: 'Update successful', description: translate('settingsProfileTabAvatarSectionUpdateToast'),
}); });
}) })
.catch((e) => { .catch((e) => {
console.error(e); console.error(e);
Toast.show({ description: 'Update failed' }); Toast.show({ description: translate('settingsProfileTabAvatarSectionUpdateToastError')});
}); });
} }
}); });
@@ -109,9 +109,8 @@ const ProfileSettings = () => {
{ {
icon: <SmsEdit size="24" color={color} style={{ minWidth: 24 }} />, icon: <SmsEdit size="24" color={color} style={{ minWidth: 24 }} />,
type: 'sectionDropdown', type: 'sectionDropdown',
title: 'Change email', // TODO translate title: translate('settingsProfileTabChangeEmailSectionTitle'),
description: description: translate('settingsProfileTabChangeEmailSectionDescription'),
'Saisissez votre adresse électronique actuelle et définissez votre nouvelle adresse électroniquetion', // TODO translate
data: { data: {
value: true, value: true,
section: [ section: [
@@ -125,9 +124,8 @@ const ProfileSettings = () => {
{ {
icon: <PasswordCheck size="24" color={color} style={{ minWidth: 24 }} />, icon: <PasswordCheck size="24" color={color} style={{ minWidth: 24 }} />,
type: 'sectionDropdown', type: 'sectionDropdown',
title: 'Change password', // TODO translate title: translate('settingsProfileTabChangePasswordSectionTitle'),
description: description: translate('settingsProfileTabChangePasswordSectionDescription'),
'Saisissez votre mot de passe actuel et définissez votre nouveau mot de passe', // TODO translate
data: { data: {
value: true, value: true,
section: [ section: [