From 00e25560c97b72ee5fd00ba54387540a5cebbce3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Jan 2009 13:40:07 +0000 Subject: [PATCH] Message is more clear. --- htdocs/comm/action/fiche.php | 9 ++++++--- htdocs/langs/en_US/errors.lang | 1 + htdocs/langs/fr_FR/errors.lang | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 216f956ff3f..cae63b638ad 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -254,14 +254,16 @@ if ($_POST["action"] == 'add_action') // Si erreur $db->rollback(); $_GET["id"]=$idaction; - $error=$actioncomm->error; + $langs->load("errors"); + $error=$langs->trans($actioncomm->error); } } else { $db->rollback(); $_GET["id"]=$idaction; - $error=$actioncomm->error; + $langs->load("errors"); + $error=$langs->trans($actioncomm->error); } } @@ -389,7 +391,8 @@ if ($_POST["action"] == 'update') if ($result < 0) { - $mesg='
'.$actioncomm->error.'
'; + $langs->load("errors"); + $mesg='
'.$langs->trans($actioncomm->error).'
'; $_GET["id"]=$_POST["id"]; } else diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index daf3f4d76fa..5f7f2df26a1 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -41,3 +41,4 @@ ErrorNoAccountancyModuleLoaded=No accountancy module activated ErrorExportDuplicateProfil=This profil name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete. ErrorLDAPMakeManualTest=A .ldif file has been generated in directory %s. Try to load it manually from command line to have more informations on errors. +ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "statut not started" if field "done by" is also filled. diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 9552cd3a83a..3f497d117e6 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -40,4 +40,5 @@ WarningPassIsEmpty=Attention, le mot de passe de la base de donn ErrorNoAccountancyModuleLoaded=Aucun module de comptabilité activé ErrorExportDuplicateProfil=Ce nom de profil existe déjà pour ce lot d'export. ErrorLDAPSetupNotComplete=Le matching Dolibarr-LDAP est incomplet. -ErrorLDAPMakeManualTest=Un fichier .ldif a été généré dans le répertoire %s. Essayer de charger ce fichier en manuel depuis la ligne de commande pour plus de détail sur l'erreur. \ No newline at end of file +ErrorLDAPMakeManualTest=Un fichier .ldif a été généré dans le répertoire %s. Essayer de charger ce fichier en manuel depuis la ligne de commande pour plus de détail sur l'erreur. +ErrorCantSaveADoneUserWithZeroPercentage=Impossible sauver une action à l'état non commencé avec un utilisateur défini comme ayant fait l'action. \ No newline at end of file