feature/internationale #46

Merged
v4l3n71n merged 38 commits from feature/internationale into main 2025-08-06 20:38:37 +00:00
21 changed files with 781 additions and 210 deletions
Showing only changes of commit 2c2eedb7ce - Show all commits

View File

@@ -100,5 +100,12 @@
"item_maps": "Maps : ", "item_maps": "Maps : ",
"item_organizer": "Organizer : ", "item_organizer": "Organizer : ",
"item_description": "Description : ", "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"
} }

View File

@@ -100,5 +100,12 @@
"item_maps": "Carte : ", "item_maps": "Carte : ",
"item_organizer": "Organisateurs : ", "item_organizer": "Organisateurs : ",
"item_description": "Description : ", "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"
} }

View File

@@ -43,7 +43,7 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
context, MaterialPageRoute(builder: (_) => ListItemMenu())); context, MaterialPageRoute(builder: (_) => ListItemMenu()));
} else { } else {
showAlertDialog(context, AppLocalizations.of(context)?.error ?? "Error", 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<LoginDemo> with ShowAlertDialog {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: AppBar( appBar: AppBar(
title: Text("Login Page"), title: Text(AppLocalizations.of(context)?.login_page ?? "Login Page"),
backgroundColor: Colors.blue, backgroundColor: Colors.blue,
foregroundColor: Colors.white, foregroundColor: Colors.white,
), ),
@@ -100,8 +100,10 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
controller: inputPseudo, controller: inputPseudo,
decoration: InputDecoration( decoration: InputDecoration(
border: OutlineInputBorder(), border: OutlineInputBorder(),
labelText: 'Pseudo', labelText: AppLocalizations.of(context)?.pseudo ?? 'Pseudo',
hintText: 'Enter pseudo existant', hintText:
AppLocalizations.of(context)?.enter_existing_pseudo ??
'Enter a existing pseudo',
), ),
), ),
), ),
@@ -112,13 +114,16 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
obscureText: true, obscureText: true,
decoration: InputDecoration( decoration: InputDecoration(
border: OutlineInputBorder(), border: OutlineInputBorder(),
labelText: 'Password', labelText:
hintText: 'Enter secure password', AppLocalizations.of(context)?.password ?? "Password",
hintText: AppLocalizations.of(context)?.enter_password ??
"Enter the password",
), ),
), ),
), ),
CheckboxListTile( CheckboxListTile(
title: Text("Se souvenir de moi"), title: Text(
AppLocalizations.of(context)?.remembr_me ?? "Remember me"),
value: _rememberMe, value: _rememberMe,
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
@@ -131,7 +136,9 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
Navigator.push(context, Navigator.push(context,
MaterialPageRoute(builder: (_) => PasswordForgot())); MaterialPageRoute(builder: (_) => PasswordForgot()));
}, },
child: Text('Forgot Password', child: Text(
AppLocalizations.of(context)?.forgot_password ??
'Forgot Password',
style: TextStyle(color: Colors.blue, fontSize: 15)), style: TextStyle(color: Colors.blue, fontSize: 15)),
), ),
Container( Container(
@@ -141,13 +148,14 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
color: Colors.blue, borderRadius: BorderRadius.circular(20)), color: Colors.blue, borderRadius: BorderRadius.circular(20)),
child: TextButton( child: TextButton(
onPressed: () => _login(context), onPressed: () => _login(context),
child: Text('Login', child: Text(AppLocalizations.of(context)?.sign_in ?? 'Sign in',
style: TextStyle(color: Colors.white, fontSize: 25)), style: TextStyle(color: Colors.white, fontSize: 25)),
), ),
), ),
SizedBox(height: 130), SizedBox(height: 130),
InkWell( InkWell(
child: Text('New User? Create Account'), child: Text(AppLocalizations.of(context)?.new_user ??
'New User? Create Account'),
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, MaterialPageRoute(builder: (_) => AddProfile())); context, MaterialPageRoute(builder: (_) => AddProfile()));