From 2c2eedb7ce323a9c1745ecf95fb91ad8015cfa17 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sun, 27 Jul 2025 15:16:38 +0200 Subject: [PATCH] translate loginpage 100% --- covas_mobile/lib/l10n/app_en.arb | 9 ++++++++- covas_mobile/lib/l10n/app_fr.arb | 9 ++++++++- covas_mobile/lib/pages/LoginDemo.dart | 28 +++++++++++++++++---------- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/covas_mobile/lib/l10n/app_en.arb b/covas_mobile/lib/l10n/app_en.arb index 79e86c4..92e78ac 100644 --- a/covas_mobile/lib/l10n/app_en.arb +++ b/covas_mobile/lib/l10n/app_en.arb @@ -100,5 +100,12 @@ "item_maps": "Maps : ", "item_organizer": "Organizer : ", "item_description": "Description : ", -"item_tags": "Tags : " +"item_tags": "Tags : ", +"failed_auth": "Authentification failed", +"login_page": "Login page", +"pseudo": "Pseudo", +"enter_existing_pseudo": "Enter a existing pseudo", +"remembr_me": "Remember me", +"new_user": "New User? Create Account", +"sign_in": "Sign in" } \ No newline at end of file diff --git a/covas_mobile/lib/l10n/app_fr.arb b/covas_mobile/lib/l10n/app_fr.arb index 520e908..7faca7e 100644 --- a/covas_mobile/lib/l10n/app_fr.arb +++ b/covas_mobile/lib/l10n/app_fr.arb @@ -100,5 +100,12 @@ "item_maps": "Carte : ", "item_organizer": "Organisateurs : ", "item_description": "Description : ", -"item_tags": "Tags : " +"item_tags": "Tags : ", +"failed_auth": "Échec de l'authenticaton", +"login_page": "Page d'authentification", +"pseudo": "Pseudo", +"enter_existing_pseudo": "Entrez un pseudo existant", +"remembr_me": "Se souvenir de moi", +"new_user": "Nouvel utilisateur ? Créer un compte", +"sign_in": "Se connecter" } \ No newline at end of file diff --git a/covas_mobile/lib/pages/LoginDemo.dart b/covas_mobile/lib/pages/LoginDemo.dart index 15bf799..d6dd224 100644 --- a/covas_mobile/lib/pages/LoginDemo.dart +++ b/covas_mobile/lib/pages/LoginDemo.dart @@ -43,7 +43,7 @@ class _LoginDemoState extends State with ShowAlertDialog { context, MaterialPageRoute(builder: (_) => ListItemMenu())); } else { showAlertDialog(context, AppLocalizations.of(context)?.error ?? "Error", - "Échec de l'authentification"); + AppLocalizations.of(context)?.failed_auth ?? "Authentication failed"); } } @@ -80,7 +80,7 @@ class _LoginDemoState extends State with ShowAlertDialog { return Scaffold( backgroundColor: Colors.white, appBar: AppBar( - title: Text("Login Page"), + title: Text(AppLocalizations.of(context)?.login_page ?? "Login Page"), backgroundColor: Colors.blue, foregroundColor: Colors.white, ), @@ -100,8 +100,10 @@ class _LoginDemoState extends State with ShowAlertDialog { controller: inputPseudo, decoration: InputDecoration( border: OutlineInputBorder(), - labelText: 'Pseudo', - hintText: 'Enter pseudo existant', + labelText: AppLocalizations.of(context)?.pseudo ?? 'Pseudo', + hintText: + AppLocalizations.of(context)?.enter_existing_pseudo ?? + 'Enter a existing pseudo', ), ), ), @@ -112,13 +114,16 @@ class _LoginDemoState extends State with ShowAlertDialog { obscureText: true, decoration: InputDecoration( border: OutlineInputBorder(), - labelText: 'Password', - hintText: 'Enter secure password', + labelText: + AppLocalizations.of(context)?.password ?? "Password", + hintText: AppLocalizations.of(context)?.enter_password ?? + "Enter the password", ), ), ), CheckboxListTile( - title: Text("Se souvenir de moi"), + title: Text( + AppLocalizations.of(context)?.remembr_me ?? "Remember me"), value: _rememberMe, onChanged: (newValue) { setState(() { @@ -131,7 +136,9 @@ class _LoginDemoState extends State with ShowAlertDialog { Navigator.push(context, MaterialPageRoute(builder: (_) => PasswordForgot())); }, - child: Text('Forgot Password', + child: Text( + AppLocalizations.of(context)?.forgot_password ?? + 'Forgot Password', style: TextStyle(color: Colors.blue, fontSize: 15)), ), Container( @@ -141,13 +148,14 @@ class _LoginDemoState extends State with ShowAlertDialog { color: Colors.blue, borderRadius: BorderRadius.circular(20)), child: TextButton( onPressed: () => _login(context), - child: Text('Login', + child: Text(AppLocalizations.of(context)?.sign_in ?? 'Sign in', style: TextStyle(color: Colors.white, fontSize: 25)), ), ), SizedBox(height: 130), InkWell( - child: Text('New User? Create Account'), + child: Text(AppLocalizations.of(context)?.new_user ?? + 'New User? Create Account'), onTap: () { Navigator.push( context, MaterialPageRoute(builder: (_) => AddProfile()));