Compare commits
3 Commits
1208982b15
...
1f8d18343c
Author | SHA1 | Date | |
---|---|---|---|
1f8d18343c | |||
c3b8b0df14 | |||
ec8ce404ab |
@@ -26,5 +26,12 @@
|
||||
"create": "Creation",
|
||||
"user_create": "Your user created",
|
||||
"request_error": "Poorly constructed query",
|
||||
"incorrect_password": "Incorrect password"
|
||||
"incorrect_password": "Incorrect password",
|
||||
"unknown_user": "Unknown user",
|
||||
"disabled_user": "User disabled",
|
||||
"invalid_token": "Invalid token",
|
||||
"internal_error_server": "Internal error server",
|
||||
"unknown_error_auth": "Unknown error authentification",
|
||||
"required_input": "Required input",
|
||||
"create_profile": "Create profile"
|
||||
}
|
@@ -26,5 +26,13 @@
|
||||
"create": "Création",
|
||||
"user_create": "Votre utilisateur a été créé",
|
||||
"request_error": "Requête mal construite",
|
||||
"incorrect_password": "Mot de passe incorrect"
|
||||
"incorrect_password": "Mot de passe incorrect",
|
||||
"unknown_user": "Utilisateur inconnu",
|
||||
"disabled_user": "Utilisateur désactivé",
|
||||
"invalid_token": "Token invalide",
|
||||
"internal_error_server": "Erreur interne de serveur",
|
||||
"unknown_error_auth": "Problème d'authentification inconnu",
|
||||
"required_input": "Champ requis",
|
||||
"create_profile": "Creation profil"
|
||||
|
||||
}
|
@@ -139,15 +139,18 @@ class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
||||
"Poorly constructed query",
|
||||
406: AppLocalizations.of(context)?.incorrect_password ??
|
||||
"Incorrect password",
|
||||
404: "Utilisateur inconnu",
|
||||
403: "Utilisateur désactivé",
|
||||
410: "Token invalide",
|
||||
500: "Problème interne du serveur",
|
||||
404: AppLocalizations.of(context)?.unknown_user ?? "Unknown user",
|
||||
403: AppLocalizations.of(context)?.disabled_user ?? "Disabled user",
|
||||
410: AppLocalizations.of(context)?.invalid_token ?? "Invalid token",
|
||||
500: AppLocalizations.of(context)?.internal_error_server ??
|
||||
"Internal error server"
|
||||
};
|
||||
|
||||
final text = errorMessages[responsePost.statusCode] ??
|
||||
"Problème d'authentification inconnu";
|
||||
showAlertDialog(context, "Erreur serveur", text);
|
||||
AppLocalizations.of(context)?.unknown_error_auth ??
|
||||
"Unknown error auth";
|
||||
showAlertDialog(
|
||||
context, AppLocalizations.of(context)?.error ?? "Error", text);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -163,7 +166,9 @@ class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
||||
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
String? _validateField(String? value) {
|
||||
return value!.isEmpty ? 'Champ requis' : null;
|
||||
return value!.isEmpty
|
||||
? AppLocalizations.of(context)?.required_input ?? 'Required input'
|
||||
: null;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -171,7 +176,8 @@ class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
title: Text("Create profile"),
|
||||
title: Text(
|
||||
AppLocalizations.of(context)?.create_profile ?? "Create profile"),
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
|
Reference in New Issue
Block a user