diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 93e66c0c4971fe29688855283dc91ef277f4eb98..d6599f204f1f6bc4b3c409175ecf0ed041175915 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -100,16 +100,18 @@ if ($action == 'add')
 
 	if ($result > 0)
 	{
+		setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
+		
 		header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
 		exit;
 	}
 	if ($result == 0)
 	{
-		$mesg='<div class="warning">'.$langs->trans("WarningNoEMailsAdded").'</div>';
+		setEventMessage($langs->trans("WarningNoEMailsAdded"),'warnings');
 	}
 	if ($result < 0)
 	{
-		$mesg='<div class="error">'.$langs->trans("Error").($obj->error?' '.$obj->error:'').'</div>';
+		setEventMessage($langs->trans("Error").($obj->error?' '.$obj->error:''),'errors');
 	}
 }
 
diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index 6a49dd0865b3318077a97bd969a7ccfc08044579..d803de2835737aabcd50d1939523ed5bc25d4433 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -54,7 +54,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
 // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
 $hookmanager->initHooks(array('mailingcard'));
 
-// Tableau des substitutions possibles
+// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
 $object->substitutionarray=array(
     '__ID__' => 'IdRecord',
     '__EMAIL__' => 'EMail',
@@ -213,19 +213,20 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
                     $tmpfield=explode('=',$other[2],2); $other3=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
                     $tmpfield=explode('=',$other[3],2); $other4=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
                     $tmpfield=explode('=',$other[4],2); $other5=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
+                    // Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
 					$substitutionarray=array(
 							'__ID__' => $obj->source_id,
 							'__EMAIL__' => $obj->email,
-							'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
-							'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
-							'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
 							'__LASTNAME__' => $obj->lastname,
 							'__FIRSTNAME__' => $obj->firstname,
+							'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
 							'__OTHER1__' => $other1,
 							'__OTHER2__' => $other2,
 							'__OTHER3__' => $other3,
 							'__OTHER4__' => $other4,
-							'__OTHER5__' => $other5
+							'__OTHER5__' => $other5,
+							'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
+							'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>'
 					);
 					if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
 					{
@@ -731,7 +732,7 @@ else
 					// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
 					// on affiche donc juste un message
 				    $mesgembedded.='<div class="warning">'.$langs->trans("MailingNeedCommand").'</div>';
-					$mesgembedded.='<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>';
+					$mesgembedded.='<br><textarea cols="60" rows="'.ROWS_1.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>';
 					$mesgembedded.='<br><br><div class="warning">'.$langs->trans("MailingNeedCommand2").'</div>';
 					$_GET["action"]='';
 				}
@@ -915,7 +916,11 @@ else
 				print '<br><br></div>';
 			}
 
-			if (! empty($mesgembedded)) dol_htmloutput_mesg($mesgembedded,'','warning',1);
+			if (! empty($mesgembedded)) 
+			{
+				dol_htmloutput_mesg($mesgembedded,'','warning',1);
+				print '<br>';
+			}
 
 			// Affichage formulaire de TEST
 			if ($action == 'test')
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index e5a945ced78faab7654b6b0a6891f47a5d2878d7..71405a54feb253615c994a8a2f9f3ed1adc1adb9 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -167,9 +167,9 @@ if ($resql)
 
 	print '<form method="post" action="search.php" name="search_form">';
 	
-	$moreforfilter .= $langs->trans('Period') . ' ' . $langs->trans('DateOperationShort') . ': ';
+	$moreforfilter .= $langs->trans('Period') . ' ' . $langs->trans('StartDate') . ': ';
 	$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 1, 1);
-	$moreforfilter .= $langs->trans('PeriodEndDate') . ':' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 1, 1);
+	$moreforfilter .= $langs->trans('EndDate') . ':' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 1, 1);
 	
 	
 	if ($moreforfilter) {
diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php
index d54ad262fb36eecd2bbc88b5117558ef6ffbb3cf..97e4401ec2705c972f144d3ea1e6bd357076bab9 100644
--- a/htdocs/compta/prelevement/bons.php
+++ b/htdocs/compta/prelevement/bons.php
@@ -79,7 +79,7 @@ if ($result)
   print '<table class="liste" width="100%">';
 
   print '<tr class="liste_titre">';
-  print_liste_field_titre($langs->trans("WithdrawalReceipts"),"bons.php","p.ref",'','','class="liste_titre"');
+  print_liste_field_titre($langs->trans("WithdrawalsReceipts"),"bons.php","p.ref",'','','class="liste_titre"');
   print_liste_field_titre($langs->trans("Date"),"bons.php","p.datec","","",'class="liste_titre" align="center"');
   print '<td class="liste_titre" align="right">'.$langs->trans("Amount").'</td>';
   print '</tr>';
diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php
index eab227145d7a18a36691f6f76e776e9ba9f66972..92cd8c4c6a97bb77eed193e17fde18b9d334ee5d 100644
--- a/htdocs/compta/prelevement/factures.php
+++ b/htdocs/compta/prelevement/factures.php
@@ -47,7 +47,7 @@ $page = GETPOST('page','int');
 $sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha');
 $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "p.ref" : GETPOST('sortfield','alpha');
 
-llxHeader('',$langs->trans("WithdrawalReceipts"));
+llxHeader('',$langs->trans("WithdrawalsReceipts"));
 
 if ($prev_id)
 {
@@ -56,7 +56,7 @@ if ($prev_id)
   	if ($bon->fetch($prev_id) == 0)
     {
     	$head = prelevement_prepare_head($bon);
-      	dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipts"), '', 'payment');
+		dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), '', 'payment');
 
       	print '<table class="border" width="100%">';
 
diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php
index 2a32f1a12542296d43d0e3d0b024fdae1f191419..905ab6f6bf1d336b456f7de63f91a28d5209f122 100644
--- a/htdocs/compta/prelevement/fiche-rejet.php
+++ b/htdocs/compta/prelevement/fiche-rejet.php
@@ -46,7 +46,7 @@ $page = GETPOST('page','int');
 /*
  * View
  */
-llxHeader('',$langs->trans("WithdrawalReceipts"));
+llxHeader('',$langs->trans("WithdrawalsReceipts"));
 
 if ($prev_id)
 {
@@ -55,7 +55,7 @@ if ($prev_id)
   	if ($bon->fetch($prev_id) == 0)
     {
     	$head = prelevement_prepare_head($bon);
-      	dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipts"), '', 'payment');
+		dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalsReceipts"), '', 'payment');
 
       	print '<table class="border" width="100%">';
 
diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php
index 4117c7c1fcecd2418540eafd5ac293fe9a82d5b5..37b6c708b963e629b36b655c3ed895b2481002b0 100644
--- a/htdocs/compta/prelevement/fiche-stat.php
+++ b/htdocs/compta/prelevement/fiche-stat.php
@@ -44,7 +44,7 @@ $page = GETPOST('page','int');
  * View
  */
 
-llxHeader('',$langs->trans("WithdrawalReceipts"));
+llxHeader('',$langs->trans("WithdrawalsReceipts"));
 
 if ($prev_id)
 {
@@ -53,7 +53,7 @@ if ($prev_id)
 	if ($bon->fetch($prev_id) == 0)
 	{
 		$head = prelevement_prepare_head($bon);
-		dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipts"), '', 'payment');
+		dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), '', 'payment');
 
 		print '<table class="border" width="100%">';
 
diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php
index cf9440c3f1129666069130dab6a919cda93a7061..7f1a671de4af59ab0d9cec5ee67f2d8faaaecb21 100644
--- a/htdocs/compta/prelevement/fiche.php
+++ b/htdocs/compta/prelevement/fiche.php
@@ -133,7 +133,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
 $bon = new BonPrelevement($db,"");
 $form = new Form($db);
 
-llxHeader('',$langs->trans("WithdrawalReceipts"));
+llxHeader('',$langs->trans("WithdrawalsReceipts"));                                                                     i
 
 
 if ($id > 0)
@@ -141,7 +141,7 @@ if ($id > 0)
 	$bon->fetch($id);
 
 	$head = prelevement_prepare_head($bon);
-	dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipts"), '', 'payment');
+	dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalsReceipts"), '', 'payment');
 
 	if (GETPOST('error','alpha')!='')
 	{
diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php
index 18405394c9b32f2d34120a452d3eb08d4379ecd6..ebf5180eb0eb00bf7f21fb0ae590e0860eebe530 100644
--- a/htdocs/compta/prelevement/ligne.php
+++ b/htdocs/compta/prelevement/ligne.php
@@ -130,7 +130,7 @@ if ($id)
 
 		print '<table class="border" width="100%">';
 
-		print '<tr><td width="20%">'.$langs->trans("WithdrawalReceipts").'</td><td>';
+		print '<tr><td width="20%">'.$langs->trans("WithdrawalsReceipts").'</td><td>';
 		print '<a href="fiche.php?id='.$lipre->bon_rowid.'">'.$lipre->bon_ref.'</a></td></tr>';
 		print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
 		print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($lipre->amount).'</td></tr>';
diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php
index 451c875293e35a4d33fc7d1fa05e861aad5f015d..d7dac30b3afef99b53887b9347d0258a051de717 100644
--- a/htdocs/compta/prelevement/lignes.php
+++ b/htdocs/compta/prelevement/lignes.php
@@ -54,7 +54,7 @@ $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "pl.fk_soc" : GETPOST('sortf
  * View
  */
 
-llxHeader('',$langs->trans("WithdrawalReceipts"));
+llxHeader('',$langs->trans("WithdrawalsReceipts"));
 
 if ($prev_id)
 {
@@ -63,7 +63,7 @@ if ($prev_id)
 	if ($bon->fetch($prev_id) == 0)
 	{
 		$head = prelevement_prepare_head($bon);
-		dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipts"), '', 'payment');
+		dol_fiche_head($head, 'lines', $langs->trans("WithdrawalsReceipts"), '', 'payment');
 
 		print '<table class="border" width="100%">';
 
diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php
index a1db4f7e9271efb180f64bdd0b5da66d57d3ff70..9521ba7e3d25345c63270dab67684c2db4dc0e84 100644
--- a/htdocs/compta/prelevement/liste.php
+++ b/htdocs/compta/prelevement/liste.php
@@ -111,7 +111,7 @@ if ($result)
 
     print '<tr class="liste_titre">';
     print '<td class="liste_titre">'.$langs->trans("Line").'</td>';
-    print_liste_field_titre($langs->trans("WithdrawalReceipts"),$_SERVER["PHP_SELF"],"p.ref");
+    print_liste_field_titre($langs->trans("WithdrawalsReceipts"),$_SERVER["PHP_SELF"],"p.ref");
     print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"f.facnumber",'',$urladd);
     print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom");
     print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client",'','','align="center"');
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 0a44be050e7963657be01035a2cb757a4245e39a..6eae61063ba61ae5246e9a0e2779207713dd5de5 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -1615,7 +1615,7 @@ abstract class CommonObject
                 	//print 'Line '.$i.' rowid='.$obj->rowid.' vat_rate='.$obj->vatrate.' total_ht='.$obj->total_ht.' total_tva='.$obj->total_tva.' total_ttc='.$obj->total_ttc.' total_ht_by_vats='.$total_ht_by_vats[$obj->vatrate].' total_tva_by_vats='.$total_tva_by_vats[$obj->vatrate].' (new calculation = '.$tmpvat.') total_ttc_by_vats='.$total_ttc_by_vats[$obj->vatrate].($diff?" => DIFF":"")."<br>\n";
                 	if ($diff)
                 	{
-                		if (abs($diff) > 0.1) { dol_syslog('','A rounding difference was detected into TOTAL but is too high to be corrected', LOG_WARNING); exit; }
+                		if (abs($diff) > 0.1) { dol_syslog('A rounding difference was detected into TOTAL but is too high to be corrected', LOG_WARNING); exit; }
                 		$sqlfix="UPDATE ".MAIN_DB_PREFIX.$this->table_element_line." SET ".$fieldtva." = ".($obj->total_tva - $diff).", total_ttc = ".($obj->total_ttc - $diff)." WHERE rowid = ".$obj->rowid;
                 		dol_syslog('We found a difference of '.$diff.' for line rowid = '.$obj->rowid.". We fix the total_vat and total_ttc of line by running sqlfix = ".$sqlfix);
 						$resqlfix=$this->db->query($sqlfix);
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index b3574e6c4cf988371d6d031af234ecc1bd764a46..655efe5b61bf29d1e8d9b858342ebc7bd1932b3a 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -177,7 +177,7 @@ function member_stats_prepare_head($object)
     
     $head[$h][0] = DOL_URL_ROOT.'/adherents/stats/geo.php?mode=memberbyregion';
     $head[$h][1] = $langs->trans("Region");
-    $head[$h][2] = 'statscregion';
+    $head[$h][2] = 'statsregion';
     $h++;
 
     $head[$h][0] = DOL_URL_ROOT.'/adherents/stats/geo.php?mode=memberbystate';
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index 57d86558bf3d2e45fea217d8ae7289824a2b750c..5fc0eb6dd2a29c68adb362ba57a55758586a98b6 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -24,7 +24,7 @@
 /**
  *	\file       htdocs/core/modules/contract/doc/pdf_strato.modules.php
  *	\ingroup    ficheinter
- *	\brief      Fichier de la classe permettant de generer les fiches d'intervention au modele Strato
+ *	\brief      Strato contracts template class file
  */
 require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
@@ -64,7 +64,7 @@ class pdf_strato extends ModelePDFContract
 
 		$this->db = $db;
 		$this->name = 'strato';
-		$this->description = $langs->trans("DocumentModelStandard");
+		$this->description = $langs->trans("StandardContractsTemplate");
 
 		// Dimension page pour format A4
 		$this->type = 'pdf';
@@ -116,7 +116,6 @@ class pdf_strato extends ModelePDFContract
 		$outputlangs->load("dict");
 		$outputlangs->load("companies");
 		$outputlangs->load("contracts");
-		$outputlangs->load("interventions");
 
 		if ($conf->contrat->dir_output)
 		{
@@ -171,10 +170,10 @@ class pdf_strato extends ModelePDFContract
 				$pdf->SetDrawColor(128,128,128);
 
 				$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
-				$pdf->SetSubject($outputlangs->transnoentities("InterventionCard"));
+				$pdf->SetSubject($outputlangs->transnoentities("ContractCard"));
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
-				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("InterventionCard"));
+				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ContractCard"));
 				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
@@ -408,13 +407,13 @@ class pdf_strato extends ModelePDFContract
 		if (empty($hidebottom))
 		{
 			$pdf->SetXY(20,230);
-			$pdf->MultiCell(66,5, $outputlangs->transnoentities("NameAndSignatureOfInternalContact"),0,'L',0);
+			$pdf->MultiCell(66,5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0);
 
 			$pdf->SetXY(20,235);
 			$pdf->MultiCell(80,25, '', 1);
 
 			$pdf->SetXY(110,230);
-			$pdf->MultiCell(80,5, $outputlangs->transnoentities("NameAndSignatureOfExternalContact"),0,'L',0);
+			$pdf->MultiCell(80,5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0);
 
 			$pdf->SetXY(110,235);
 			$pdf->MultiCell(80,25, '', 1);
@@ -565,11 +564,11 @@ class pdf_strato extends ModelePDFContract
 				// On peut utiliser le nom de la societe du contact
 				if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 				else $socname = $object->client->nom;
-				$carac_client_name=$outputlangs->convToOutputCharset($socname);
+				$this->recipient->name=$outputlangs->convToOutputCharset($socname);
 			}
 			else
 			{
-				$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
+				$this->recipient->name=$outputlangs->convToOutputCharset($object->client->nom);
 			}
 
 			$carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target');
@@ -591,11 +590,11 @@ class pdf_strato extends ModelePDFContract
 			// Show recipient name
 			$pdf->SetXY($posx+2,$posy+3);
 			$pdf->SetFont('','B', $default_font_size);
-			$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, 'L');
+			$pdf->MultiCell($widthrecbox, 4, $this->recipient->name, 0, 'L');
 
 			// Show recipient information
 			$pdf->SetFont('','', $default_font_size - 1);
-			$pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($carac_client_name,50)*4));
+			$pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($this->recipient->name,50)*4));
 			$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
 		}
 	}
diff --git a/htdocs/core/modules/mailings/contacts4.modules.php b/htdocs/core/modules/mailings/contacts4.modules.php
index cbd05d1b15dbcd626979d42b2900dfc3d58f2ef5..acf4a31666016bcaa45f721921d06e47b3cc8c93 100644
--- a/htdocs/core/modules/mailings/contacts4.modules.php
+++ b/htdocs/core/modules/mailings/contacts4.modules.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2011 François Cerbelle <francois@cerbelle.net>
- * Copyright (C) 2013 florian HENRY <florian.henry@open-concept.pro>
+ * Copyright (C) 2013 Florian HENRY     <florian.henry@open-concept.pro>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,8 +27,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
 
 
 /**
- *     \class      mailing_contacts4
- *     \brief      Class to manage a list of personalised recipients for mailing feature
+ *     Class to manage a list of personalised recipients for mailing feature
  */
 class mailing_contacts4 extends MailingTargets
 {
@@ -78,7 +77,7 @@ class mailing_contacts4 extends MailingTargets
 
         // La requete doit retourner: id, email, fk_contact, name, firstname, other
         $sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact,";
-        $sql.= " sp.lastname, sp.firstname, sp.civility_id,";
+        $sql.= " sp.lastname, sp.firstname, sp.civilite as civility_id,";
         $sql.= " s.nom as companyname";
         $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
         if ($filtersarray[0] <> 'all')$sql.= " INNER JOIN ".MAIN_DB_PREFIX."categorie_contact as cs ON cs.fk_socpeople=sp.rowid";
diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php
index 6df8204695a42de413e17df98693f863dcdd17c7..0e79a1f6e91f86f85c6d12572ab62ccd947bc763 100644
--- a/htdocs/core/modules/mailings/fraise.modules.php
+++ b/htdocs/core/modules/mailings/fraise.modules.php
@@ -28,8 +28,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
 
 
 /**
- *	    \class      mailing_fraise
- *		\brief      Class to generate target according to rule Fraise
+ *	Class to generate target according to rule Fraise
  */
 class mailing_fraise extends MailingTargets
 {
diff --git a/htdocs/core/modules/mailings/framboise.modules.php b/htdocs/core/modules/mailings/framboise.modules.php
index 815fc4bf4eb8c31dfbac0a5959be579f13efb177..2408f0faff81f446742a9468e355d23710f869c0 100644
--- a/htdocs/core/modules/mailings/framboise.modules.php
+++ b/htdocs/core/modules/mailings/framboise.modules.php
@@ -19,8 +19,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
 
 
 /**
- *	    \class      mailing_framboise
- *		\brief      Class to manage a list of personalised recipients for mailing feature
+ *	Class to manage a list of personalised recipients for mailing feature
  */
 class mailing_framboise extends MailingTargets
 {
@@ -58,11 +57,14 @@ class mailing_framboise extends MailingTargets
 	function add_to_target($mailing_id,$filtersarray=array())
 	{
 		global $conf, $langs;
-
+		$langs->load("members");
+		$langs->load("companies");
+		
 		$cibles = array();
 
 		// Select the members from category
 		$sql = "SELECT a.rowid as id, a.email as email, a.lastname, null as fk_contact, a.firstname,";
+		$sql.= " a.datefin, a.civilite as civility_id, a.login, a.societe,";	// Other fields
 		if ($_POST['filter']) $sql.= " c.label";
 		else $sql.=" null as label";
 		$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
@@ -97,7 +99,12 @@ class mailing_framboise extends MailingTargets
                     			'fk_contact' => $obj->fk_contact,
                     			'lastname' => $obj->lastname,
                     			'firstname' => $obj->firstname,
-                    			'other' => ($obj->label?$langs->transnoentities("Category").'='.$obj->label:''),
+                    			'other' =>
+                                ($langs->transnoentities("Login").'='.$obj->login).';'.
+                                ($langs->transnoentities("UserTitle").'='.($obj->civility_id?$langs->transnoentities("Civility".$obj->civility_id):'')).';'.
+                                ($langs->transnoentities("DateEnd").'='.dol_print_date($this->db->jdate($obj->datefin),'day')).';'.
+                                ($langs->transnoentities("Company").'='.$obj->societe).';'.
+								($obj->label?$langs->transnoentities("Category").'='.$obj->label:''),
                                 'source_url' => $this->url($obj->id),
                                 'source_id' => $obj->id,
                                 'source_type' => 'member'
diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php
index e038cfd3ceb1fa8e99222c807de5431145f88e86..3c0238da902477eb9057a8a2115425c2f012f369 100644
--- a/htdocs/core/modules/mailings/pomme.modules.php
+++ b/htdocs/core/modules/mailings/pomme.modules.php
@@ -143,12 +143,13 @@ class mailing_pomme extends MailingTargets
 	function add_to_target($mailing_id,$filtersarray=array())
 	{
 		global $conf, $langs;
-
+		$langs->load("companies");
+		
 		$cibles = array();
 
-		// La requete doit retourner: id, email, fk_contact, name, firstname
+		// La requete doit retourner: id, email, fk_contact, lastname, firstname
 		$sql = "SELECT u.rowid as id, u.email as email, null as fk_contact,";
-		$sql.= " u.lastname as name, u.firstname as firstname, u.civilite as civility_id, u.login, u.office_phone";
+		$sql.= " u.lastname as lastname, u.firstname as firstname, u.civilite as civility_id, u.login, u.office_phone";
 		$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
 		$sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
 		$sql.= " AND u.entity IN (0,".$conf->entity.")";
diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php
index ecb14ce6ed5b9f3f66eadae880e756016792ae50..9d7fb16aaaba5deaaebb8f7cee5fd4c3cc239542 100644
--- a/htdocs/core/modules/mailings/thirdparties.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties.modules.php
@@ -108,8 +108,8 @@ class mailing_thirdparties extends MailingTargets
 					$cibles[$j] = array(
                     			'email' => $obj->email,
                     			'fk_contact' => $obj->fk_contact,
-                    			'lastname' => $obj->lastname,
-                    			'firstname' => $obj->firstname,
+                    			'lastname' => $obj->name,	// For a thirdparty, we must use name
+                    			'firstname' => '',			// For a thirdparty, lastname is ''
                     			'other' => ($obj->label?$langs->transnoentities("Category").'='.$obj->label:''),
                                 'source_url' => $this->url($obj->id),
                                 'source_id' => $obj->id,
diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
index fc135b77df5a544222968943606769cb9229a006..a907ad0ec3f0ed8a3fb59517abb5655c9bb6a811 100644
--- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
@@ -39,6 +39,8 @@ class mailing_thirdparties_services_expired extends MailingTargets
      */
     function __construct($db)
     {
+    	global $conf;
+    	
         $this->db=$db;
 
         $this->arrayofproducts=array();
@@ -46,7 +48,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
         // List of services
         $sql = "SELECT ref FROM ".MAIN_DB_PREFIX."product";
         $sql.= " WHERE entity IN (".getEntity('product', 1).")";
-        $sql.= " AND fk_product_type = 1";
+        if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $sql.= " AND fk_product_type = 1";	// By default, only services
         $sql.= " ORDER BY ref";
         $result=$this->db->query($sql);
         if ($result)
@@ -123,7 +125,8 @@ class mailing_thirdparties_services_expired extends MailingTargets
                 {
                     $cibles[$j] = array(
 					'email' => $obj->email,
-					'lastname' => $obj->lastname,
+					'lastname' => $obj->name,	// For thirdparties, lastname must be name
+                    'firstname' => '',			// For thirdparties, firstname is ''
 					'other' =>
                     ('StartDate='.dol_print_date($this->db->jdate($obj->date_ouverture),'day')).';'.
                     ('EndDate='.dol_print_date($this->db->jdate($obj->date_fin_validite),'day')).';'.
@@ -142,8 +145,8 @@ class mailing_thirdparties_services_expired extends MailingTargets
         }
         else
         {
-            dol_syslog($this->db->error());
-            $this->error=$this->db->error();
+            dol_syslog($this->db->lasterror());
+            $this->error=$this->db->lasterror();
             return -1;
         }
 
@@ -193,7 +196,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
         $sql.= " AND cd.statut= 4 AND cd.fk_product=p.rowid";
         $sql.= " AND p.ref IN ('".join("','",$this->arrayofproducts)."')";
         $sql.= " AND cd.date_fin_validite < '".$this->db->idate($now)."'";
-        //print $sql;
+
         $a=parent::getNbOfRecipients($sql);
 
         return $a;
diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php
index c412db448a90aa790e3683c6f162bd9ccfe07347..0d01aa539123aecf668271852246ef48d24dcf40 100644
--- a/htdocs/core/modules/mailings/xinputuser.modules.php
+++ b/htdocs/core/modules/mailings/xinputuser.modules.php
@@ -104,7 +104,7 @@ class mailing_xinputuser extends MailingTargets
 		global $langs;
 
 		$s='';
-		$s.='<input type="text" name="xinputuser" class="flat" size="40">';
+		$s.='<input type="text" name="xinputuser" class="flat" size="40" value="'.GETPOST("xinputuser").'">';
 		return $s;
 	}
 
diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php
index 129b7966d4592351f68e1b4d11c6c637667fe804..c9ba87250bb999cc9794ca277903dcfd7867b984 100644
--- a/htdocs/core/modules/modBarcode.class.php
+++ b/htdocs/core/modules/modBarcode.class.php
@@ -95,7 +95,7 @@ class modBarcode extends DolibarrModules
         						'leftmenu'=>'barcodeprint',
         						'type'=>'left',			                // This is a Left menu entry
 						        'titre'=>'BarCodePrintsheet',
-						        'url'=>'/barcode/printsheet.php?mainmenu=home&amp;leftmenu=modulesadmintools',
+						        'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint',
 						        'langs'=>'products',	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
 						        'position'=>200,
 						        'enabled'=>'$conf->barcode->enabled',  // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
diff --git a/htdocs/install/check.php b/htdocs/install/check.php
index 7e2f57cfb02774c26eb0339aac4cd151b29143e1..57dccdc1b0af3b4190236c5fb621840503ba334d 100644
--- a/htdocs/install/check.php
+++ b/htdocs/install/check.php
@@ -155,7 +155,7 @@ if ($memmaxorig != '')
 		if (strtoupper($reg[2]) == 'M') $memmax=$reg[1]*1024*1024;
 		if (strtoupper($reg[2]) == 'K') $memmax=$reg[1]*1024;
 	}
-	if ($memmax >= $memrequired)
+	if ($memmax >= $memrequired || $memmax == -1)
 	{
 		print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPMemoryOK",$memmaxorig,$memrequiredorig)."<br>\n";
 	}
@@ -212,13 +212,13 @@ else
 		else dolibarr_install_syslog("failed to create a new file ".$conffile." into current dir ".getcwd().". Check permission.", LOG_ERR);
 	}
 
-	// First install, on ne peut pas upgrader
+	// First install, we can't upgrade
 	$allowupgrade=0;
 }
 
 
 
-// Si fichier absent et n'a pu etre cree
+// File is missng and can't be created
 if (! file_exists($conffile))
 {
 	print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated",$conffiletoshow);
@@ -231,7 +231,7 @@ if (! file_exists($conffile))
 }
 else
 {
-	// Si fichier present mais ne peut etre modifie
+	// File exists but can't be modified
 	if (!is_writable($conffile))
 	{
 		if ($confexists)
@@ -248,7 +248,7 @@ else
 
 		$allowinstall=0;
 	}
-	// Si fichier present et peut etre modifie
+	// File exists and can be modified
 	else
 	{
 		if ($confexists)
@@ -267,12 +267,12 @@ else
 	}
 	print "<br>\n";
 
-	// Si prerequis ok, on affiche le bouton pour passer a l'etape suivante
+	// Requirements ok, we display the next step button
 	if ($checksok)
 	{
 		$ok=0;
 
-		// Try to create db connexion
+		// Try to create db connection
 		if (file_exists($conffile))
 		{
 			include_once $conffile;
@@ -523,5 +523,5 @@ $("div#AShowChoices a").click(function() {
 
 </script>';
 
-pFooter(1);	// 1 car ne doit jamais afficher bouton Suivant
+pFooter(true);	// Never display next button
 
diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang
index 622c8ca89d93dc721a7094b9adce905d44512118..8a554a9770bf1a76fa112f7fab232f75d939e9cb 100644
--- a/htdocs/langs/en_US/contracts.lang
+++ b/htdocs/langs/en_US/contracts.lang
@@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days
 ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days
 ListOfServicesToExpire=List of Services to expire
 NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative.
+StandardContractsTemplate=Standard contracts template
+ContactNameAndSignature=For %s, name and signature:
 
 ##### Types de contacts #####
 TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract
diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang
index 2fd9c09c53430f9b8b6fee647859cb11163a6ab3..0ad861233139e32ccdad6d9ec3987c95803b2a57 100644
--- a/htdocs/langs/en_US/mails.lang
+++ b/htdocs/langs/en_US/mails.lang
@@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email
 ActivateCheckRead=Allow to use the "Unsubcribe" link
 ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature
 EMailSentToNRecipients=EMail sent to %s recipients.
+XTargetsAdded=<b>%s</b> recipients added into target list
 EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email.
 MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s)
 SendRemind=Send reminder by EMails
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 9c61c58b49d7d87cd0de464e762953d2f455fe81..684ee5ef20aad9cdfd8b2ac86be72b71a09acfe3 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics
 ProductsStatistics=Products statistics
 ProductsOnSell=Available products
 ProductsNotOnSell=Obsolete products
+ProductsOnSellAndOnBuy=Products not for sale nor purchase
 ServicesOnSell=Available services
 ServicesNotOnSell=Obsolete services
+ServicesOnSellAndOnBuy=Services not for sale nor purchase
 InternalRef=Internal reference
 LastRecorded=Last products/services on sell recorded
 LastRecordedProductsAndServices=Last %s recorded products/services
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index a2ef6752513a58c25d6da6e91c7cd7994c94b461..851e050fa644d758c4d93c4b1474086c743b49fd 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1621,9 +1621,12 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
 		//Dolibarr version
 	    $doliurl='http://www.dolibarr.org';
 
-	    //local communities
-	    if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';
+		//local communities
+		if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';
 		if (preg_match('/es/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.es';
+		if (preg_match('/de/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.de';
+		if (preg_match('/it/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.it';
+		if (preg_match('/gr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.gr';
 
 	    $appli='Dolibarr';
 	    if (! empty($conf->global->MAIN_APPLICATION_TITLE))
diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php
index e053754e039c7193e16cbb83c5846d3ad868570c..5bb227dde46a763677d4082b647d5cb804c45372 100644
--- a/htdocs/societe/admin/societe.php
+++ b/htdocs/societe/admin/societe.php
@@ -765,18 +765,20 @@ print '</tr>';
 $var=!$var;
 print "<tr ".$bc[$var].">";
 print '<td width="80%">'.$langs->trans("AddRefInList").'</td>';
+print '<td>&nbsp</td>';
+print '<td align="center">';
 if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST))
 {
-	print '<td align="center" colspan="2"><a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=0">';
+	print '<a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=0">';
 	print img_picto($langs->trans("Activated"),'switch_on');
-	print '</a></td>';
+
 }
 else
 {
-	print '<td align="center" colspan="2"><a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=1">';
+	print '<a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=1">';
 	print img_picto($langs->trans("Disabled"),'switch_off');
-	print '</a></td>';
 }
+print '</a></td>';
 print '</tr>';
 
 
diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php
index aef1bc7f8469760e0580b66845156c5cc9bd0bb5..4f341b7a39b81facc9ad17f4f12c9b9c7ccf4024 100755
--- a/scripts/emailings/mailing-send.php
+++ b/scripts/emailings/mailing-send.php
@@ -144,19 +144,21 @@ if ($resql)
 						$other3=$other[2];
 						$other4=$other[3];
 						$other5=$other[4];
+						// Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
 						$substitutionarray=array(
 							'__ID__' => $obj->source_id,
 							'__EMAIL__' => $obj->email,
-							'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj2->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
-							'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj2->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
-							'__MAILTOEMAIL__' => '<a href="mailto:'.$obj2->email.'">'.$obj2->email.'</a>',
 							'__LASTNAME__' => $obj2->lastname,
 							'__FIRSTNAME__' => $obj2->firstname,
+							'__MAILTOEMAIL__' => '<a href="mailto:'.$obj2->email.'">'.$obj2->email.'</a>',
 							'__OTHER1__' => $other1,
 							'__OTHER2__' => $other2,
 							'__OTHER3__' => $other3,
 							'__OTHER4__' => $other4,
-							'__OTHER5__' => $other5
+							'__OTHER5__' => $other5,
+							'__SIGNATURE__' => '',	// Signature is empty when ran from command line (user is a bot)
+							'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj2->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
+							'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj2->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>'
 						);
 						if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
 						{
diff --git a/test/phpunit/testemailing.txt b/test/phpunit/testemailing.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a8b34c83393d9df2e5bd6f38b3d79d10c9c9a923
--- /dev/null
+++ b/test/phpunit/testemailing.txt
@@ -0,0 +1 @@
+test@bidon.com;Name of user;Lastname of user;Other
\ No newline at end of file