Trad: Traduction du titre des mails d'envoi de facture et propal

This commit is contained in:
Laurent Destailleur 2005-02-23 22:58:20 +00:00
parent 0d79b4f4d1
commit 4fd8364999
7 changed files with 30 additions and 10 deletions

View File

@ -802,7 +802,7 @@ if ($_GET["propalid"])
$formmail->withfrom=1;
$formmail->withto=ucfirst(strtolower($obj->firstname)) . " " . ucfirst(strtolower($obj->name)) . " <$obj->email>";
$formmail->withcc=1;
$formmail->withtopic=1;
$formmail->withtopic=$langs->trans("SendPropalRef","__PROPREF__");
$formmail->withfile=1;
$formmail->withbody=1;
// Tableau des substitutions

View File

@ -1403,7 +1403,7 @@ else
$formmail->withfrom=1;
$formmail->withto=$liste;
$formmail->withcc=1;
$formmail->withtopic=1;
$formmail->withtopic=$langs->trans("SendBillRef","__FACREF__");
$formmail->withfile=1;
$formmail->withbody=1;
// Tableau des substitutions
@ -1437,7 +1437,7 @@ else
$formmail->withfrom=1;
$formmail->withto=$liste;
$formmail->withcc=1;
$formmail->withtopic=1;
$formmail->withtopic=$langs->trans("SendReminderBillRef","__FACREF__");
$formmail->withfile=1;
$formmail->withbody=1;
// Tableau des substitutions

View File

@ -89,6 +89,20 @@ class FormMail
}
/*
* \brief Effectue les substitutions des mots clés par les données en fonction du tableau $this->substit
* \param chaine chaine dans laquelle faire les substitutions
* \return string chaine avec les substitutions effectuées
*/
function make_substitutions($chaine)
{
foreach ($this->substit as $key=>$value) {
$chaine=ereg_replace($key,$value,$chaine);
}
return $chaine;
}
/*
* \brief Affiche la partie de formulaire pour saisie d'un mail en fonction des propriétés
*/
@ -165,6 +179,8 @@ class FormMail
// Topic
if ($this->withtopic)
{
$this->withtopic=$this->make_substitutions($this->withtopic);
print "<tr>";
print "<td width=\"180\">".$langs->trans("MailTopic")."</td>";
print "<td>";
@ -197,11 +213,10 @@ class FormMail
// \todo A partir du type, proposer liste de messages dans table llx_models
if ($this->param["models"]=='body') { $defaultmessage=$this->withbody; }
if ($this->param["models"]=='facture_send') { $defaultmessage="Veuillez trouver ci-joint la facture __FACREF__\n\nCordialement\n\n"; }
if ($this->param["models"]=='facture_relance') { $defaultmessage="Nous apportons à votre connaissance que la facture __FACREF__ ne semble toujours pas avoir été réglée. La voici donc, pour rappel, en pièce jointe.\n\nCordialement\n\n"; }
if ($this->param["models"]=='facture_relance') { $defaultmessage="Nous apportons à votre connaissance que la facture __FACREF__ ne semble pas avoir été réglée. La voici donc, pour rappel, en pièce jointe.\n\nCordialement\n\n"; }
foreach ($this->substit as $key=>$value) {
$defaultmessage=ereg_replace($key,$value,$defaultmessage);
}
$defaultmessage=$this->make_substitutions($defaultmessage);
print "<tr>";
print "<td width=\"180\" valign=\"top\">".$langs->trans("MailText")."</td>";
print "<td>";

View File

@ -59,4 +59,5 @@ AlreadyPayed=Already payed
RemainderToPay=Remainder to pay
RemainderToTake=Remainder to take
CreateDraft=Create draft
SendBillRef=Send bill %s
SendReminderBillRef=Send bill %s (reminder)

View File

@ -25,4 +25,5 @@ ListOfCustomers=List of customers
LastDoneTasks=Last done tasks
LastRecordedTasks=Last recorded tasks
DoneAndToDoTasksFor=Done and To do tasks for
DoneAndToDoTasks=Done and To do tasks
DoneAndToDoTasks=Done and To do tasks
SendPropalRef=Send commercial proposal %s

View File

@ -58,4 +58,6 @@ ShowBill=Afficher facture
AlreadyPayed=Déjà réglé
RemainderToPay=Reste à payer
RemainderToTake=Reste à encaisser
CreateDraft=Créer brouillon
CreateDraft=Créer brouillon
SendBillRef=Envoi facture %s
SendReminderBillRef=Relance facture %s

View File

@ -26,3 +26,4 @@ LastDoneTasks=Derni
LastRecordedTasks=Dernières actions enregistrées
DoneAndToDoTasksFor=Liste des actions commerciales réalisées ou à faire pour
DoneAndToDoTasks=Liste des actions commerciales réalisées ou à faire
SendPropalRef=Envoi proposition commerciale %s