From 39eaaa1acc24d29bda6a19a35347defd12f3d432 Mon Sep 17 00:00:00 2001
From: Nestor <npegane@hotmail.com>
Date: Wed, 16 May 2018 16:48:07 +0200
Subject: [PATCH] RESOLVE CONFLICT

---
 modules/entities/lang/en.php                           | 3 ---
 modules/entities/lang/fr.php                           | 3 ---
 src/app/contact/controllers/ContactGroupController.php | 4 ++++
 src/app/entity/controllers/EntityController.php        | 2 +-
 src/app/parameter/controllers/ParameterController.php  | 2 +-
 src/core/lang/lang-en.php                              | 7 +++++++
 src/core/lang/lang-fr.php                              | 7 +++++++
 7 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/modules/entities/lang/en.php b/modules/entities/lang/en.php
index 6e706136d0f..0044daa5197 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 0c8cb9cbc27..cd61a35f2d2 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 6c2409d3cdb..4608867860d 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 d62ee942331..fddc620d10c 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 61c5b1d9536..343831523d6 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 825903904f0..6f24f97eef2 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 77a4a0f86c2..82d90d85466 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é');
-- 
GitLab