diff --git a/modules/entities/lang/en.php b/modules/entities/lang/en.php index 6e706136d0fd3e47b200c19bf4b46a69712f213a..0044daa51970110d7a7b58a4e9118907cdf045b4 100755 --- a/modules/entities/lang/en.php +++ b/modules/entities/lang/en.php @@ -89,9 +89,6 @@ if (!defined('_ENTITY_IS_RELATED')) { if (!defined('_TYPE')) { define('_TYPE', 'Type'); } -if (!defined('_ENTITY_ALREADY_EXISTS')) { - define('_ENTITY_ALREADY_EXISTS', 'Entity already exists'); -} /*************************** Users - Entites management *****************/ if (!defined('_ENTITY_USER_DESC')) { diff --git a/modules/entities/lang/fr.php b/modules/entities/lang/fr.php index 0c8cb9cbc270aedb0cd923ffde5bc3b9cb95fc5e..cd61a35f2d2eb613842df98c1fb163b692567046 100755 --- a/modules/entities/lang/fr.php +++ b/modules/entities/lang/fr.php @@ -89,9 +89,6 @@ if (!defined('_ENTITY_IS_RELATED')) { if (!defined('_TYPE')) { define('_TYPE', 'Type'); } -if (!defined('_ENTITY_ALREADY_EXISTS')) { - define('_ENTITY_ALREADY_EXISTS', 'Cette entité existe déjà '); -} /*************************** Users - Entites management *****************/ if (!defined('_ENTITY_USER_DESC')) { diff --git a/src/app/contact/controllers/ContactGroupController.php b/src/app/contact/controllers/ContactGroupController.php index 6c2409d3cdb7f1c6e107ff46b5ea9991a133dca8..4608867860df97ab758b7716d5a3d878769acb7a 100644 --- a/src/app/contact/controllers/ContactGroupController.php +++ b/src/app/contact/controllers/ContactGroupController.php @@ -72,7 +72,11 @@ class ContactGroupController $user = UserModel::getByUserId(['select' => ['id'], 'userId' => $GLOBALS['userId']]); $existingGroup = ContactGroupModel::get(['select' => [1], 'where' => ['label = ?', 'owner = ?'], 'data' => [$data['label'], $user['id']]]); if (!empty($existingGroup)) { +<<<<<<< c775c2ab5ad5d20ed7714655e22355e405842786 return $response->withStatus(400)->withJson(['errors' => _CONTACTS_GROUP_LABEL_EXISTS]); +======= + return $response->withStatus(400)->withJson(['errors' => _CONTACT_GROUP_LABEL_ALREADY_EXISTS]); +>>>>>>> FEAT #7699 added new lang var } $data['public'] = $data['public'] ? 'true' : 'false'; diff --git a/src/app/entity/controllers/EntityController.php b/src/app/entity/controllers/EntityController.php index d62ee942331a5bc2e97dbfef394c91d93b2a0b64..fddc620d10cff62f338bfc511944bd96da8a7530 100644 --- a/src/app/entity/controllers/EntityController.php +++ b/src/app/entity/controllers/EntityController.php @@ -171,7 +171,7 @@ class EntityController $existingEntity = EntityModel::getById(['entityId' => $data['entity_id'], 'select' => [1]]); if (!empty($existingEntity)) { - return $response->withStatus(400)->withJson(['errors' => _ENTITY_ALREADY_EXISTS]); + return $response->withStatus(400)->withJson(['errors' => _ENTITY_ID_ALREADY_EXISTS]); } EntityModel::create($data); diff --git a/src/app/parameter/controllers/ParameterController.php b/src/app/parameter/controllers/ParameterController.php index 61c5b1d953619b75084160be24382437d8913efb..343831523d68c3a6ff03c18723cec30b51d5abf4 100644 --- a/src/app/parameter/controllers/ParameterController.php +++ b/src/app/parameter/controllers/ParameterController.php @@ -71,7 +71,7 @@ class ParameterController $parameter = ParameterModel::getById(['id' => $data['id']]); if (!empty($parameter)) { - return $response->withStatus(400)->withJson(['errors' => 'Parameter already exists']); + return $response->withStatus(400)->withJson(['errors' => _PARAMETER_ID_ALREADY_EXISTS]); } ParameterModel::create($data); diff --git a/src/core/lang/lang-en.php b/src/core/lang/lang-en.php index 825903904f0258c1bddf4677ffa0a20a6f027d60..6f24f97eef242d336195428b213049ee5a6094b9 100644 --- a/src/core/lang/lang-en.php +++ b/src/core/lang/lang-en.php @@ -34,8 +34,13 @@ define('_CONTACTS_GROUP_ADDED', 'Contacts group added'); define('_CONTACTS_GROUP_UPDATED', 'Contacts group updated'); define('_CONTACTS_GROUP_DELETED', 'Contacts group deleted'); define('_CONTACTS_GROUP_LIST_ADDED', 'Add contacts for group'); +<<<<<<< c775c2ab5ad5d20ed7714655e22355e405842786 define('_CONTACTS_GROUP_LIST_DELETED', 'Delete a contact for group'); define('_CONTACTS_GROUP_LABEL_EXISTS', 'Group with this label already exists'); +======= +define('_CONTACTS_GROUP_LIST_DELETED', 'Delete contacts for group'); +define('_CONTACT_GROUP_LABEL_ALREADY_EXISTS', 'Group with this label already exists'); +>>>>>>> FEAT #7699 added new lang var define('_DELETE_NOTIFICATIONS', 'Notification deleted'); define('_DEST_USER', 'Recipient'); define('_DOCTYPE_FIRSTLEVEL_ADDED', 'Doctype first level added'); @@ -48,6 +53,7 @@ define('_DOCUMENT_NOT_FOUND', 'Document not found'); define('_ENTITY_CREATION', 'Entity creation'); define('_ENTITY_MODIFICATION', 'Entity modification'); define('_ENTITY_SUPPRESSION', 'Entity suppression'); +define('_ENTITY_ID_ALREADY_EXISTS', 'Entity already exists'); define('_ID', 'Identifier'); define('_ID_TO_DISPLAY', 'res_id'); define('_INVALID_CLAUSE', 'Clause is not valid'); @@ -62,6 +68,7 @@ define('_NOTIFICATION_SCRIPT_ADDED', 'Script created'); define('_PARAMETER_CREATION', 'Parameter creation'); define('_PARAMETER_MODIFICATION', 'Parameter modification'); define('_PARAMETER_SUPPRESSION', 'Parameter suppression'); +define('_PARAMETER_ID_ALREADY_EXISTS', 'Parameter already exists'); define('_PRIORITY_CREATION', 'Priority creation'); define('_PRIORITY_MODIFICATION', 'Priority modification'); define('_PRIORITY_SUPPRESSION', 'Priority suppression'); diff --git a/src/core/lang/lang-fr.php b/src/core/lang/lang-fr.php index 77a4a0f86c2d915c2c814a20a32916bbbfe9f77a..82d90d854666ca4d70a7e7d90c97ebe06a608216 100644 --- a/src/core/lang/lang-fr.php +++ b/src/core/lang/lang-fr.php @@ -34,8 +34,13 @@ define('_CONTACTS_GROUP_ADDED', 'Groupe de contacts ajouté'); define('_CONTACTS_GROUP_UPDATED', 'Groupe de contacts modifié'); define('_CONTACTS_GROUP_DELETED', 'Groupe de contacts supprimé'); define('_CONTACTS_GROUP_LIST_ADDED', 'Ajout de contacts dans le groupe'); +<<<<<<< c775c2ab5ad5d20ed7714655e22355e405842786 define('_CONTACTS_GROUP_LIST_DELETED', 'Suppression d\'un contact dans le groupe'); define('_CONTACTS_GROUP_LABEL_EXISTS', 'Groupe de contacts avec le même label existe déjà '); +======= +define('_CONTACTS_GROUP_LIST_DELETED', 'Suppression de contacts dans le groupe'); +define('_CONTACT_GROUP_LABEL_ALREADY_EXISTS', 'Un groupe avec ce libellé existe déjà '); +>>>>>>> FEAT #7699 added new lang var define('_DELETE_NOTIFICATIONS', 'Notification supprimée'); define('_DEST_USER', 'Destinataire'); define('_DOCTYPE_FIRSTLEVEL_ADDED', 'Chemise ajoutée'); @@ -48,6 +53,7 @@ define('_DOCUMENT_NOT_FOUND', 'Document introuvable'); define('_ENTITY_CREATION', 'Création entité'); define('_ENTITY_MODIFICATION', 'Modification entité'); define('_ENTITY_SUPPRESSION', 'Suppression entité'); +define('_ENTITY_ID_ALREADY_EXISTS', 'Cette entité existe déjà '); define('_ID', 'Identifiant'); define('_ID_TO_DISPLAY', 'res_id'); define('_INVALID_CLAUSE', 'Clause non valide'); @@ -62,6 +68,7 @@ define('_NOTIFICATION_SCRIPT_ADDED', 'Le script de la notification a été cré define('_PARAMETER_CREATION', 'Création paramètre'); define('_PARAMETER_MODIFICATION', 'Modification paramètre'); define('_PARAMETER_SUPPRESSION', 'Suppression paramètre'); +define('_PARAMETER_ID_ALREADY_EXISTS', 'Ce paramètre existe déjà '); define('_PRIORITY_CREATION', 'Création priorité'); define('_PRIORITY_MODIFICATION', 'Modification priorité'); define('_PRIORITY_SUPPRESSION', 'Suppression priorité');