translate view/login

master
remrem 2 years ago
parent d15eb2bffc
commit 359cbfeed8

@ -82,11 +82,11 @@ class _MobileLoginView extends State<MobileLoginView> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
"Bienvenue", "Welcome",
style: TextStyle(color: TColor.gray, fontSize: 16), style: TextStyle(color: TColor.gray, fontSize: 16),
), ),
Text( Text(
"Se connecter", "Log in",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 20, fontSize: 20,
@ -109,7 +109,7 @@ class _MobileLoginView extends State<MobileLoginView> {
), ),
RoundTextField( RoundTextField(
controller: controllerTextPassword, controller: controllerTextPassword,
hitText: "Mot de passe", hitText: "Password",
icon: "assets/img/lock.svg", icon: "assets/img/lock.svg",
obscureText: _obscureText, obscureText: _obscureText,
rigtIcon: TextButton( rigtIcon: TextButton(
@ -129,7 +129,7 @@ class _MobileLoginView extends State<MobileLoginView> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
"Mot de passe oublié ?", "Password Lost ?",
style: TextStyle( style: TextStyle(
color: TColor.gray, color: TColor.gray,
fontSize: 15, fontSize: 15,
@ -146,10 +146,10 @@ class _MobileLoginView extends State<MobileLoginView> {
style: TextStyle(color: TColor.red))), style: TextStyle(color: TColor.red))),
const Spacer(), const Spacer(),
RoundButton( RoundButton(
title: "Se connecter", title: "Log in",
onPressed: () async { onPressed: () async {
if (!emailValidate || !passwordValidate) { if (!emailValidate || !passwordValidate) {
_printMsgError("Les champs renseigné ne sont pas valide"); _printMsgError("Fields are not valid!");
return; return;
} }
Tuple2<bool, String> result = Tuple2<bool, String> result =
@ -163,7 +163,7 @@ class _MobileLoginView extends State<MobileLoginView> {
if (infoUser.item1 == false) { if (infoUser.item1 == false) {
//print("Erreur - Impossible de récupéré les données de l'utilisateur"); //print("Erreur - Impossible de récupéré les données de l'utilisateur");
_printMsgError( _printMsgError(
"Impossible de récupéré les données de l'utilisateur - {$infoUser.item2}"); "Can't find user data! - {$infoUser.item2}");
} else { } else {
util.fillUser(context, infoUser.item2, result.item2); util.fillUser(context, infoUser.item2, result.item2);
if (!kIsWeb) if (!kIsWeb)
@ -175,7 +175,7 @@ class _MobileLoginView extends State<MobileLoginView> {
builder: (context) => const MainTabView())); builder: (context) => const MainTabView()));
} }
} else { } else {
_printMsgError("Connexion refuser - ${result.item2}"); _printMsgError("Connection refused - ${result.item2}");
} }
}), }),
SizedBox( SizedBox(
@ -264,14 +264,14 @@ class _MobileLoginView extends State<MobileLoginView> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
"Vous n'avez pas toujours pas de compte ? ", "Don't have an account yet ?",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,
), ),
), ),
Text( Text(
"Créer un compte", "Register",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,

@ -98,11 +98,11 @@ class _MobileSignUpView extends State<MobileSignUpView> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
"Bienvenue,", "Welcome,",
style: TextStyle(color: TColor.gray, fontSize: 16), style: TextStyle(color: TColor.gray, fontSize: 16),
), ),
Text( Text(
"Créer un compte", "Register",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 20, fontSize: 20,
@ -112,7 +112,7 @@ class _MobileSignUpView extends State<MobileSignUpView> {
height: media.width * 0.05, height: media.width * 0.05,
), ),
RoundTextField( RoundTextField(
hitText: "Prénom", hitText: "Username",
icon: "assets/img/user_text.svg", icon: "assets/img/user_text.svg",
controller: controllerUsername, controller: controllerUsername,
), ),
@ -129,7 +129,7 @@ class _MobileSignUpView extends State<MobileSignUpView> {
height: media.width * 0.04, height: media.width * 0.04,
), ),
RoundTextField( RoundTextField(
hitText: "Mot de passe", hitText: "Password",
icon: "assets/img/lock.svg", icon: "assets/img/lock.svg",
obscureText: _obscureText, obscureText: _obscureText,
controller: controllerTextPassword, controller: controllerTextPassword,
@ -164,7 +164,7 @@ class _MobileSignUpView extends State<MobileSignUpView> {
Padding( Padding(
padding: const EdgeInsets.only(top: 8), padding: const EdgeInsets.only(top: 8),
child: Text( child: Text(
"En continuant, vous acceptez notre Politique de\nconfidentialité et nos Conditions d'utilisation.", "I accept to not break the app",
style: TextStyle(color: TColor.gray, fontSize: 10), style: TextStyle(color: TColor.gray, fontSize: 10),
), ),
) )
@ -181,12 +181,12 @@ class _MobileSignUpView extends State<MobileSignUpView> {
height: media.width * 0.4, height: media.width * 0.4,
), ),
RoundButton( RoundButton(
title: "Créer un compte", title: "Register",
onPressed: () async { onPressed: () async {
if (!emailValidate || if (!emailValidate ||
!passwordValidate || !passwordValidate ||
!usernameValidate) { !usernameValidate) {
_printMsgError("Les champs renseigné ne sont pas valide"); _printMsgError("Fields are not valid!");
return; return;
} }
@ -215,7 +215,7 @@ class _MobileSignUpView extends State<MobileSignUpView> {
color: TColor.gray.withOpacity(0.5), color: TColor.gray.withOpacity(0.5),
)), )),
Text( Text(
" Ou ", " Or ",
style: TextStyle(color: TColor.black, fontSize: 12), style: TextStyle(color: TColor.black, fontSize: 12),
), ),
Expanded( Expanded(
@ -239,14 +239,14 @@ class _MobileSignUpView extends State<MobileSignUpView> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
"Vous avez déjà un compte ? ", "Already have an account ?",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,
), ),
), ),
Text( Text(
"Se connecter", "Log in",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,

@ -86,11 +86,11 @@ class _WebLoginView extends State<WebLoginView> {
height: media.width * 0.03, height: media.width * 0.03,
), ),
Text( Text(
"Bienvenue sur SmartFit", "Welcome on SmartFit",
style: TextStyle(color: TColor.gray, fontSize: 16), style: TextStyle(color: TColor.gray, fontSize: 16),
), ),
Text( Text(
"Se connecter", "Log in",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 20, fontSize: 20,
@ -110,7 +110,7 @@ class _WebLoginView extends State<WebLoginView> {
), ),
RoundTextField( RoundTextField(
controller: controllerTextPassword, controller: controllerTextPassword,
hitText: "Mot de passe", hitText: "Password",
icon: "assets/img/lock.svg", icon: "assets/img/lock.svg",
obscureText: _obscureText, obscureText: _obscureText,
rigtIcon: TextButton( rigtIcon: TextButton(
@ -133,7 +133,7 @@ class _WebLoginView extends State<WebLoginView> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
"Mot de passe oublié ?", "Password lost ?",
style: TextStyle( style: TextStyle(
color: TColor.gray, color: TColor.gray,
fontSize: 15, fontSize: 15,
@ -150,11 +150,11 @@ class _WebLoginView extends State<WebLoginView> {
style: TextStyle(color: TColor.red))), style: TextStyle(color: TColor.red))),
const Spacer(), const Spacer(),
RoundButton( RoundButton(
title: "Se connecter", title: "Log in",
onPressed: () async { onPressed: () async {
// TODO: utiliser la vrai validation // TODO: utiliser la vrai validation
if (!emailValidate || !passwordValidate) { if (!emailValidate || !passwordValidate) {
_printMsgError("Les champs renseigné ne sont pas valide"); _printMsgError("Fields are not valid!");
return; return;
} }
Tuple2<bool, String> result = Tuple2<bool, String> result =
@ -168,7 +168,7 @@ class _WebLoginView extends State<WebLoginView> {
if (infoUser.item1 == false) { if (infoUser.item1 == false) {
//print("Erreur - Impossible de récupéré les données de l'utilisateur"); //print("Erreur - Impossible de récupéré les données de l'utilisateur");
_printMsgError( _printMsgError(
"Impossible de récupéré les données de l'utilisateur - {$infoUser.item2}"); "Can't find user data - {$infoUser.item2}");
} else { } else {
util.fillUser(context, infoUser.item2, result.item2); util.fillUser(context, infoUser.item2, result.item2);
if (!kIsWeb) if (!kIsWeb)
@ -180,7 +180,7 @@ class _WebLoginView extends State<WebLoginView> {
builder: (context) => const MainTabView())); builder: (context) => const MainTabView()));
} }
} else { } else {
_printMsgError("Connexion refuser - ${result.item2}"); _printMsgError("Connection refused - ${result.item2}");
} }
}), }),
SizedBox( SizedBox(
@ -197,14 +197,14 @@ class _WebLoginView extends State<WebLoginView> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
"Vous n'avez pas toujours pas de compte ? ", "Don't have an account yet ? ",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,
), ),
), ),
Text( Text(
"Créer un compte", "Register",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,

@ -100,11 +100,11 @@ class _WebSignUpView extends State<WebSignUpView> {
height: media.width * 0.04, height: media.width * 0.04,
), ),
Text( Text(
"Bienvenue,", "Welcome,",
style: TextStyle(color: TColor.gray, fontSize: 16), style: TextStyle(color: TColor.gray, fontSize: 16),
), ),
Text( Text(
"Créer un compte", "Register",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 20, fontSize: 20,
@ -114,7 +114,7 @@ class _WebSignUpView extends State<WebSignUpView> {
height: media.width * 0.05, height: media.width * 0.05,
), ),
RoundTextField( RoundTextField(
hitText: "Prénom", hitText: "Username",
icon: "assets/img/user_text.svg", icon: "assets/img/user_text.svg",
controller: controllerUsername, controller: controllerUsername,
), ),
@ -131,7 +131,7 @@ class _WebSignUpView extends State<WebSignUpView> {
height: media.width * 0.04, height: media.width * 0.04,
), ),
RoundTextField( RoundTextField(
hitText: "Mot de passe", hitText: "Password",
icon: "assets/img/lock.svg", icon: "assets/img/lock.svg",
obscureText: _obscureText, obscureText: _obscureText,
controller: controllerTextPassword, controller: controllerTextPassword,
@ -166,7 +166,7 @@ class _WebSignUpView extends State<WebSignUpView> {
Padding( Padding(
padding: const EdgeInsets.only(top: 8), padding: const EdgeInsets.only(top: 8),
child: Text( child: Text(
"En continuant, vous acceptez notre Politique de\nconfidentialité et nos Conditions d'utilisation.", "Please don't break the app",
style: TextStyle(color: TColor.gray, fontSize: 10), style: TextStyle(color: TColor.gray, fontSize: 10),
), ),
) )
@ -180,12 +180,12 @@ class _WebSignUpView extends State<WebSignUpView> {
height: media.width * 0.05, height: media.width * 0.05,
), ),
RoundButton( RoundButton(
title: "Créer un compte", title: "Register",
onPressed: () async { onPressed: () async {
if (!emailValidate || if (!emailValidate ||
!passwordValidate || !passwordValidate ||
!usernameValidate) { !usernameValidate) {
_printMsgError("Les champs renseigné ne sont pas valide"); _printMsgError("Fields are not valid!");
return; return;
} }
Tuple2<bool, String> result = await util.createUser( Tuple2<bool, String> result = await util.createUser(
@ -215,14 +215,14 @@ class _WebSignUpView extends State<WebSignUpView> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
"Vous avez déjà un compte ? ", "Already have an account ?",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,
), ),
), ),
Text( Text(
"Se connecter", "Log in",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 14, fontSize: 14,

Loading…
Cancel
Save