From 8ee5055ffc952352a6be5e6b77090ec6f59c6f59 Mon Sep 17 00:00:00 2001 From: rem Date: Thu, 21 Dec 2023 22:04:44 +0100 Subject: [PATCH] translate view/profile --- .../profile_view_allplatforme.dart | 4 ++-- lib/view/profile/contact_us_view.dart | 15 ++++++------- .../profile/mobile/mobile_change_email.dart | 8 +++---- .../mobile/mobile_change_password.dart | 10 ++++----- .../mobile/mobile_change_username.dart | 8 +++---- .../profile/mobile/mobile_profile_view.dart | 14 +++++------- lib/view/profile/policy_view.dart | 22 +++++++++---------- lib/view/profile/web/web_change_email.dart | 8 +++---- lib/view/profile/web/web_change_password.dart | 10 ++++----- lib/view/profile/web/web_change_username.dart | 8 +++---- lib/view/profile/web/web_profile_view.dart | 18 +++++---------- 11 files changed, 56 insertions(+), 69 deletions(-) diff --git a/lib/view/profile/all_platforme/profile_view_allplatforme.dart b/lib/view/profile/all_platforme/profile_view_allplatforme.dart index 98dcfd6..32e2219 100644 --- a/lib/view/profile/all_platforme/profile_view_allplatforme.dart +++ b/lib/view/profile/all_platforme/profile_view_allplatforme.dart @@ -112,7 +112,7 @@ class _ProfileViewAllPlatforme extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8))), onPressed: logOff, - child: const Text('Déconnexion', + child: const Text('Log out', style: TextStyle(color: Colors.black)), ), const SizedBox( @@ -124,7 +124,7 @@ class _ProfileViewAllPlatforme extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8))), onPressed: deleteUser, - child: const Text('Supprimer son compte', + child: const Text('Delete your account', style: TextStyle(color: Colors.black)), ), ], diff --git a/lib/view/profile/contact_us_view.dart b/lib/view/profile/contact_us_view.dart index 4ad2003..8d41d29 100644 --- a/lib/view/profile/contact_us_view.dart +++ b/lib/view/profile/contact_us_view.dart @@ -35,7 +35,7 @@ class ContactUsView extends StatelessWidget { ), ), title: Text( - "Nous Contacter", + "Contact us", style: TextStyle( color: TColor.black, fontSize: 16, @@ -50,17 +50,16 @@ class ContactUsView extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - SizedBox(height: media.width * 0.02), const Text( - "Vous pouvez nous contacter pour toute question, suggestion ou problème concernant notre application SmartFit.", + "You can contact us with any questions, suggestions or issues regarding our SmartFit app.", style: TextStyle( fontSize: 16, ), ), SizedBox(height: media.width * 0.05), const Text( - "Adresse e-mail", + "Email address", style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, @@ -74,7 +73,7 @@ class ContactUsView extends StatelessWidget { ), SizedBox(height: media.width * 0.02), const Text( - "Téléphone", + "Phone", style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, @@ -88,7 +87,7 @@ class ContactUsView extends StatelessWidget { ), SizedBox(height: media.width * 0.02), const Text( - "Adresse", + "Address", style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, @@ -102,14 +101,14 @@ class ContactUsView extends StatelessWidget { ), SizedBox(height: media.width * 0.02), const Text( - "Heures de bureau", + "Schedules", style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, ), ), const Text( - "Lundi - Vendredi : 9h00 - 18h00", + "Monday - Friday : 9h00 - 18h00", style: TextStyle( fontSize: 16, ), diff --git a/lib/view/profile/mobile/mobile_change_email.dart b/lib/view/profile/mobile/mobile_change_email.dart index b82edf7..2296910 100644 --- a/lib/view/profile/mobile/mobile_change_email.dart +++ b/lib/view/profile/mobile/mobile_change_email.dart @@ -52,7 +52,7 @@ class _MobileChangeEmailViewState extends State { ), ), title: Text( - "Changer son e-mail", + "Change your email", style: TextStyle( color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700), ), @@ -70,7 +70,7 @@ class _MobileChangeEmailViewState extends State { Row( children: [ Text( - "Ancien e-mail : ", + "Current email : ", style: TextStyle( color: TColor.black, fontSize: 16, @@ -95,7 +95,7 @@ class _MobileChangeEmailViewState extends State { child: Column( children: [ RoundTextField( - hitText: "Nouveau e-mail", + hitText: "New email", icon: "assets/img/user_text.svg", keyboardType: TextInputType.text, controller: controllerTextEmail, @@ -110,7 +110,7 @@ class _MobileChangeEmailViewState extends State { height: media.width * 0.01, ), RoundButton( - title: "Confirmer", + title: "Confirm", onPressed: () async { bool res = await api.updateUserInfo( 'email', diff --git a/lib/view/profile/mobile/mobile_change_password.dart b/lib/view/profile/mobile/mobile_change_password.dart index 66a9cfd..c02ddbb 100644 --- a/lib/view/profile/mobile/mobile_change_password.dart +++ b/lib/view/profile/mobile/mobile_change_password.dart @@ -56,7 +56,7 @@ class _MobileChangePasswordViewState extends State { ), ), title: Text( - "Changer son Mot de passe", + "Change your password", style: TextStyle( color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700), ), @@ -80,7 +80,7 @@ class _MobileChangePasswordViewState extends State { children: [ SizedBox(height: media.width * 0.05), RoundTextField( - hitText: "Ancien mot de passe", + hitText: "Current password", obscureText: true, icon: "assets/img/lock.svg", keyboardType: TextInputType.text, @@ -89,20 +89,20 @@ class _MobileChangePasswordViewState extends State { SizedBox(height: media.width * 0.07), RoundTextField( controller: controllerNewPasswd, - hitText: "Nouveau mot de passe", + hitText: "New password", icon: "assets/img/lock.svg", obscureText: true, ), SizedBox(height: media.width * 0.07), RoundTextField( controller: controllerNewPasswd2, - hitText: "Confirmer nouveau mot de passe", + hitText: "Confirm new password", icon: "assets/img/lock.svg", obscureText: true, ), SizedBox(height: media.width * 0.07), RoundButton( - title: "Confirmer", + title: "Confirm", onPressed: () async { Tuple2 res = await api.login( controllerActualPasswd.text, diff --git a/lib/view/profile/mobile/mobile_change_username.dart b/lib/view/profile/mobile/mobile_change_username.dart index c494cf9..2538aea 100644 --- a/lib/view/profile/mobile/mobile_change_username.dart +++ b/lib/view/profile/mobile/mobile_change_username.dart @@ -53,7 +53,7 @@ class _MobileChangeUsernameViewState extends State { ), ), title: Text( - "Changer son pseudo", + "Change your username", style: TextStyle( color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700), ), @@ -71,7 +71,7 @@ class _MobileChangeUsernameViewState extends State { Row( children: [ Text( - "Ancien pseudo : ", + "Current username: ", style: TextStyle( color: TColor.black, fontSize: 16, @@ -96,7 +96,7 @@ class _MobileChangeUsernameViewState extends State { child: Column( children: [ RoundTextField( - hitText: "Nouveau pseudo", + hitText: "New username", icon: "assets/img/user_text.svg", keyboardType: TextInputType.text, controller: controllerTextUsername, @@ -109,7 +109,7 @@ class _MobileChangeUsernameViewState extends State { TextStyle(color: infoManager.messageColor))), SizedBox(height: media.width * 0.02), RoundButton( - title: "Confirmer", + title: "Confirm", onPressed: () async { bool res = await api.updateUserInfo( 'username', diff --git a/lib/view/profile/mobile/mobile_profile_view.dart b/lib/view/profile/mobile/mobile_profile_view.dart index 430eab2..12fb2a4 100644 --- a/lib/view/profile/mobile/mobile_profile_view.dart +++ b/lib/view/profile/mobile/mobile_profile_view.dart @@ -14,28 +14,24 @@ class _MobileProfileView extends State { List accountArr = [ { "image": "assets/img/p_personal.png", - "name": "Changer son pseudo", + "name": "Change your username", "tag": "1" }, { "image": "assets/img/p_personal.png", - "name": "Changer son email", + "name": "Change your email", "tag": "3" }, { "image": "assets/img/p_personal.png", - "name": "Changer son mot de passe", + "name": "Change your password", "tag": "2" }, ]; List otherArr = [ - {"image": "assets/img/p_contact.png", "name": "Nous contacter", "tag": "5"}, - { - "image": "assets/img/p_privacy.png", - "name": "Politique de confidentialité", - "tag": "6" - }, + {"image": "assets/img/p_contact.png", "name": "Contact us", "tag": "5"}, + {"image": "assets/img/p_privacy.png", "name": "Privacy policy", "tag": "6"}, ]; @override Widget build(BuildContext context) { diff --git a/lib/view/profile/policy_view.dart b/lib/view/profile/policy_view.dart index 94f7f5b..ce93191 100644 --- a/lib/view/profile/policy_view.dart +++ b/lib/view/profile/policy_view.dart @@ -35,7 +35,7 @@ class PrivacyPolicyView extends StatelessWidget { ), ), title: Text( - "Politique de confidentialité", + "Privacy policy", style: TextStyle( color: TColor.black, fontSize: 16, @@ -51,7 +51,7 @@ class PrivacyPolicyView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ const Text( - "Politique de confidentialité de SmartFit", + "SmartFit privacy policy", style: TextStyle( fontSize: 24, fontWeight: FontWeight.bold, @@ -59,14 +59,14 @@ class PrivacyPolicyView extends StatelessWidget { ), SizedBox(height: media.width * 0.02), const Text( - "Cette Politique de confidentialité explique comment SmartFit collecte, utilise, protège et partage vos informations lorsque vous utilisez notre application mobile SmartFit.", + "This Privacy Policy explains how SmartFit collects, uses, protects and shares your information when you use our SmartFit mobile application.", style: TextStyle( fontSize: 16, ), ), SizedBox(height: media.width * 0.05), const Text( - "Collecte et Utilisation des Informations", + "Collect and usage of your data", style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, @@ -77,7 +77,7 @@ class PrivacyPolicyView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "SmartFit recueille des données uniquement dans le but d'analyser et d'afficher des informations relatives à vos activités physiques à partir des données collectées par votre montre connectée. Ces informations peuvent inclure, sans toutefois s'y limiter :", + "SmartFit collects data solely for the purpose of analyzing and displaying information about your physical activities based on data collected by your smartwatch. This information may include, but is not limited to:", style: TextStyle( fontSize: 16, ), @@ -87,31 +87,31 @@ class PrivacyPolicyView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "• Données d'activité physique (comme la fréquence cardiaque, le nombre de pas, la distance parcourue, etc.)", + " Physical activity data (such as heart rate, number of steps, distance traveled, etc.", style: TextStyle( fontSize: 16, ), ), Text( - "• Données sur les habitudes de sommeil", + "• Sleep data", style: TextStyle( fontSize: 16, ), ), Text( - "• Informations de localisation (si l'option est activée par l'utilisateur)", + "• GPS data", style: TextStyle( fontSize: 16, ), ), Text( - "• Préférences de l'utilisateur concernant les paramètres de l'application", + "• Application parameters", style: TextStyle( fontSize: 16, ), ), Text( - "Ces informations sont utilisées pour générer des graphiques, des statistiques et des recommandations personnalisées afin de vous aider dans vos objectifs de remise en forme.", + "This information is used to generate graphs, statistics and personalized recommendations to help you with your fitness goals.", style: TextStyle( fontSize: 16, ), @@ -122,7 +122,7 @@ class PrivacyPolicyView extends StatelessWidget { ), SizedBox(height: media.width * 0.05), const Text( - "Protection des Informations", + "Information protection", style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, diff --git a/lib/view/profile/web/web_change_email.dart b/lib/view/profile/web/web_change_email.dart index 1818559..9a2c55a 100644 --- a/lib/view/profile/web/web_change_email.dart +++ b/lib/view/profile/web/web_change_email.dart @@ -52,7 +52,7 @@ class _WebChangeEmailViewState extends State { ), ), title: Text( - "Changer son email", + "Change you email", style: TextStyle( color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700), ), @@ -70,7 +70,7 @@ class _WebChangeEmailViewState extends State { Row( children: [ Text( - "Email actuel : ", + "Current email: ", style: TextStyle( color: TColor.black, fontSize: 16, @@ -95,7 +95,7 @@ class _WebChangeEmailViewState extends State { child: Column( children: [ RoundTextField( - hitText: "Nouveau email", + hitText: "New email", icon: "assets/img/user_text.svg", keyboardType: TextInputType.text, controller: controllerTextEmail, @@ -108,7 +108,7 @@ class _WebChangeEmailViewState extends State { TextStyle(color: infoManager.messageColor))), SizedBox(height: media.width * 0.03), RoundButton( - title: "Confirmer", + title: "Confirm", onPressed: () async { bool res = await apiWrapper.updateUserInfo( 'email', diff --git a/lib/view/profile/web/web_change_password.dart b/lib/view/profile/web/web_change_password.dart index 718468e..c193dc7 100644 --- a/lib/view/profile/web/web_change_password.dart +++ b/lib/view/profile/web/web_change_password.dart @@ -55,7 +55,7 @@ class _WebChangePasswordViewState extends State { ), ), title: Text( - "Changer son Mot de passe", + "Change password", style: TextStyle( color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700), ), @@ -78,7 +78,7 @@ class _WebChangePasswordViewState extends State { child: Column( children: [ RoundTextField( - hitText: "Ancien mot de passe", + hitText: "Current password", obscureText: true, icon: "assets/img/lock.svg", keyboardType: TextInputType.text, @@ -87,14 +87,14 @@ class _WebChangePasswordViewState extends State { SizedBox(height: media.width * 0.02), RoundTextField( controller: controllerNewPasswd, - hitText: "Nouveau mot de passe", + hitText: "New password", icon: "assets/img/lock.svg", obscureText: true, ), SizedBox(height: media.width * 0.02), RoundTextField( controller: controllerNewPasswd2, - hitText: "Confirmer nouveau mot de passe", + hitText: "Confirm new password", icon: "assets/img/lock.svg", obscureText: true, ), @@ -105,7 +105,7 @@ class _WebChangePasswordViewState extends State { TextStyle(color: infoManager.messageColor))), SizedBox(height: media.width * 0.04), RoundButton( - title: "Confirmer", + title: "Confirm", onPressed: () async { Tuple2 res = await api.login( controllerActualPasswd.text, diff --git a/lib/view/profile/web/web_change_username.dart b/lib/view/profile/web/web_change_username.dart index 25ee3be..8102f99 100644 --- a/lib/view/profile/web/web_change_username.dart +++ b/lib/view/profile/web/web_change_username.dart @@ -52,7 +52,7 @@ class _WebChangeUsernameViewState extends State { ), ), title: Text( - "Changer son pseudo", + "Change your username", style: TextStyle( color: TColor.black, fontSize: 16, fontWeight: FontWeight.w700), ), @@ -70,7 +70,7 @@ class _WebChangeUsernameViewState extends State { Row( children: [ Text( - "Ancien pseudo : ", + "Current username: ", style: TextStyle( color: TColor.black, fontSize: 16, @@ -95,7 +95,7 @@ class _WebChangeUsernameViewState extends State { child: Column( children: [ RoundTextField( - hitText: "Nouveau pseudo", + hitText: "New username", icon: "assets/img/user_text.svg", keyboardType: TextInputType.text, controller: controllerTextUsername, @@ -110,7 +110,7 @@ class _WebChangeUsernameViewState extends State { TextStyle(color: infoManager.messageColor))), SizedBox(height: media.width * 0.04), RoundButton( - title: "Confirmer", + title: "Confirm", onPressed: () async { bool res = await api.updateUserInfo( 'username', diff --git a/lib/view/profile/web/web_profile_view.dart b/lib/view/profile/web/web_profile_view.dart index bb0b39b..2491aea 100644 --- a/lib/view/profile/web/web_profile_view.dart +++ b/lib/view/profile/web/web_profile_view.dart @@ -14,32 +14,24 @@ class _WebProfileView extends State { List accountArr = [ { "image": "assets/img/p_personal.png", - "name": "Changer son pseudo ", + "name": "Change your username", "tag": "1" }, { "image": "assets/img/p_personal.png", - "name": "Changer son email ", + "name": "Change your email", "tag": "3" }, { "image": "assets/img/p_personal.png", - "name": "Changer son mot de passe ", + "name": "Changer your password", "tag": "2" }, ]; List otherArr = [ - { - "image": "assets/img/p_contact.png", - "name": "Nous contacter !!", - "tag": "5" - }, - { - "image": "assets/img/p_privacy.png", - "name": "Politique de confidentialité", - "tag": "6" - }, + {"image": "assets/img/p_contact.png", "name": "Contact us !", "tag": "5"}, + {"image": "assets/img/p_privacy.png", "name": "Privacy policy", "tag": "6"}, ]; @override Widget build(BuildContext context) {