Commit 1014aefe by Denis Chenu

[doc] Fix some language string

parent ab7bb215
.search-100 .select2-container .select2-search__field{
width: 100%!important;
}
......@@ -154,12 +154,27 @@ class sendMailCron extends PluginBase
{
Yii::setPathOfAlias('sendMailCron', dirname(__FILE__));
Yii::import("sendMailCron.sendMailCronTranslate");
$assetsUrl=Yii::app()->assetManager->publish(dirname(__FILE__) . '/assets');
Yii::app()->getClientScript()->registerCssFile($assetsUrl.'/admin.css');
$this->translate = new sendMailCronTranslate;
$event = $this->event;
// Must control if token table exist
$iSurveyId=$event->get('survey');
if(tableExists("{{tokens_{$iSurveyId}}}"))
{
/* get the default settings */
$defaultMaxEmail=$this->get('maxEmail', null,null,$this->settings['maxEmail']['default']);
if(!$defaultMaxEmail){
$defaultMaxEmail=$this->translate->gT("disabled");
}
$defaultDelayInvitation=$this->get('delayInvitation', null,null,$this->settings['delayInvitation']['default']);
$defaultDelayReminder=$this->get('delayReminder', null,null,$this->settings['delayReminder']['default']);
$maxBatchSize=$this->get('maxBatchSize', null,null,$this->settings['maxBatchSize']['default']);
if(!$maxBatchSize){
$maxBatchHelp=$this->translate->gT("Leave empty to send all available emails.");
}else{
$maxBatchHelp=sprintf($this->translate->gT("Leave empty to send all available emails,only limited by global batch size (%s) for all surveys."),$maxBatchSize);
}
$oSurvey=Survey::model()->findByPk($iSurveyId);
$aSettings=array(
'maxEmail' => array(
......@@ -167,8 +182,8 @@ class sendMailCron extends PluginBase
'htmlOptions'=>array(
'min'=>0,
),
'label'=>$this->translate->gT("Max email to send (invitation + remind) to each particpant."),
'help'=>$this->translate->gT("0 to deactivate sending of email, empty to use default"),
'label'=>$this->translate->gT("Max email to send (invitation + remind) to each participant."),
'help'=>sprintf($this->translate->gT("0 to deactivate sending of email, empty to use default (%s)"),$defaultMaxEmail),
'current'=>$this->get('maxEmail', 'Survey', $iSurveyId,""),
),
'delayInvitation' => array(
......@@ -177,7 +192,7 @@ class sendMailCron extends PluginBase
'min'=>1,
),
'label'=>$this->translate->gT("Min delay between invitation and first reminder."),
'help'=>$this->translate->gT("Empty for default"),
'help'=>sprintf($this->translate->gT("In days, empty for default (%s)"),$defaultDelayInvitation),
'current'=>$this->get('delayInvitation', 'Survey', $iSurveyId,""),
),
'delayReminder' => array(
......@@ -186,7 +201,7 @@ class sendMailCron extends PluginBase
'min'=>1,
),
'label'=>$this->translate->gT("Min delay between reminders."),
'help'=>$this->translate->gT("Empty for default"),
'help'=>sprintf($this->translate->gT("In days, empty for default (%s)"),$defaultDelayReminder),
'current'=>$this->get('delayReminder', 'Survey', $iSurveyId,""),
),
'maxSurveyBatchSize'=>array(
......@@ -195,7 +210,7 @@ class sendMailCron extends PluginBase
'min'=>1,
),
'label'=>$this->translate->gT("Max email to send (invitation + remind) in one batch for this survey."),
'help'=>$this->translate->gT("Leave empty to use only global batch size. In any condition, global batch size is take in account"),
'help'=>$maxBatchHelp,
'current'=>$this->get('maxSurveyBatchSize', 'Survey', $iSurveyId,""),
),
'maxSurveyBatchSize_invite'=>array(
......@@ -204,7 +219,7 @@ class sendMailCron extends PluginBase
'min'=>1,
),
'label'=>$this->translate->gT("Max email to send for invitation in one batch for this survey."),
'help'=>"The max email setting is always taken into account",
'help'=>$this->translate->gT("The max email setting can not be exceeded."),
'current'=>$this->get('maxSurveyBatchSize_invite', 'Survey', $iSurveyId,""),
),
'maxSurveyBatchSize_remind'=>array(
......@@ -213,19 +228,22 @@ class sendMailCron extends PluginBase
'min'=>1,
),
'label'=>$this->translate->gT("Max email to send for reminder in one batch for this survey."),
'help'=>"The max email setting is always taken into account, reminders are sent after all new invitation",
'help'=>$this->translate->gT("The max email setting can not be exceeded. Reminders are sent after invitation, using the remainder of sends available."),
'current'=>$this->get('maxSurveyBatchSize_remind', 'Survey', $iSurveyId,""),
),
'dayOfWeekToSend'=>array(
'type'=>'select',
'htmlOptions'=>array(
'multiple'=>'multiple',
'empty'=>'',
'empty'=>$this->translate->gT("All week days"),
),
'selectOptions'=>array(
'placeholder' =>$this->translate->gT("All week days"),
'allowClear'=> true,
'width'=>'100%',
),
'controlOptions'=>array(
'class'=>'search-100',
),
'label'=>$this->translate->gT("Day of week for sending email"),
'options'=>array(
......@@ -303,6 +321,7 @@ class sendMailCron extends PluginBase
$iSurvey=$oSurvey->sid;
if(tableExists("{{tokens_{$iSurvey}}}"))
{
$this->sendMailCronLog("sendMailByCron for {$iSurvey}",1);
if($maxBatchSize && $maxBatchSize<=$this->currentBatchSize){
$this->sendMailCronLog("sendMailByCron deactivated for {$iSurvey} due to batch size",1);
break;
......@@ -315,7 +334,6 @@ class sendMailCron extends PluginBase
$this->sendMailCronLog("sendMailByCron deactivated for {$iSurvey} for today",1);
break;
}
$this->sendMailCronLog("sendMailByCron for {$iSurvey}",1);
Yii::app()->setConfig('surveyID',$iSurvey);
// Fill some information for this
$this->currentSurveyBatchSize=0;
......
......@@ -25,17 +25,20 @@ class sendMailCronTranslate
*/
private $aTranslation=array(
'fr'=>array(
"disabled"=>"désactivé",
"no limit"=>"non limité",
"Max email to send (invitation + remind) to each particpant."=>"Nombre de messages maximum à envoyer à chaque participant.",
"0 to deactivate sending of email, empty to use default"=>"0 pour désactiver l'envoi automatique de message, vide pour la valeur par défaut",
"Min delay between invitation and first reminder."=>"Délais minimum entre l'invitation et la première relance",
"Empty for default"=>"Vide pour utiliser la veur par défaut",
"Min delay between reminders."=>"Délais minimum entre les relances",
"Max email to send (invitation + remind) in one batch for this survey."=>"Nombre maximum de messages à envoyer à chaque passage",
"Leave empty to use only global batch size. In any condition, global batch size is take in account"=>"Laisser vide pour n'utiliser que la paramètre global, celui-ci est toujours pris en compte",
"Max email to send for invitation in one batch for this survey."=>"Nombre maximum d'invitation à envoyer à chaque passage",
"The max email setting is always taken into account"=>"Le nombre maximum d'envoi est toujours pris en compte",
"Max email to send for reminder in one batch for this survey."=>"Nombre maximum de relance à envoyer à chaque passage",
"The max email setting is always taken into account, reminders are sent after all new invitation"=>"Le nombre maximum d'envoi est toujours pris en compte, les relances sont envoyées après les invitations",
"0 to deactivate sending of email, empty to use default (%s)"=>"0 pour désactiver l'envoi automatique de message, vide pour la valeur par défaut (%s)",
"Min delay between invitation and first reminder."=>"Délai minimum entre l'invitation et la première relance",
"Min delay between reminders."=>"Délai minimum entre les relances",
"In days, empty for default (%s)"=>"En jour, vide pour utiliser la valeur par défaut (%s)",
"Max email to send (invitation + remind) in one batch for this survey."=>"Nombre maximum de messages à envoyer à chaque exécution",
"Leave empty to send all available emails."=>"Laisser vide pour envoyer tous les messages possibles",
"Leave empty to send all available emails,only limited by global batch size (%s) for all surveys."=>"Laisser vide pour envoyer tous les messages possibles, seulement limité par le paramètre global (%s) pour tous les questionnaires.",
"Max email to send for invitation in one batch for this survey."=>"Nombre maximum d'invitation à envoyer à chaque exécution",
"The max email setting can not be exceeded."=>"Le nombre maximum d'envoi ne pourra pas être dépassé",
"Max email to send for reminder in one batch for this survey."=>"Nombre maximum de relance à envoyer à chaque exécution",
"The max email setting can not be exceeded. Reminders are sent after invitation, using the remainder of sends available."=>"Le nombre maximum d'envoi est toujours pris en compte, les relances sont envoyées après les invitations en utilisant le reste des envois disponibles.",
"Day of week for sending email"=>"Jours de la semaine pour l'envoi des message",
"All week days"=>"Tous les jours de la semaine",
"Monday"=>"Lundi",
......@@ -45,9 +48,9 @@ class sendMailCronTranslate
"Friday"=>"Vendredi",
"Saturday"=>"Samedi",
"Sunday"=>"Dimanche",
"Send reminders to "=>"Envoi des relance à ",
"Send reminders to "=>"Envoi des relances à ",
"all participants"=>"Tous les participants",
"participants who did not started survey."=>"aux particpants qui n'ont pas démarré le questionaire",
"participants who did not started survey."=>"aux participants qui n'ont pas démarré le questionaire",
"participants who started survey."=>"aux participants qui ont démarré le questionnaire",
),
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment