Fix trans

This commit is contained in:
Laurent Destailleur 2022-01-05 20:49:38 +01:00
parent 0674a48cb5
commit 1471c2422d
2 changed files with 15 additions and 3 deletions

View File

@ -583,17 +583,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$arrayoftypes = array(
'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
'recordjoinpiece'=>$langs->trans('recordjoinpieceonobject'),
'recordjoinpiece'=>'AttachJoinedDocumentsToObject',
'recordevent'=>'RecordEvent');
$arrayoftypesnocondition = $arrayoftypes;
if ($conf->projet->enabled) {
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
}
$arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
if ($conf->ticket->enabled) {
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
}
$arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty';
if ($conf->recruitment->enabled) {
$arrayoftypes['candidature'] = 'CreateCandidature';
}
$arrayoftypesnocondition['candidature'] = 'CreateCandidature';
// support hook for add action
$parameters = array('arrayoftypes' => $arrayoftypes);
@ -629,7 +633,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<tr class="drag drop oddeven" id="row-'.$ruleaction['id'].'">';
print '<td>';
print '<!-- type of action: '.$ruleaction['type'].' -->';
print $langs->trans($arrayoftypes[$ruleaction['type']]);
if (array_key_exists($ruleaction['type'], $arrayoftypes)) {
print $langs->trans($arrayoftypes[$ruleaction['type']]);
} else {
if (array_key_exists($ruleaction['type'], $arrayoftypesnocondition)) {
print '<span class="opacitymedium">'.$langs->trans($arrayoftypesnocondition[$ruleaction['type']]).' - '.$langs->trans("Disabled").'</span>';
}
}
if (in_array($ruleaction['type'], array('recordevent'))) {
print $form->textwithpicto('', $langs->transnoentitiesnoconv('IfTrackingIDFoundEventWillBeLinked'));
} elseif (in_array($ruleaction['type'], array('loadthirdparty', 'loadandcreatethirdparty'))) {

View File

@ -2071,11 +2071,12 @@ NothingProcessed=Nothing done
XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done)
RecordEvent=Record email event
CreateLeadAndThirdParty=Create lead (and third party if necessary)
CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation)
CreateTicketAndThirdParty=Create ticket (linked to a third party if the third party was loaded by a previous operation, with no link to any third party otherwise)
CodeLastResult=Latest result code
NbOfEmailsInInbox=Number of emails in source directory
LoadThirdPartyFromName=Load third party searching on %s (load only)
LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found)
AttachJoinedDocumentsToObject=Save attached files into object documents if a ref of an object is found into email topic.
WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr
WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr
WithDolTrackingIDInMsgId=Message sent from Dolibarr