From 68fb10cacb984f7ce4427c91aeb7ed7a6791b592 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Wed, 8 Nov 2017 10:36:49 +0100 Subject: [PATCH 01/51] Added DCA fields for delayed sending --- dca/tl_nc_gateway.php | 10 +++++++++- dca/tl_nc_queue.php | 6 ++++++ languages/en/tl_nc_gateway.php | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dca/tl_nc_gateway.php b/dca/tl_nc_gateway.php index e7c5b812..8a8cfe28 100644 --- a/dca/tl_nc_gateway.php +++ b/dca/tl_nc_gateway.php @@ -97,7 +97,7 @@ ( '__selector__' => array('type', 'queue_cronEnable', 'email', 'email_overrideSmtp', 'file_connection'), 'default' => '{title_legend},title,type', - 'queue' => '{title_legend},title,type;{gateway_legend},queue_targetGateway;{cronjob_legend},queue_cronExplanation,queue_cronEnable', + 'queue' => '{title_legend},title,type;{gateway_legend},queue_targetGateway,queue_delay;{cronjob_legend},queue_cronExplanation,queue_cronEnable', 'email' => '{title_legend},title,type;{gateway_legend},email_overrideSmtp,', 'file' => '{title_legend},title,type;{gateway_legend},file_type,file_connection', 'postmark' => '{title_legend},title,type;{gateway_legend},postmark_key,postmark_test,postmark_ssl', @@ -164,6 +164,14 @@ 'eval' => array('mandatory'=>true, 'includeBlankOption'=>true, 'tl_class'=>'w50'), 'sql' => "int(10) NOT NULL default '0'" ), + 'queue_delay' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_delay'], + 'exclude' => true, + 'inputType' => 'text', + 'eval' => array('maxlength' => 64, 'tl_class'=>'w50'), + 'sql' => "varchar(64) NOT NULL default ''" + ), 'queue_cronExplanation' => array ( 'exclude' => true, diff --git a/dca/tl_nc_queue.php b/dca/tl_nc_queue.php index 586a0142..7ffafbc1 100644 --- a/dca/tl_nc_queue.php +++ b/dca/tl_nc_queue.php @@ -112,6 +112,12 @@ 'flag' => 6, 'sql' => "int(10) unsigned NOT NULL default '0'" ), + 'dateDelay' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_nc_queue']['dateDelay'], + 'flag' => 6, + 'sql' => "int(10) unsigned NOT NULL default '0'" + ), 'dateSent' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_nc_queue']['dateSent'], diff --git a/languages/en/tl_nc_gateway.php b/languages/en/tl_nc_gateway.php index 17c87ce5..94698112 100644 --- a/languages/en/tl_nc_gateway.php +++ b/languages/en/tl_nc_gateway.php @@ -14,6 +14,7 @@ $GLOBALS['TL_LANG']['tl_nc_gateway']['title'] = array('Title', 'Please enter a title for this gateway.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['type'] = array('Type', 'Please select a type for this gateway.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_targetGateway'] = array('Target gateway', 'This gateway will queue all the messages and then send them over the gateway you define here.'); +$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_delay'] = array('Delayed delivery', 'Enter a strtotime time interval to delay message delivery.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronEnable'] = array('Enable poor man\'s cronjob', 'This will register this queue gateway to the poor man\'s cronjob.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval'] = array('Interval', 'Choose the interval you would like to have this queue gateway be invoked.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronMessages'] = array('Number of messages', 'Here you can enter the number of messages that should be sent per invocation.'); From 1cc0ef53af312f7013403febb504b9ec1573b475 Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Wed, 8 Nov 2017 11:23:02 +0100 Subject: [PATCH 02/51] Added the logic for queue delay --- classes/tl_nc_gateway.php | 18 ++++++++++++++++++ dca/tl_nc_gateway.php | 6 +++++- dca/tl_nc_queue.php | 2 +- languages/en/tl_nc_gateway.php | 2 +- languages/en/tl_nc_queue.php | 1 + .../NotificationCenter/Model/QueuedMessage.php | 3 ++- .../NotificationCenter/Queue/QueueManager.php | 6 ++++++ 7 files changed, 34 insertions(+), 4 deletions(-) diff --git a/classes/tl_nc_gateway.php b/classes/tl_nc_gateway.php index ca962dd5..d9697b82 100644 --- a/classes/tl_nc_gateway.php +++ b/classes/tl_nc_gateway.php @@ -23,6 +23,24 @@ public function loadSettingsLanguageFile() \System::loadLanguageFile('tl_settings'); } + /** + * Validate the queue delay + * + * @param string $value + * + * @return string + * + * @throws \RuntimeException + */ + public function validateQueueDelay($value) + { + if ($value && strtotime($value) === false) { + throw new \InvalidArgumentException(sprintf($GLOBALS['TL_LANG']['ERR']['invalidDate'], $value)); + } + + return $value; + } + /** * Check the FTP connection * diff --git a/dca/tl_nc_gateway.php b/dca/tl_nc_gateway.php index 8a8cfe28..cd4e33d9 100644 --- a/dca/tl_nc_gateway.php +++ b/dca/tl_nc_gateway.php @@ -170,7 +170,11 @@ 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 64, 'tl_class'=>'w50'), - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''", + 'save_callback' => array + ( + array('NotificationCenter\tl_nc_gateway', 'validateQueueDelay') + ), ), 'queue_cronExplanation' => array ( diff --git a/dca/tl_nc_queue.php b/dca/tl_nc_queue.php index 7ffafbc1..adf78d3c 100644 --- a/dca/tl_nc_queue.php +++ b/dca/tl_nc_queue.php @@ -116,7 +116,7 @@ ( 'label' => &$GLOBALS['TL_LANG']['tl_nc_queue']['dateDelay'], 'flag' => 6, - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NULL" ), 'dateSent' => array ( diff --git a/languages/en/tl_nc_gateway.php b/languages/en/tl_nc_gateway.php index 94698112..55185893 100644 --- a/languages/en/tl_nc_gateway.php +++ b/languages/en/tl_nc_gateway.php @@ -14,7 +14,7 @@ $GLOBALS['TL_LANG']['tl_nc_gateway']['title'] = array('Title', 'Please enter a title for this gateway.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['type'] = array('Type', 'Please select a type for this gateway.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_targetGateway'] = array('Target gateway', 'This gateway will queue all the messages and then send them over the gateway you define here.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_delay'] = array('Delayed delivery', 'Enter a strtotime time interval to delay message delivery.'); +$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_delay'] = array('Delayed delivery', 'Enter a strtotime time interval to delay message delivery (e.g. +1 day).'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronEnable'] = array('Enable poor man\'s cronjob', 'This will register this queue gateway to the poor man\'s cronjob.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval'] = array('Interval', 'Choose the interval you would like to have this queue gateway be invoked.'); $GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronMessages'] = array('Number of messages', 'Here you can enter the number of messages that should be sent per invocation.'); diff --git a/languages/en/tl_nc_queue.php b/languages/en/tl_nc_queue.php index 79a6ab16..1f4e6240 100644 --- a/languages/en/tl_nc_queue.php +++ b/languages/en/tl_nc_queue.php @@ -15,6 +15,7 @@ $GLOBALS['TL_LANG']['tl_nc_queue']['targetGateway'][0] = 'Target gateway'; $GLOBALS['TL_LANG']['tl_nc_queue']['message'][0] = 'Source message'; $GLOBALS['TL_LANG']['tl_nc_queue']['dateAdded'][0] = 'Date added to queue'; +$GLOBALS['TL_LANG']['tl_nc_queue']['dateDelay'][0] = 'Date delayed in queue'; $GLOBALS['TL_LANG']['tl_nc_queue']['dateSent'][0] = 'Date sent from queue'; $GLOBALS['TL_LANG']['tl_nc_queue']['error'][0] = 'Had an error during delivery process'; $GLOBALS['TL_LANG']['tl_nc_queue']['tokens'][0] = 'Tokens'; diff --git a/library/NotificationCenter/Model/QueuedMessage.php b/library/NotificationCenter/Model/QueuedMessage.php index cb123c50..823c6769 100644 --- a/library/NotificationCenter/Model/QueuedMessage.php +++ b/library/NotificationCenter/Model/QueuedMessage.php @@ -110,10 +110,11 @@ public static function findBySourceAndQuantity($sourceQueue, $numberOfMsgs, $opt { $t = static::getTable(); $sourceQueue = (int) $sourceQueue; + $time = time(); $options = array_merge( array( - 'column' => array("$t.sourceQueue=$sourceQueue", "$t.dateSent=''", "$t.error!=1"), + 'column' => array("$t.sourceQueue=$sourceQueue", "$t.dateSent=''", "$t.error!=1", "($t.dateDelay IS NULL OR $t.dateDelay<=$time)"), 'order' => "$t.dateAdded", 'limit' => $numberOfMsgs ), diff --git a/library/NotificationCenter/Queue/QueueManager.php b/library/NotificationCenter/Queue/QueueManager.php index 82ccb31c..a6433244 100644 --- a/library/NotificationCenter/Queue/QueueManager.php +++ b/library/NotificationCenter/Queue/QueueManager.php @@ -39,6 +39,12 @@ public function addMessage(Message $message, $tokens, $language) $objQueuedMessage->sourceQueue = $gateway->id; $objQueuedMessage->targetGateway = $gateway->queue_targetGateway; $objQueuedMessage->dateAdded = time(); + + // Add the delay date + if ($gateway->queue_delay) { + $objQueuedMessage->dateDelay = strtotime($gateway->queue_delay, $objQueuedMessage->dateAdded); + } + $objQueuedMessage->setTokens($tokens); $objQueuedMessage->language = $language; $objQueuedMessage->save(); From 01b2768db80ffc9b406cb7e323b405059c21b220 Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Wed, 8 Nov 2017 12:03:37 +0100 Subject: [PATCH 03/51] Use the UNIX_TIMESTAMP instead of time() --- library/NotificationCenter/Model/QueuedMessage.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/NotificationCenter/Model/QueuedMessage.php b/library/NotificationCenter/Model/QueuedMessage.php index 823c6769..63335a32 100644 --- a/library/NotificationCenter/Model/QueuedMessage.php +++ b/library/NotificationCenter/Model/QueuedMessage.php @@ -110,11 +110,10 @@ public static function findBySourceAndQuantity($sourceQueue, $numberOfMsgs, $opt { $t = static::getTable(); $sourceQueue = (int) $sourceQueue; - $time = time(); $options = array_merge( array( - 'column' => array("$t.sourceQueue=$sourceQueue", "$t.dateSent=''", "$t.error!=1", "($t.dateDelay IS NULL OR $t.dateDelay<=$time)"), + 'column' => array("$t.sourceQueue=$sourceQueue", "$t.dateSent=''", "$t.error!=1", "($t.dateDelay IS NULL OR $t.dateDelay<=UNIX_TIMESTAMP())"), 'order' => "$t.dateAdded", 'limit' => $numberOfMsgs ), From 0e03103e17cb927a42e5b0678420fb1cec529b8e Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Wed, 8 Nov 2017 12:04:43 +0100 Subject: [PATCH 04/51] Do not set the date delay for queue message if the provided value is incorrect --- library/NotificationCenter/Queue/QueueManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/NotificationCenter/Queue/QueueManager.php b/library/NotificationCenter/Queue/QueueManager.php index a6433244..ad727432 100644 --- a/library/NotificationCenter/Queue/QueueManager.php +++ b/library/NotificationCenter/Queue/QueueManager.php @@ -41,8 +41,8 @@ public function addMessage(Message $message, $tokens, $language) $objQueuedMessage->dateAdded = time(); // Add the delay date - if ($gateway->queue_delay) { - $objQueuedMessage->dateDelay = strtotime($gateway->queue_delay, $objQueuedMessage->dateAdded); + if ($gateway->queue_delay && ($dateDelay = strtotime($gateway->queue_delay, $objQueuedMessage->dateAdded)) !== false) { + $objQueuedMessage->dateDelay = $dateDelay; } $objQueuedMessage->setTokens($tokens); From 36a8df0162834c84c042ad5c42e106e2a4308143 Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Wed, 20 Dec 2017 11:54:33 +0100 Subject: [PATCH 05/51] Store the queue message files in the temporary folder --- classes/tl_nc_queue.php | 15 +++ dca/tl_nc_queue.php | 3 + .../NotificationCenter/Queue/QueueManager.php | 101 ++++++++++++++++++ 3 files changed, 119 insertions(+) diff --git a/classes/tl_nc_queue.php b/classes/tl_nc_queue.php index 62ed2146..ca3e3f58 100644 --- a/classes/tl_nc_queue.php +++ b/classes/tl_nc_queue.php @@ -11,9 +11,24 @@ namespace NotificationCenter; use NotificationCenter\Model\QueuedMessage; +use NotificationCenter\Queue\QueueManager; class tl_nc_queue extends \Backend { + /** + * On delete callback. + * + * @param \DataContainer $dc + */ + public function onDeleteCallback(\DataContainer $dc) + { + $queueManager = new $GLOBALS['NOTIFICATION_CENTER']['QUEUE_MANAGER'](); + + if ($queueManager instanceof QueueManager) { + $queueManager->removeMessageFiles($dc->id); + } + } + /** * label_callback * diff --git a/dca/tl_nc_queue.php b/dca/tl_nc_queue.php index adf78d3c..37d0c280 100644 --- a/dca/tl_nc_queue.php +++ b/dca/tl_nc_queue.php @@ -22,6 +22,9 @@ 'notEditable' => true, 'notCopyable' => true, 'notSortable' => true, + 'ondelete_callback' => [ + ['NotificationCenter\tl_nc_queue', 'onDeleteCallback'], + ], 'sql' => array ( 'keys' => array diff --git a/library/NotificationCenter/Queue/QueueManager.php b/library/NotificationCenter/Queue/QueueManager.php index ad727432..4662b864 100644 --- a/library/NotificationCenter/Queue/QueueManager.php +++ b/library/NotificationCenter/Queue/QueueManager.php @@ -11,6 +11,12 @@ namespace NotificationCenter\Queue; +use Contao\Files; +use Contao\Folder; +use NotificationCenter\Gateway\GatewayInterface; +use NotificationCenter\MessageDraft\EmailMessageDraft; +use NotificationCenter\MessageDraft\MessageDraftFactoryInterface; +use NotificationCenter\Model\Gateway; use NotificationCenter\Model\Message; use NotificationCenter\Model\QueuedMessage; @@ -49,6 +55,14 @@ public function addMessage(Message $message, $tokens, $language) $objQueuedMessage->language = $language; $objQueuedMessage->save(); + // Store the files in temporary folder + if (($targetGatewayModel = Gateway::findByPk($gateway->queue_targetGateway)) !== null + && isset($GLOBALS['NOTIFICATION_CENTER']['GATEWAY'][$targetGatewayModel->type]) + ) { + $targetGateway = $GLOBALS['NOTIFICATION_CENTER']['GATEWAY'][$targetGatewayModel->type]; + $this->storeFiles(new $targetGateway($targetGatewayModel), $objQueuedMessage, $message, $language); + } + return $this; } @@ -93,9 +107,96 @@ public function sendFromQueue($sourceQueue, $numberOfMsgs) $msg->dateSent = time(); } + // Remove the temporary message files + $this->removeMessageFiles($msg->id); + $msg->save(); } return $this; } + + /** + * Remove the message files + * + * @param int $messageId + */ + public function removeMessageFiles($messageId) + { + $folder = $this->getTemporaryFolderPath($messageId); + + if (is_dir(TL_ROOT . '/' . $folder)) { + Files::getInstance()->rrdir($folder); + } + } + + /** + * Store files in the temporary folder + * + * @param GatewayInterface $gateway + * @param QueuedMessage $queuedMessage + * @param Message $message + * @param string $language + */ + protected function storeFiles(GatewayInterface $gateway, QueuedMessage $queuedMessage, Message $message, $language) + { + if (!($gateway instanceof MessageDraftFactoryInterface)) { + return; + } + + $tokens = $queuedMessage->getTokens(); + $draft = $gateway->createDraft($message, $tokens, $language); + + // Return if the draft is not an e-mail draft + if (!($draft instanceof EmailMessageDraft)) { + return; + } + + $attachments = $draft->getAttachments(); + + // Return if there are no attachments + if (count($attachments) === 0) { + return; + } + + $folder = new Folder($this->getTemporaryFolderPath($queuedMessage->id)); + + // Copy the attachments to the temporary folder + foreach ($attachments as $originalPath) { + $originalPath = str_replace(TL_ROOT . '/', '', $originalPath); + $clonePath = $folder->path . '/' . basename($originalPath); + + // Update the tokens if copy was successful + if (Files::getInstance()->copy($originalPath, $clonePath)) { + foreach ($tokens as $k => $v) { + if (is_array($v)) { + foreach ($v as $kk => $vv) { + $tokens[$k][$kk] = str_replace($originalPath, $clonePath, $vv); + } + } else { + $tokens[$k] = str_replace($originalPath, $clonePath, $v); + } + } + } + } + + $queuedMessage->setTokens($tokens); + $queuedMessage->save(); + } + + /** + * Get the temporary folder path + * + * @param int $messageId + * + * @return string + */ + protected function getTemporaryFolderPath($messageId) + { + if (version_compare(VERSION, '4.4', '>=')) { + return 'var/notification_center/' . $messageId; + } + + return 'system/notification_center_tmp/' . $messageId; + } } From 959287648805a8a53438f4bf061f0adfb766a4ce Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Wed, 20 Dec 2017 17:21:30 +0100 Subject: [PATCH 06/51] WIP of how to send draft with attachments --- library/NotificationCenter/Model/Message.php | 23 ++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/library/NotificationCenter/Model/Message.php b/library/NotificationCenter/Model/Message.php index a3f93809..a0701438 100644 --- a/library/NotificationCenter/Model/Message.php +++ b/library/NotificationCenter/Model/Message.php @@ -10,6 +10,8 @@ namespace NotificationCenter\Model; +use NotificationCenter\Gateway\Email; + class Message extends \Model { @@ -22,11 +24,15 @@ class Message extends \Model /** * Send this message using its gateway - * @param array - * @param string + * + * @param array $arrTokens + * @param string $strLanguage + * @param array|null $arrAttachments + * * @return bool + * @throws \Exception */ - public function send(array $arrTokens, $strLanguage = '') + public function send(array $arrTokens, $strLanguage = '', array $arrAttachments = null) { /** @var Gateway $objGatewayModel */ if (($objGatewayModel = $this->getRelated('gateway')) === null) { @@ -56,7 +62,16 @@ public function send(array $arrTokens, $strLanguage = '') } } - return $objGatewayModel->getGateway()->send($this, $cpTokens, $cpLanguage); + $objGateway = $objGatewayModel->getGateway(); + + if ($objGateway instanceof Email && null !== $arrAttachments) { + $objDraft = $objGateway->createDraft($this, $cpTokens, $cpLanguage); + $objDraft->setAttachments($arrAttachments); + + return $objGateway->sendDraft($objDraft); + } + + return $objGateway->send($this, $cpTokens, $cpLanguage); } /** From f9dafbf462cce8f77c0faf537ba17cd783afad39 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Wed, 20 Dec 2017 17:26:31 +0100 Subject: [PATCH 07/51] Split email to send() and sendDraft() method --- library/NotificationCenter/Gateway/Email.php | 58 ++++++++++++-------- library/NotificationCenter/Model/Message.php | 8 +++ 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/library/NotificationCenter/Gateway/Email.php b/library/NotificationCenter/Gateway/Email.php index cbcd2820..1b0e4630 100644 --- a/library/NotificationCenter/Gateway/Email.php +++ b/library/NotificationCenter/Gateway/Email.php @@ -26,10 +26,12 @@ class Email extends Base implements GatewayInterface, MessageDraftFactoryInterfa /** * Returns a MessageDraft - * @param Message - * @param array - * @param string - * @return MessageDraftInterface|null (if no draft could be found) + * + * @param Message $objMessage + * @param array $arrTokens + * @param string $strLanguage + * + * @return EmailMessageDraft|null (if no draft could be found) */ public function createDraft(Message $objMessage, array $arrTokens, $strLanguage = '') { @@ -47,27 +49,10 @@ public function createDraft(Message $objMessage, array $arrTokens, $strLanguage } /** - * Send email message - * @param Message - * @param array - * @param string - * @return bool + * @param EmailMessageDraft $objDraft */ - public function send(Message $objMessage, array $arrTokens, $strLanguage = '') + public function sendDraft(EmailMessageDraft $objDraft) { - /** - * @var $objDraft \NotificationCenter\MessageDraft\EmailMessageDraft - */ - $objDraft = $this->createDraft($objMessage, $arrTokens, $strLanguage); - - // return false if no language found for BC - if ($objDraft === null) { - - \System::log(sprintf('Could not create draft message for e-mail (Message ID: %s)', $objMessage->id), __METHOD__, TL_ERROR); - - return false; - } - // Override SMTP settings if desired if (version_compare(VERSION, '4.4', '>=') && $this->objModel->email_overrideSmtp) { $transport = \Swift_SmtpTransport::newInstance($this->objModel->email_smtpHost, $this->objModel->email_smtpPort); @@ -149,6 +134,33 @@ public function send(Message $objMessage, array $arrTokens, $strLanguage = '') return false; } + /** + * Send email message + * + * @param Message $objMessage + * @param array $arrTokens + * @param string $strLanguage + * + * @return bool + */ + public function send(Message $objMessage, array $arrTokens, $strLanguage = '') + { + /** + * @var $objDraft \NotificationCenter\MessageDraft\EmailMessageDraft + */ + $objDraft = $this->createDraft($objMessage, $arrTokens, $strLanguage); + + // return false if no language found for BC + if ($objDraft === null) { + + \System::log(sprintf('Could not create draft message for e-mail (Message ID: %s)', $objMessage->id), __METHOD__, TL_ERROR); + + return false; + } + + return $this->sendDraft($objDraft); + } + /** * Override SMTP settings */ diff --git a/library/NotificationCenter/Model/Message.php b/library/NotificationCenter/Model/Message.php index a0701438..807c35d7 100644 --- a/library/NotificationCenter/Model/Message.php +++ b/library/NotificationCenter/Model/Message.php @@ -66,6 +66,14 @@ public function send(array $arrTokens, $strLanguage = '', array $arrAttachments if ($objGateway instanceof Email && null !== $arrAttachments) { $objDraft = $objGateway->createDraft($this, $cpTokens, $cpLanguage); + + // return false if no language found for BC + if ($objDraft === null) { + \System::log(sprintf('Could not create draft message for e-mail (Message ID: %s)', $this->id), __METHOD__, TL_ERROR); + + return false; + } + $objDraft->setAttachments($arrAttachments); return $objGateway->sendDraft($objDraft); From e76826593617fca891b484ef3b127fb079849bb4 Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Wed, 20 Dec 2017 17:44:56 +0100 Subject: [PATCH 08/51] Store the attachments in a separate field and do not update the tokens --- dca/tl_nc_queue.php | 7 +++- languages/en/tl_nc_queue.php | 1 + library/NotificationCenter/Gateway/Email.php | 7 ++-- .../MessageDraft/EmailMessageDraft.php | 42 +++++++++++++------ library/NotificationCenter/Model/Message.php | 7 ++-- .../Model/QueuedMessage.php | 26 +++++++++++- .../NotificationCenter/Queue/QueueManager.php | 17 ++------ 7 files changed, 73 insertions(+), 34 deletions(-) diff --git a/dca/tl_nc_queue.php b/dca/tl_nc_queue.php index 37d0c280..20566328 100644 --- a/dca/tl_nc_queue.php +++ b/dca/tl_nc_queue.php @@ -145,6 +145,11 @@ 'label' => &$GLOBALS['TL_LANG']['tl_nc_queue']['language'], 'filter' => true, 'sql' => "varchar(5) NOT NULL default ''" - ) + ), + 'attachments' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_nc_queue']['attachments'], + 'sql' => "blob NULL" + ), ) ); diff --git a/languages/en/tl_nc_queue.php b/languages/en/tl_nc_queue.php index 1f4e6240..055b5a2c 100644 --- a/languages/en/tl_nc_queue.php +++ b/languages/en/tl_nc_queue.php @@ -20,6 +20,7 @@ $GLOBALS['TL_LANG']['tl_nc_queue']['error'][0] = 'Had an error during delivery process'; $GLOBALS['TL_LANG']['tl_nc_queue']['tokens'][0] = 'Tokens'; $GLOBALS['TL_LANG']['tl_nc_queue']['language'][0] = 'Language'; +$GLOBALS['TL_LANG']['tl_nc_queue']['attachments'][0] = 'Attachments'; /** * Status diff --git a/library/NotificationCenter/Gateway/Email.php b/library/NotificationCenter/Gateway/Email.php index 1b0e4630..7ba7e773 100644 --- a/library/NotificationCenter/Gateway/Email.php +++ b/library/NotificationCenter/Gateway/Email.php @@ -50,8 +50,9 @@ public function createDraft(Message $objMessage, array $arrTokens, $strLanguage /** * @param EmailMessageDraft $objDraft + * @param int $messageId */ - public function sendDraft(EmailMessageDraft $objDraft) + public function sendDraft(EmailMessageDraft $objDraft, $messageId) { // Override SMTP settings if desired if (version_compare(VERSION, '4.4', '>=') && $this->objModel->email_overrideSmtp) { @@ -128,7 +129,7 @@ public function sendDraft(EmailMessageDraft $objDraft) try { return $objEmail->sendTo($objDraft->getRecipientEmails()); } catch (\Exception $e) { - \System::log(sprintf('Could not send email for message ID %s: %s', $objMessage->id, $e->getMessage()), __METHOD__, TL_ERROR); + \System::log(sprintf('Could not send email for message ID %s: %s', $messageId, $e->getMessage()), __METHOD__, TL_ERROR); } return false; @@ -158,7 +159,7 @@ public function send(Message $objMessage, array $arrTokens, $strLanguage = '') return false; } - return $this->sendDraft($objDraft); + return $this->sendDraft($objDraft, $objMessage->id); } /** diff --git a/library/NotificationCenter/MessageDraft/EmailMessageDraft.php b/library/NotificationCenter/MessageDraft/EmailMessageDraft.php index 87122d24..f7e19e96 100644 --- a/library/NotificationCenter/MessageDraft/EmailMessageDraft.php +++ b/library/NotificationCenter/MessageDraft/EmailMessageDraft.php @@ -35,6 +35,12 @@ class EmailMessageDraft implements MessageDraftInterface */ protected $arrTokens = array(); + /** + * Attachments + * @var array + */ + protected $attachments = null; + /** * Construct the object * @param Message $objMessage @@ -185,25 +191,35 @@ public function useExternalImages() */ public function getAttachments() { - // Token attachments - $arrAttachments = StringUtil::getTokenAttachments($this->objLanguage->attachment_tokens, $this->arrTokens); - - // Add static attachments - $arrStaticAttachments = deserialize($this->objLanguage->attachments, true); + if ($this->attachments === null) { + // Token attachments + $this->attachments = StringUtil::getTokenAttachments($this->objLanguage->attachment_tokens, $this->arrTokens); - if (!empty($arrStaticAttachments)) { - $objFiles = \FilesModel::findMultipleByUuids($arrStaticAttachments); + // Add static attachments + $arrStaticAttachments = deserialize($this->objLanguage->attachments, true); - if ($objFiles === null) { - return $arrAttachments; - } + if (!empty($arrStaticAttachments)) { + $objFiles = \FilesModel::findMultipleByUuids($arrStaticAttachments); - while ($objFiles->next()) { - $arrAttachments[] = TL_ROOT . '/' . $objFiles->path; + if ($objFiles !== null) { + while ($objFiles->next()) { + $this->attachments[] = TL_ROOT . '/' . $objFiles->path; + } + } } } - return $arrAttachments; + return $this->attachments; + } + + /** + * Set the attachments + * + * @param array $attachments + */ + public function setAttachments(array $attachments) + { + $this->attachments = $attachments; } /** diff --git a/library/NotificationCenter/Model/Message.php b/library/NotificationCenter/Model/Message.php index 807c35d7..1c851b0c 100644 --- a/library/NotificationCenter/Model/Message.php +++ b/library/NotificationCenter/Model/Message.php @@ -32,7 +32,7 @@ class Message extends \Model * @return bool * @throws \Exception */ - public function send(array $arrTokens, $strLanguage = '', array $arrAttachments = null) + public function send(array $arrTokens, $strLanguage = '', array $arrAttachments = []) { /** @var Gateway $objGatewayModel */ if (($objGatewayModel = $this->getRelated('gateway')) === null) { @@ -64,7 +64,8 @@ public function send(array $arrTokens, $strLanguage = '', array $arrAttachments $objGateway = $objGatewayModel->getGateway(); - if ($objGateway instanceof Email && null !== $arrAttachments) { + // Send the draft with updated attachments (likely originating from queue) + if ($objGateway instanceof Email && count($arrAttachments) > 0) { $objDraft = $objGateway->createDraft($this, $cpTokens, $cpLanguage); // return false if no language found for BC @@ -76,7 +77,7 @@ public function send(array $arrTokens, $strLanguage = '', array $arrAttachments $objDraft->setAttachments($arrAttachments); - return $objGateway->sendDraft($objDraft); + return $objGateway->sendDraft($objDraft, $this->id); } return $objGateway->send($this, $cpTokens, $cpLanguage); diff --git a/library/NotificationCenter/Model/QueuedMessage.php b/library/NotificationCenter/Model/QueuedMessage.php index 63335a32..00c2e9e5 100644 --- a/library/NotificationCenter/Model/QueuedMessage.php +++ b/library/NotificationCenter/Model/QueuedMessage.php @@ -40,6 +40,30 @@ public function getTokens() return (array) json_decode($this->tokens); } + /** + * Set the attachments + * + * @param array $attachments + * + * @return $this + */ + public function setAttachments(array $attachments) + { + $this->attachments = json_encode($attachments); + + return $this; + } + + /** + * Get the $attachments + * + * @return array + */ + public function getAttachments() + { + return json_decode($this->attachments, true); + } + /** * Get the status * @return string @@ -88,7 +112,7 @@ public function send() // Temporarily set gateway to target gateway $message->gateway = $this->targetGateway; - $result = $message->send($this->getTokens(), $this->language); + $result = $message->send($this->getTokens(), $this->language, $this->getAttachments()); // Reset gateway $message->gateway = $this->sourceQueue; diff --git a/library/NotificationCenter/Queue/QueueManager.php b/library/NotificationCenter/Queue/QueueManager.php index 4662b864..b3cf7ced 100644 --- a/library/NotificationCenter/Queue/QueueManager.php +++ b/library/NotificationCenter/Queue/QueueManager.php @@ -144,8 +144,7 @@ protected function storeFiles(GatewayInterface $gateway, QueuedMessage $queuedMe return; } - $tokens = $queuedMessage->getTokens(); - $draft = $gateway->createDraft($message, $tokens, $language); + $draft = $gateway->createDraft($message, $queuedMessage->getTokens(), $language); // Return if the draft is not an e-mail draft if (!($draft instanceof EmailMessageDraft)) { @@ -162,25 +161,17 @@ protected function storeFiles(GatewayInterface $gateway, QueuedMessage $queuedMe $folder = new Folder($this->getTemporaryFolderPath($queuedMessage->id)); // Copy the attachments to the temporary folder - foreach ($attachments as $originalPath) { + foreach ($attachments as $index => $originalPath) { $originalPath = str_replace(TL_ROOT . '/', '', $originalPath); $clonePath = $folder->path . '/' . basename($originalPath); // Update the tokens if copy was successful if (Files::getInstance()->copy($originalPath, $clonePath)) { - foreach ($tokens as $k => $v) { - if (is_array($v)) { - foreach ($v as $kk => $vv) { - $tokens[$k][$kk] = str_replace($originalPath, $clonePath, $vv); - } - } else { - $tokens[$k] = str_replace($originalPath, $clonePath, $v); - } - } + $attachments[$index] = TL_ROOT . '/' . $clonePath; } } - $queuedMessage->setTokens($tokens); + $queuedMessage->setAttachments($attachments); $queuedMessage->save(); } From da99f5b4469492c5abc828de7e7144cc5839283c Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Wed, 20 Dec 2017 17:46:33 +0100 Subject: [PATCH 09/51] Drop the $messageId argument from sendDraft() method --- library/NotificationCenter/Gateway/Email.php | 7 +++---- library/NotificationCenter/Model/Message.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/library/NotificationCenter/Gateway/Email.php b/library/NotificationCenter/Gateway/Email.php index 7ba7e773..12e4ea35 100644 --- a/library/NotificationCenter/Gateway/Email.php +++ b/library/NotificationCenter/Gateway/Email.php @@ -50,9 +50,8 @@ public function createDraft(Message $objMessage, array $arrTokens, $strLanguage /** * @param EmailMessageDraft $objDraft - * @param int $messageId */ - public function sendDraft(EmailMessageDraft $objDraft, $messageId) + public function sendDraft(EmailMessageDraft $objDraft) { // Override SMTP settings if desired if (version_compare(VERSION, '4.4', '>=') && $this->objModel->email_overrideSmtp) { @@ -129,7 +128,7 @@ public function sendDraft(EmailMessageDraft $objDraft, $messageId) try { return $objEmail->sendTo($objDraft->getRecipientEmails()); } catch (\Exception $e) { - \System::log(sprintf('Could not send email for message ID %s: %s', $messageId, $e->getMessage()), __METHOD__, TL_ERROR); + \System::log(sprintf('Could not send email for message ID %s: %s', $objDraft->getMessage()->id, $e->getMessage()), __METHOD__, TL_ERROR); } return false; @@ -159,7 +158,7 @@ public function send(Message $objMessage, array $arrTokens, $strLanguage = '') return false; } - return $this->sendDraft($objDraft, $objMessage->id); + return $this->sendDraft($objDraft); } /** diff --git a/library/NotificationCenter/Model/Message.php b/library/NotificationCenter/Model/Message.php index 1c851b0c..d031e722 100644 --- a/library/NotificationCenter/Model/Message.php +++ b/library/NotificationCenter/Model/Message.php @@ -77,7 +77,7 @@ public function send(array $arrTokens, $strLanguage = '', array $arrAttachments $objDraft->setAttachments($arrAttachments); - return $objGateway->sendDraft($objDraft, $this->id); + return $objGateway->sendDraft($objDraft); } return $objGateway->send($this, $cpTokens, $cpLanguage); From 69f523cf2a18381ff63d27a1d21fbe36ed4d2332 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Fri, 26 Jan 2018 16:43:31 +0000 Subject: [PATCH 10/51] Fixed attachments not always being an array --- library/NotificationCenter/Model/QueuedMessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/NotificationCenter/Model/QueuedMessage.php b/library/NotificationCenter/Model/QueuedMessage.php index 00c2e9e5..efd66059 100644 --- a/library/NotificationCenter/Model/QueuedMessage.php +++ b/library/NotificationCenter/Model/QueuedMessage.php @@ -61,7 +61,7 @@ public function setAttachments(array $attachments) */ public function getAttachments() { - return json_decode($this->attachments, true); + return (array) json_decode($this->attachments, true); } /** From 16c24bbefe8e1e7668da62ff34b140c02637ec4a Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Fri, 2 Feb 2018 08:42:55 +0100 Subject: [PATCH 11/51] Fixed tokens not being an array --- library/NotificationCenter/Model/QueuedMessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/NotificationCenter/Model/QueuedMessage.php b/library/NotificationCenter/Model/QueuedMessage.php index efd66059..4196d4b1 100644 --- a/library/NotificationCenter/Model/QueuedMessage.php +++ b/library/NotificationCenter/Model/QueuedMessage.php @@ -37,7 +37,7 @@ public function setTokens($arrTokens) */ public function getTokens() { - return (array) json_decode($this->tokens); + return (array) json_decode($this->tokens, true); } /** From f4756d9f1b52d5ff31cca76b082640d670c6bbd5 Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Fri, 22 Jun 2018 11:35:50 +0200 Subject: [PATCH 12/51] Added support for attachment templates --- dca/tl_nc_language.php | 10 ++++- languages/en/tl_nc_language.php | 1 + library/NotificationCenter/Gateway/Email.php | 10 ++++- .../MessageDraft/EmailMessageDraft.php | 39 ++++++++++++++++++- 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/dca/tl_nc_language.php b/dca/tl_nc_language.php index 1a80631e..bc94653b 100644 --- a/dca/tl_nc_language.php +++ b/dca/tl_nc_language.php @@ -102,7 +102,7 @@ ( '__selector__' => array('gateway_type', 'email_mode'), 'default' => '{general_legend},language,fallback', - 'email' => '{general_legend},language,fallback;{meta_legend},email_sender_name,email_sender_address,recipients,email_recipient_cc,email_recipient_bcc,email_replyTo;{content_legend},email_subject,email_mode;{attachments_legend},attachments,attachment_tokens', + 'email' => '{general_legend},language,fallback;{meta_legend},email_sender_name,email_sender_address,recipients,email_recipient_cc,email_recipient_bcc,email_replyTo;{content_legend},email_subject,email_mode;{attachments_legend},attachments,attachment_templates,attachment_tokens', 'file' => '{general_legend},language,fallback;{meta_legend},file_name,file_storage_mode;{content_legend},file_content', 'postmark' => '{general_legend},language,fallback;{meta_legend},email_sender_name,email_sender_address,recipients,email_recipient_cc,email_recipient_bcc,email_replyTo;{content_legend},email_subject,email_mode', ), @@ -190,6 +190,14 @@ 'eval' => array('multiple'=>true, 'fieldType'=>'checkbox', 'files'=>true, 'filesOnly'=>true, 'tl_class'=>'clr'), 'sql' => "blob NULL" ), + 'attachment_templates' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_nc_language']['attachment_templates'], + 'exclude' => true, + 'inputType' => 'fileTree', + 'eval' => array('multiple'=>true, 'fieldType'=>'checkbox', 'files'=>true, 'filesOnly'=>true, 'tl_class'=>'clr', 'extensions'=>'xml,txt'), + 'sql' => "blob NULL" + ), 'email_sender_name' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name'], diff --git a/languages/en/tl_nc_language.php b/languages/en/tl_nc_language.php index 444554d2..5359b736 100644 --- a/languages/en/tl_nc_language.php +++ b/languages/en/tl_nc_language.php @@ -16,6 +16,7 @@ $GLOBALS['TL_LANG']['tl_nc_language']['recipients'] = array('Recipients', 'Please enter a comma-separated list of recipients in this field. Use the autocompleter to see the available simple tokens.'); $GLOBALS['TL_LANG']['tl_nc_language']['attachment_tokens'] = array('Attachments via tokens', 'Please enter a comma-separated list of attachment tokens in this field. Use the autocompleter to see the available simple tokens.'); $GLOBALS['TL_LANG']['tl_nc_language']['attachments'] = array('Attachments from file system', 'Please choose from the file picker if you would like to add static files.'); +$GLOBALS['TL_LANG']['tl_nc_language']['attachment_templates'] = array('Attachments from templates', 'These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message.'); $GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name'] = array('Sender name', 'Please enter the sender name.'); $GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address'] = array('Sender address', 'Please enter the sender email address.'); $GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc'] = array('Send a CC to', 'Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma.'); diff --git a/library/NotificationCenter/Gateway/Email.php b/library/NotificationCenter/Gateway/Email.php index e6034bef..52632d69 100644 --- a/library/NotificationCenter/Gateway/Email.php +++ b/library/NotificationCenter/Gateway/Email.php @@ -109,7 +109,7 @@ public function sendDraft(EmailMessageDraft $objDraft) // Set image embedding $objEmail->embedImages = !$objDraft->useExternalImages(); - // Add attachments + // Add file attachments $arrAttachments = $objDraft->getAttachments(); if (!empty($arrAttachments)) { foreach ($arrAttachments as $strFile) { @@ -117,6 +117,14 @@ public function sendDraft(EmailMessageDraft $objDraft) } } + // Add string attachments + $arrAttachments = $objDraft->getStringAttachments(); + if (!empty($arrAttachments)) { + foreach ($arrAttachments as $strFilename => $strContent) { + $objEmail->attachFileFromString($strContent, $strFilename); + } + } + // Set CC recipients $arrCc = $objDraft->getCcRecipientEmails(); if (!empty($arrCc)) { diff --git a/library/NotificationCenter/MessageDraft/EmailMessageDraft.php b/library/NotificationCenter/MessageDraft/EmailMessageDraft.php index f7e19e96..cdf25986 100644 --- a/library/NotificationCenter/MessageDraft/EmailMessageDraft.php +++ b/library/NotificationCenter/MessageDraft/EmailMessageDraft.php @@ -11,6 +11,7 @@ namespace NotificationCenter\MessageDraft; +use Contao\File; use NotificationCenter\Model\Language; use NotificationCenter\Model\Message; use NotificationCenter\Util\StringUtil; @@ -36,11 +37,17 @@ class EmailMessageDraft implements MessageDraftInterface protected $arrTokens = array(); /** - * Attachments + * File path attachments * @var array */ protected $attachments = null; + /** + * String attachments + * @var array + */ + protected $stringAttachments = null; + /** * Construct the object * @param Message $objMessage @@ -212,6 +219,36 @@ public function getAttachments() return $this->attachments; } + /** + * Returns the contents of attachments as an array (the key being the desired file name). + * @return array + */ + public function getStringAttachments() + { + if ($this->stringAttachments === null) { + + // Add attachment templates + $arrTemplateAttachments = deserialize($this->objLanguage->attachment_templates, true); + + if (!empty($arrTemplateAttachments)) { + $objFiles = \FilesModel::findMultipleByUuids($arrTemplateAttachments); + + if ($objFiles !== null) { + while ($objFiles->next()) { + $file = new File($objFiles->path, true); + if (!$file->exists()) { + continue; + } + + $this->stringAttachments[$objFiles->name] = \Haste\Util\StringUtil::recursiveReplaceTokensAndTags($file->getContent(), $this->arrTokens); + } + } + } + } + + return $this->stringAttachments; + } + /** * Set the attachments * From f700fe3b9e4e6807e747d4e3ec9d596f34f4bbe6 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Thu, 4 Oct 2018 15:03:23 +0200 Subject: [PATCH 13/51] Added support for templates that generate tokens --- dca/tl_nc_language.php | 1 - dca/tl_nc_notification.php | 13 +++++-- languages/en/tl_nc_notification.php | 2 ++ languages/en/tokens.php | 1 + library/NotificationCenter/AutoSuggester.php | 36 +++++++++++++++---- .../NotificationCenter/Model/Notification.php | 19 ++++++++++ 6 files changed, 63 insertions(+), 9 deletions(-) diff --git a/dca/tl_nc_language.php b/dca/tl_nc_language.php index bc94653b..df15b55b 100644 --- a/dca/tl_nc_language.php +++ b/dca/tl_nc_language.php @@ -22,7 +22,6 @@ 'ptable' => 'tl_nc_message', 'dataContainer' => 'Table', 'enableVersioning' => true, - 'nc_type_query' => "SELECT type FROM tl_nc_notification WHERE id=(SELECT pid FROM tl_nc_message WHERE id=(SELECT pid FROM tl_nc_language WHERE id=?))", 'oncreate_callback' => array ( array('NotificationCenter\tl_nc_language', 'insertGatewayType'), diff --git a/dca/tl_nc_notification.php b/dca/tl_nc_notification.php index d6fc0b97..2d767396 100644 --- a/dca/tl_nc_notification.php +++ b/dca/tl_nc_notification.php @@ -96,7 +96,7 @@ ( '__selector__' => array('type'), 'default' => '{title_legend},title,type;', - 'core_form' => '{title_legend},title,type;{config_legend},flatten_delimiter', + 'core_form' => '{title_legend},title,type;{config_legend},flatten_delimiter;{templates_legend:hide},templates', ), // Fields @@ -138,6 +138,15 @@ 'default' => ',', 'eval' => array('doNotTrim'=>true), 'sql' => "varchar(255) NOT NULL default ''" - ) + ), + 'templates' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_nc_notification']['templates'], + 'exclude' => true, + 'inputType' => 'select', + 'options' => \Backend::getTemplateGroup('notification_'), + 'eval' => array('multiple'=>true, 'includeBlankOption'=>true, 'chosen'=>true, 'tl_class'=>'clr'), + 'sql' => "blob NULL", + ), ) ); diff --git a/languages/en/tl_nc_notification.php b/languages/en/tl_nc_notification.php index 18fd11e4..005c1ec6 100644 --- a/languages/en/tl_nc_notification.php +++ b/languages/en/tl_nc_notification.php @@ -14,6 +14,7 @@ $GLOBALS['TL_LANG']['tl_nc_notification']['title'] = array('Title', 'Please enter a title for this notification.'); $GLOBALS['TL_LANG']['tl_nc_notification']['type'] = array('Type', 'Please select a type for this notification.'); $GLOBALS['TL_LANG']['tl_nc_notification']['flatten_delimiter'] = array('Delimiter for lists', 'When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like.'); +$GLOBALS['TL_LANG']['tl_nc_notification']['templates'] = array('Token Templates', 'Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token.'); /** * Reference @@ -36,6 +37,7 @@ */ $GLOBALS['TL_LANG']['tl_nc_notification']['title_legend'] = 'Title & type'; $GLOBALS['TL_LANG']['tl_nc_notification']['config_legend'] = 'Configuration'; +$GLOBALS['TL_LANG']['tl_nc_notification']['templates_legend'] = 'Templates'; /** * Notification types diff --git a/languages/en/tokens.php b/languages/en/tokens.php index 5d9a25e2..44d6cc9c 100755 --- a/languages/en/tokens.php +++ b/languages/en/tokens.php @@ -11,6 +11,7 @@ /** * Tokens */ +$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['template'] = 'Output of template "%s"'; $GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['core_form']['admin_email'] = 'E-mail address of administrator of the current page.'; $GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['core_form']['form_*'] = 'All the form fields.'; $GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['core_form']['formlabel_*'] = 'All the form field labels.'; diff --git a/library/NotificationCenter/AutoSuggester.php b/library/NotificationCenter/AutoSuggester.php index 756eacb1..83317be2 100644 --- a/library/NotificationCenter/AutoSuggester.php +++ b/library/NotificationCenter/AutoSuggester.php @@ -15,8 +15,8 @@ class AutoSuggester extends \Controller { - protected static $strTable; + protected static $objNotification; protected static $strType; public static function load($dc) @@ -38,7 +38,8 @@ public static function load($dc) $GLOBALS['TL_CSS'][] = 'system/modules/notification_center/assets/autosuggester' . ($GLOBALS['TL_CONFIG']['debugMode'] ? '' : '.min') . '.css'; static::$strTable = $dc->table; - static::$strType = \Database::getInstance()->prepare($GLOBALS['TL_DCA'][static::$strTable]['config']['nc_type_query'])->execute($dc->id)->type; + static::$objNotification = \Database::getInstance()->prepare("SELECT * FROM tl_nc_notification WHERE id=(SELECT pid FROM tl_nc_message WHERE id=(SELECT pid FROM tl_nc_language WHERE id=?))")->execute($dc->id); + static::$strType = static::$objNotification->type; foreach ($GLOBALS['TL_DCA'][static::$strTable]['fields'] as $field => $arrConfig) { if ('nc_tokens' === $arrConfig['eval']['rgxp']) { @@ -59,6 +60,7 @@ public function init(\DataContainer $dc) { $strGroup = NotificationModel::findGroupForType(static::$strType); $arrTokens = $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE'][$strGroup][static::$strType][$dc->field]; + $arrTokens = array_merge($arrTokens, $this->loadTemplateTokens()); if (!is_array($arrTokens) || empty($arrTokens)) { return ''; @@ -67,11 +69,16 @@ public function init(\DataContainer $dc) $arrParsedTokens = array(); foreach ($arrTokens as $strToken) { - $arrParsedTokens[] = array - ( + $content = $GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN'][static::$strType][$strToken] ?: ''; + + if (0 === strpos($strToken, 'template_')) { + $content = sprintf($GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['template'], 'notification_'.substr($strToken, 9)); + } + + $arrParsedTokens[] = [ 'value' => '##' . $strToken . '##', - 'content' => $GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN'][static::$strType][$strToken] ?: '' - ); + 'content' => $content, + ]; } $GLOBALS['TL_MOOTOOLS'][] = " @@ -103,6 +110,7 @@ public function verifyTokens($rgxp, $strText, $objWidget) $strGroup = NotificationModel::findGroupForType(static::$strType); $validTokens = (array) $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE'][$strGroup][static::$strType][$objWidget->name]; + $validTokens = array_merge($validTokens, $this->loadTemplateTokens()); if (!$this->verifyHashes($strText, $objWidget, $validTokens)) { $this->verifyConditions($strText, $objWidget, $validTokens); @@ -205,4 +213,20 @@ private function verifyConditions($strText, $objWidget, array $validTokens) return false; } + + private function loadTemplateTokens() + { + if (!static::$objNotification) { + return []; + } + + $tokens = []; + $templates = deserialize(static::$objNotification->templates, true); + + foreach ($templates as $template) { + $tokens[] = 'template_'.substr($template, 13); + } + + return $tokens; + } } diff --git a/library/NotificationCenter/Model/Notification.php b/library/NotificationCenter/Model/Notification.php index 53a7822c..3ec10b2c 100644 --- a/library/NotificationCenter/Model/Notification.php +++ b/library/NotificationCenter/Model/Notification.php @@ -43,6 +43,7 @@ public function send(array $arrTokens, $strLanguage = '') return array(); } + $arrTokens = $this->addTemplateTokens($arrTokens); $arrResult = array(); foreach ($objMessages as $objMessage) { @@ -67,4 +68,22 @@ public static function findGroupForType($strType) return ''; } + + private function addTemplateTokens(array $tokens) + { + $templates = deserialize($this->templates, true); + + foreach ($templates as $name) { + try { + $template = new \FrontendTemplate($name); + $template->setData($tokens); + + $tokens['template_'.substr($name, 13)] = $template->parse(); + } catch (\Exception $e) { + \System::log('Could not generate token template "'.$name.'"', __METHOD__, TL_ERROR); + } + } + + return $tokens; + } } From 14ae7005dcc97da6e0539f8ee8179f6efc4a6ef1 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:07:46 +0200 Subject: [PATCH 14/51] Import newsletter subscribe and unsubscribe module from Contao 4.6. --- composer.json | 7 + ...eNewsletterSubscribeNotificationCenter.php | 362 ++++++++++++++++++ ...ewsletterUnsubscribeNotificationCenter.php | 296 ++++++++++++++ 3 files changed, 665 insertions(+) create mode 100644 modules/ModuleNewsletterSubscribeNotificationCenter.php create mode 100644 modules/ModuleNewsletterUnsubscribeNotificationCenter.php diff --git a/composer.json b/composer.json index 8c803c65..c5fc6a4d 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "terminal42/dcawizard":"2.*" }, "require-dev": { + "contao/newsletter-bundle":"~3.5 || ~4.1", "cyberspectrum/contao-toolbox": "^0.7.2" }, "autoload":{ @@ -33,6 +34,12 @@ "replace": { "contao-legacy/notification_center": "self.version" }, + "suggest": { + "contao/newsletter-bundle": "Send notifications using the newsletter bundle of Contao" + }, + "conflict": { + "contao/newsletter-bundle": "<3.5 || >= 5.0" + }, "extra":{ "branch-alias": { "dev-develop": "1.4.x-dev" diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php new file mode 100644 index 00000000..8e48a6c1 --- /dev/null +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -0,0 +1,362 @@ + + */ +class ModuleNewsletterSubscribeNotificationCenter extends Module +{ + + /** + * Template + * @var string + */ + protected $strTemplate = 'nl_default'; + + /** + * Display a wildcard in the back end + * + * @return string + */ + public function generate() + { + if (TL_MODE == 'BE') + { + $objTemplate = new \BackendTemplate('be_wildcard'); + $objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['subscribe'][0]) . ' ###'; + $objTemplate->title = $this->headline; + $objTemplate->id = $this->id; + $objTemplate->link = $this->name; + $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; + + return $objTemplate->parse(); + } + + $this->nl_channels = \StringUtil::deserialize($this->nl_channels); + + // Return if there are no channels + if (empty($this->nl_channels) || !\is_array($this->nl_channels)) + { + return ''; + } + + return parent::generate(); + } + + /** + * Generate the module + */ + protected function compile() + { + // Overwrite default template + if ($this->nl_template) + { + $this->Template = new \FrontendTemplate($this->nl_template); + $this->Template->setData($this->arrData); + } + + $this->Template->email = ''; + $this->Template->captcha = ''; + + // Activate e-mail address + if (\Input::get('token')) + { + $this->activateRecipient(); + + return; + } + + $objWidget = null; + + // Set up the captcha widget + if (!$this->disableCaptcha) + { + $arrField = array + ( + 'name' => 'subscribe_'.$this->id, + 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], + 'inputType' => 'captcha', + 'eval' => array('mandatory'=>true) + ); + + /** @var Widget $objWidget */ + $objWidget = new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); + } + + $strFormId = 'tl_subscribe_' . $this->id; + + // Validate the form + if (\Input::post('FORM_SUBMIT') == $strFormId) + { + $varSubmitted = $this->validateForm($objWidget); + + if ($varSubmitted !== false) + { + \call_user_func_array(array($this, 'addRecipient'), $varSubmitted); + } + } + + // Add the captcha widget to the template + if ($objWidget !== null) + { + $this->Template->captcha = $objWidget->parse(); + } + + $session = \System::getContainer()->get('session'); + $flashBag = $session->getFlashBag(); + + // Confirmation message + if ($session->isStarted() && $flashBag->has('nl_confirm')) + { + $arrMessages = $flashBag->get('nl_confirm'); + + $this->Template->mclass = 'confirm'; + $this->Template->message = $arrMessages[0]; + } + + $arrChannels = array(); + $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); + + // Get the titles + if ($objChannel !== null) + { + while ($objChannel->next()) + { + $arrChannels[$objChannel->id] = $objChannel->title; + } + } + + // Default template variables + $this->Template->channels = $arrChannels; + $this->Template->showChannels = !$this->nl_hideChannels; + $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['subscribe']); + $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; + $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; + $this->Template->action = \Environment::get('indexFreeRequest'); + $this->Template->formId = $strFormId; + $this->Template->id = $this->id; + $this->Template->text = $this->nl_text; + } + + /** + * Activate a recipient + */ + protected function activateRecipient() + { + $this->Template = new \FrontendTemplate('mod_newsletter'); + + // Check the token + $objRecipient = \NewsletterRecipientsModel::findByToken(\Input::get('token')); + + if ($objRecipient === null) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['invalidToken']; + + return; + } + + $time = time(); + $arrAdd = array(); + $arrCids = array(); + + // Update the subscriptions + while ($objRecipient->next()) + { + /** @var NewsletterChannelModel $objChannel */ + $objChannel = $objRecipient->getRelated('pid'); + + $arrAdd[] = $objRecipient->id; + $arrCids[] = $objChannel->id; + + $objRecipient->active = 1; + $objRecipient->token = ''; + $objRecipient->pid = $objChannel->id; + $objRecipient->confirmed = $time; + $objRecipient->save(); + } + + // HOOK: post activation callback + if (isset($GLOBALS['TL_HOOKS']['activateRecipient']) && \is_array($GLOBALS['TL_HOOKS']['activateRecipient'])) + { + foreach ($GLOBALS['TL_HOOKS']['activateRecipient'] as $callback) + { + $this->import($callback[0]); + $this->{$callback[0]}->{$callback[1]}($objRecipient->email, $arrAdd, $arrCids); + } + } + + // Confirm activation + $this->Template->mclass = 'confirm'; + $this->Template->message = $GLOBALS['TL_LANG']['MSC']['nl_activate']; + } + + /** + * Validate the subscription form + * + * @param Widget $objWidget + * + * @return array|bool + */ + protected function validateForm(Widget $objWidget=null) + { + // Validate the e-mail address + $varInput = \Idna::encodeEmail(\Input::post('email', true)); + + if (!\Validator::isEmail($varInput)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; + + return false; + } + + $this->Template->email = $varInput; + + // Validate the channel selection + $arrChannels = \Input::post('channels'); + + if (!\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 + + if (empty($arrChannels) || !\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $this->Template->selectedChannels = $arrChannels; + + // Check if there are any new subscriptions + $arrSubscriptions = array(); + + if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) + { + $arrSubscriptions = $objSubscription->fetchEach('pid'); + } + + $arrNew = array_diff($arrChannels, $arrSubscriptions); + + if (empty($arrNew) || !\is_array($arrNew)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['subscribed']; + + return false; + } + + // Validate the captcha + if ($objWidget !== null) + { + $objWidget->validate(); + + if ($objWidget->hasErrors()) + { + return false; + } + } + + return array($varInput, $arrNew); + } + + /** + * Add a new recipient + * + * @param string $strEmail + * @param array $arrNew + */ + protected function addRecipient($strEmail, $arrNew) + { + // Remove old subscriptions that have not been activated yet + if (($objOld = \NewsletterRecipientsModel::findOldSubscriptionsByEmailAndPids($strEmail, $arrNew)) !== null) + { + while ($objOld->next()) + { + $objOld->delete(); + } + } + + $time = time(); + $strToken = md5(uniqid(mt_rand(), true)); + + // Add the new subscriptions + foreach ($arrNew as $id) + { + $objRecipient = new \NewsletterRecipientsModel(); + $objRecipient->pid = $id; + $objRecipient->tstamp = $time; + $objRecipient->email = $strEmail; + $objRecipient->active = ''; + $objRecipient->addedOn = $time; + $objRecipient->ip = \Environment::get('ip'); + $objRecipient->token = $strToken; + $objRecipient->confirmed = ''; + $objRecipient->save(); + + // Remove the blacklist entry (see #4999) + if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid(md5($strEmail), $id)) !== null) + { + $objBlacklist->delete(); + } + } + + // Get the channels + $objChannel = \NewsletterChannelModel::findByIds($arrNew); + + // Prepare the simple token data + $arrData = array(); + $arrData['token'] = $strToken; + $arrData['domain'] = \Idna::decode(\Environment::get('host')); + $arrData['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $strToken; + $arrData['channel'] = $arrData['channels'] = implode("\n", $objChannel->fetchEach('title')); + + // Activation e-mail + $objEmail = new \Email(); + $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; + $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; + $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); + $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_subscribe, $arrData); + $objEmail->sendTo($strEmail); + + // Redirect to the jumpTo page + if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) + { + /** @var PageModel $objTarget */ + $this->redirect($objTarget->getFrontendUrl()); + } + + \System::getContainer()->get('session')->getFlashBag()->set('nl_confirm', $GLOBALS['TL_LANG']['MSC']['nl_confirm']); + + $this->reload(); + } +} + +class_alias(ModuleSubscribe::class, 'ModuleSubscribe'); diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php new file mode 100644 index 00000000..692296d7 --- /dev/null +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -0,0 +1,296 @@ + + */ +class ModuleNewsletterUnsubscribeNotificationCenter extends Module +{ + + /** + * Template + * @var string + */ + protected $strTemplate = 'nl_default'; + + /** + * Display a wildcard in the back end + * + * @return string + */ + public function generate() + { + if (TL_MODE == 'BE') + { + $objTemplate = new \BackendTemplate('be_wildcard'); + $objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['unsubscribe'][0]) . ' ###'; + $objTemplate->title = $this->headline; + $objTemplate->id = $this->id; + $objTemplate->link = $this->name; + $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; + + return $objTemplate->parse(); + } + + $this->nl_channels = \StringUtil::deserialize($this->nl_channels); + + // Return if there are no channels + if (empty($this->nl_channels) || !\is_array($this->nl_channels)) + { + return ''; + } + + return parent::generate(); + } + + /** + * Generate the module + */ + protected function compile() + { + // Overwrite default template + if ($this->nl_template) + { + $this->Template = new \FrontendTemplate($this->nl_template); + $this->Template->setData($this->arrData); + } + + $this->Template->email = ''; + $this->Template->captcha = ''; + + $objWidget = null; + + // Set up the captcha widget + if (!$this->disableCaptcha) + { + $arrField = array + ( + 'name' => 'unsubscribe_'.$this->id, + 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], + 'inputType' => 'captcha', + 'eval' => array('mandatory'=>true) + ); + + /** @var Widget $objWidget */ + $objWidget = new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); + } + + $strFormId = 'tl_unsubscribe_' . $this->id; + + // Unsubscribe + if (\Input::post('FORM_SUBMIT') == $strFormId) + { + $varSubmitted = $this->validateForm($objWidget); + + if ($varSubmitted !== false) + { + \call_user_func_array(array($this, 'removeRecipient'), $varSubmitted); + } + } + + // Add the captcha widget to the template + if ($objWidget !== null) + { + $this->Template->captcha = $objWidget->parse(); + } + + $session = \System::getContainer()->get('session'); + $flashBag = $session->getFlashBag(); + + // Confirmation message + if ($session->isStarted() && $flashBag->has('nl_removed')) + { + $arrMessages = $flashBag->get('nl_removed'); + + $this->Template->mclass = 'confirm'; + $this->Template->message = $arrMessages[0]; + } + + $arrChannels = array(); + $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); + + // Get the titles + if ($objChannel !== null) + { + while ($objChannel->next()) + { + $arrChannels[$objChannel->id] = $objChannel->title; + } + } + + // Default template variables + $this->Template->channels = $arrChannels; + $this->Template->showChannels = !$this->nl_hideChannels; + $this->Template->email = \Input::get('email'); + $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['unsubscribe']); + $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; + $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; + $this->Template->action = \Environment::get('indexFreeRequest'); + $this->Template->formId = $strFormId; + $this->Template->id = $this->id; + } + + /** + * Validate the subscription form + * + * @param Widget $objWidget + * + * @return array|bool + */ + protected function validateForm(Widget $objWidget=null) + { + // Validate the e-mail address + $varInput = \Idna::encodeEmail(\Input::post('email', true)); + + if (!\Validator::isEmail($varInput)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; + + return false; + } + + $this->Template->email = $varInput; + + // Validate the channel selection + $arrChannels = \Input::post('channels'); + + if (!\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 + + if (empty($arrChannels) || !\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $this->Template->selectedChannels = $arrChannels; + + // Check if there are any new subscriptions + $arrSubscriptions = array(); + + if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) + { + $arrSubscriptions = $objSubscription->fetchEach('pid'); + } + + $arrRemove = array_intersect($arrChannels, $arrSubscriptions); + + if (empty($arrRemove) || !\is_array($arrRemove)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['unsubscribed']; + + return false; + } + + // Validate the captcha + if ($objWidget !== null) + { + $objWidget->validate(); + + if ($objWidget->hasErrors()) + { + return false; + } + } + + return array($varInput, $arrRemove); + } + + /** + * Remove the recipient + * + * @param string $strEmail + * @param array $arrRemove + */ + protected function removeRecipient($strEmail, $arrRemove) + { + // Remove the subscriptions + if (($objRemove = \NewsletterRecipientsModel::findByEmailAndPids($strEmail, $arrRemove)) !== null) + { + while ($objRemove->next()) + { + $strHash = md5($objRemove->email); + + // Add a blacklist entry (see #4999) + if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid($strHash, $objRemove->pid)) === null) + { + $objBlacklist = new \NewsletterBlacklistModel(); + $objBlacklist->pid = $objRemove->pid; + $objBlacklist->hash = $strHash; + $objBlacklist->save(); + } + + $objRemove->delete(); + } + } + + // Get the channels + $objChannels = \NewsletterChannelModel::findByIds($arrRemove); + $arrChannels = $objChannels->fetchEach('title'); + + // HOOK: post unsubscribe callback + if (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && \is_array($GLOBALS['TL_HOOKS']['removeRecipient'])) + { + foreach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback) + { + $this->import($callback[0]); + $this->{$callback[0]}->{$callback[1]}($strEmail, $arrRemove); + } + } + + // Prepare the simple token data + $arrData = array(); + $arrData['domain'] = \Idna::decode(\Environment::get('host')); + $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); + + // Confirmation e-mail + $objEmail = new \Email(); + $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; + $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; + $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); + $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_unsubscribe, $arrData); + $objEmail->sendTo($strEmail); + + // Redirect to the jumpTo page + if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) + { + /** @var PageModel $objTarget */ + $this->redirect($objTarget->getFrontendUrl()); + } + + \System::getContainer()->get('session')->getFlashBag()->set('nl_removed', $GLOBALS['TL_LANG']['MSC']['nl_removed']); + + $this->reload(); + } +} + +class_alias(ModuleNewsletterUnsubscribeNotificationCenter::class, 'ModuleUnsubscribe'); From 0ec9ba7335f59066645a15b9dfc66f9087151a0f Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:09:51 +0200 Subject: [PATCH 15/51] Extend from ModuleSubscribe and drop code which will not change. --- ...eNewsletterSubscribeNotificationCenter.php | 118 +----------------- 1 file changed, 1 insertion(+), 117 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 8e48a6c1..b493ae45 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -23,45 +23,8 @@ * * @author Leo Feyer */ -class ModuleNewsletterSubscribeNotificationCenter extends Module +class ModuleNewsletterSubscribeNotificationCenter extends ModuleSubscribe { - - /** - * Template - * @var string - */ - protected $strTemplate = 'nl_default'; - - /** - * Display a wildcard in the back end - * - * @return string - */ - public function generate() - { - if (TL_MODE == 'BE') - { - $objTemplate = new \BackendTemplate('be_wildcard'); - $objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['subscribe'][0]) . ' ###'; - $objTemplate->title = $this->headline; - $objTemplate->id = $this->id; - $objTemplate->link = $this->name; - $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; - - return $objTemplate->parse(); - } - - $this->nl_channels = \StringUtil::deserialize($this->nl_channels); - - // Return if there are no channels - if (empty($this->nl_channels) || !\is_array($this->nl_channels)) - { - return ''; - } - - return parent::generate(); - } - /** * Generate the module */ @@ -210,83 +173,6 @@ protected function activateRecipient() $this->Template->message = $GLOBALS['TL_LANG']['MSC']['nl_activate']; } - /** - * Validate the subscription form - * - * @param Widget $objWidget - * - * @return array|bool - */ - protected function validateForm(Widget $objWidget=null) - { - // Validate the e-mail address - $varInput = \Idna::encodeEmail(\Input::post('email', true)); - - if (!\Validator::isEmail($varInput)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; - - return false; - } - - $this->Template->email = $varInput; - - // Validate the channel selection - $arrChannels = \Input::post('channels'); - - if (!\is_array($arrChannels)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; - - return false; - } - - $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 - - if (empty($arrChannels) || !\is_array($arrChannels)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; - - return false; - } - - $this->Template->selectedChannels = $arrChannels; - - // Check if there are any new subscriptions - $arrSubscriptions = array(); - - if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) - { - $arrSubscriptions = $objSubscription->fetchEach('pid'); - } - - $arrNew = array_diff($arrChannels, $arrSubscriptions); - - if (empty($arrNew) || !\is_array($arrNew)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['subscribed']; - - return false; - } - - // Validate the captcha - if ($objWidget !== null) - { - $objWidget->validate(); - - if ($objWidget->hasErrors()) - { - return false; - } - } - - return array($varInput, $arrNew); - } - /** * Add a new recipient * @@ -358,5 +244,3 @@ protected function addRecipient($strEmail, $arrNew) $this->reload(); } } - -class_alias(ModuleSubscribe::class, 'ModuleSubscribe'); From 82cf5d9d42c56be29cf530e76e0454a75c33e7f2 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:12:06 +0200 Subject: [PATCH 16/51] Extract activation to a new module. --- ...leNewsletterActivateNotificationCenter.php | 80 +++++++++++++++++++ ...eNewsletterSubscribeNotificationCenter.php | 61 -------------- 2 files changed, 80 insertions(+), 61 deletions(-) create mode 100644 modules/ModuleNewsletterActivateNotificationCenter.php diff --git a/modules/ModuleNewsletterActivateNotificationCenter.php b/modules/ModuleNewsletterActivateNotificationCenter.php new file mode 100644 index 00000000..0ba874b2 --- /dev/null +++ b/modules/ModuleNewsletterActivateNotificationCenter.php @@ -0,0 +1,80 @@ + + * @license LGPL + */ + +namespace Contao; + +final class ModuleNewsletterActivateNotificationCenter extends Module +{ + protected $strTemplate = 'nl_default'; + + protected function compile() + { + // Activate e-mail address + if (\Input::get('token')) + { + $this->activateRecipient(); + + return; + } + } + + /** + * Activate a recipient + */ + protected function activateRecipient() + { + $this->Template = new \FrontendTemplate('mod_newsletter'); + + // Check the token + $objRecipient = \NewsletterRecipientsModel::findByToken(\Input::get('token')); + + if ($objRecipient === null) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['invalidToken']; + + return; + } + + $time = time(); + $arrAdd = array(); + $arrCids = array(); + + // Update the subscriptions + while ($objRecipient->next()) + { + /** @var NewsletterChannelModel $objChannel */ + $objChannel = $objRecipient->getRelated('pid'); + + $arrAdd[] = $objRecipient->id; + $arrCids[] = $objChannel->id; + + $objRecipient->active = 1; + $objRecipient->token = ''; + $objRecipient->pid = $objChannel->id; + $objRecipient->confirmed = $time; + $objRecipient->save(); + } + + // HOOK: post activation callback + if (isset($GLOBALS['TL_HOOKS']['activateRecipient']) && \is_array($GLOBALS['TL_HOOKS']['activateRecipient'])) + { + foreach ($GLOBALS['TL_HOOKS']['activateRecipient'] as $callback) + { + $this->import($callback[0]); + $this->{$callback[0]}->{$callback[1]}($objRecipient->email, $arrAdd, $arrCids); + } + } + + // Confirm activation + $this->Template->mclass = 'confirm'; + $this->Template->message = $GLOBALS['TL_LANG']['MSC']['nl_activate']; + } +} diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index b493ae45..4bf556a0 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -40,14 +40,6 @@ protected function compile() $this->Template->email = ''; $this->Template->captcha = ''; - // Activate e-mail address - if (\Input::get('token')) - { - $this->activateRecipient(); - - return; - } - $objWidget = null; // Set up the captcha widget @@ -120,59 +112,6 @@ protected function compile() $this->Template->text = $this->nl_text; } - /** - * Activate a recipient - */ - protected function activateRecipient() - { - $this->Template = new \FrontendTemplate('mod_newsletter'); - - // Check the token - $objRecipient = \NewsletterRecipientsModel::findByToken(\Input::get('token')); - - if ($objRecipient === null) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['invalidToken']; - - return; - } - - $time = time(); - $arrAdd = array(); - $arrCids = array(); - - // Update the subscriptions - while ($objRecipient->next()) - { - /** @var NewsletterChannelModel $objChannel */ - $objChannel = $objRecipient->getRelated('pid'); - - $arrAdd[] = $objRecipient->id; - $arrCids[] = $objChannel->id; - - $objRecipient->active = 1; - $objRecipient->token = ''; - $objRecipient->pid = $objChannel->id; - $objRecipient->confirmed = $time; - $objRecipient->save(); - } - - // HOOK: post activation callback - if (isset($GLOBALS['TL_HOOKS']['activateRecipient']) && \is_array($GLOBALS['TL_HOOKS']['activateRecipient'])) - { - foreach ($GLOBALS['TL_HOOKS']['activateRecipient'] as $callback) - { - $this->import($callback[0]); - $this->{$callback[0]}->{$callback[1]}($objRecipient->email, $arrAdd, $arrCids); - } - } - - // Confirm activation - $this->Template->mclass = 'confirm'; - $this->Template->message = $GLOBALS['TL_LANG']['MSC']['nl_activate']; - } - /** * Add a new recipient * From ce696571dbeea244ed1962e16637c608dec967d7 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:14:13 +0200 Subject: [PATCH 17/51] Extract custom template and widget creation to sub methods. --- ...eNewsletterSubscribeNotificationCenter.php | 65 +++++++++++-------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 4bf556a0..aaac8008 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -30,39 +30,19 @@ class ModuleNewsletterSubscribeNotificationCenter extends ModuleSubscribe */ protected function compile() { - // Overwrite default template - if ($this->nl_template) - { - $this->Template = new \FrontendTemplate($this->nl_template); - $this->Template->setData($this->arrData); - } + $this->setCustomTemplate(); - $this->Template->email = ''; + $this->Template->email = ''; $this->Template->captcha = ''; - $objWidget = null; - - // Set up the captcha widget - if (!$this->disableCaptcha) - { - $arrField = array - ( - 'name' => 'subscribe_'.$this->id, - 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], - 'inputType' => 'captcha', - 'eval' => array('mandatory'=>true) - ); - - /** @var Widget $objWidget */ - $objWidget = new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); - } + $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); - $strFormId = 'tl_subscribe_' . $this->id; + $strFormId = 'tl_subscribe_' . $this->id; // Validate the form if (\Input::post('FORM_SUBMIT') == $strFormId) { - $varSubmitted = $this->validateForm($objWidget); + $varSubmitted = $this->validateForm($objCaptchaWidget); if ($varSubmitted !== false) { @@ -71,9 +51,9 @@ protected function compile() } // Add the captcha widget to the template - if ($objWidget !== null) + if ($objCaptchaWidget !== null) { - $this->Template->captcha = $objWidget->parse(); + $this->Template->captcha = $objCaptchaWidget->parse(); } $session = \System::getContainer()->get('session'); @@ -182,4 +162,35 @@ protected function addRecipient($strEmail, $arrNew) $this->reload(); } + + protected function setCustomTemplate() + { + if ($this->nl_template) { + $this->Template = new \FrontendTemplate($this->nl_template); + $this->Template->setData($this->arrData); + } + } + + /** + * @return Widget|null + */ + protected function createCaptchaWidgetIfEnabled() + { + $objWidget = null; + + // Set up the captcha widget + if (!$this->disableCaptcha) { + $arrField = [ + 'name' => 'subscribe_' . $this->id, + 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], + 'inputType' => 'captcha', + 'eval' => ['mandatory' => true] + ]; + + /** @var Widget $objWidget */ + $objWidget = new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); + } + + return $objWidget; + } } From bd87c1e0e0f399c007331015ce02a7aa8b0f9f23 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:16:10 +0200 Subject: [PATCH 18/51] Extract confirmation message and channel compiling to sub methods. --- ...eNewsletterSubscribeNotificationCenter.php | 58 +++++++++++-------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index aaac8008..a2e718fc 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -56,32 +56,10 @@ protected function compile() $this->Template->captcha = $objCaptchaWidget->parse(); } - $session = \System::getContainer()->get('session'); - $flashBag = $session->getFlashBag(); - - // Confirmation message - if ($session->isStarted() && $flashBag->has('nl_confirm')) - { - $arrMessages = $flashBag->get('nl_confirm'); - - $this->Template->mclass = 'confirm'; - $this->Template->message = $arrMessages[0]; - } - - $arrChannels = array(); - $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); - - // Get the titles - if ($objChannel !== null) - { - while ($objChannel->next()) - { - $arrChannels[$objChannel->id] = $objChannel->title; - } - } + $this->compileConfirmationMessage(); // Default template variables - $this->Template->channels = $arrChannels; + $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['subscribe']); $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; @@ -193,4 +171,36 @@ protected function createCaptchaWidgetIfEnabled() return $objWidget; } + + protected function compileConfirmationMessage() + { + $session = \System::getContainer()->get('session'); + $flashBag = $session->getFlashBag(); + + // Confirmation message + if ($session->isStarted() && $flashBag->has('nl_confirm')) + { + $arrMessages = $flashBag->get('nl_confirm'); + + $this->Template->mclass = 'confirm'; + $this->Template->message = $arrMessages[0]; + } + } + + private function compileChannels() + { + $arrChannels = array(); + $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); + + // Get the titles + if ($objChannel !== null) + { + while ($objChannel->next()) + { + $arrChannels[$objChannel->id] = $objChannel->title; + } + } + + return $arrChannels; + } } From 3b010572b296e72c3cb0f899a8f44c52c829751c Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:18:27 +0200 Subject: [PATCH 19/51] Extract form submit handling to sub method. --- ...eNewsletterSubscribeNotificationCenter.php | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index a2e718fc..aa6857d9 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -32,33 +32,15 @@ protected function compile() { $this->setCustomTemplate(); - $this->Template->email = ''; - $this->Template->captcha = ''; - $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); $strFormId = 'tl_subscribe_' . $this->id; - // Validate the form - if (\Input::post('FORM_SUBMIT') == $strFormId) - { - $varSubmitted = $this->validateForm($objCaptchaWidget); - - if ($varSubmitted !== false) - { - \call_user_func_array(array($this, 'addRecipient'), $varSubmitted); - } - } - - // Add the captcha widget to the template - if ($objCaptchaWidget !== null) - { - $this->Template->captcha = $objCaptchaWidget->parse(); - } - - $this->compileConfirmationMessage(); + $this->processForm($strFormId, $objCaptchaWidget); + $this->compileConfirmationMessage(); - // Default template variables + $this->Template->email = ''; + $this->Template->captcha = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['subscribe']); @@ -203,4 +185,20 @@ private function compileChannels() return $arrChannels; } + + /** + * @param $strFormId + * @param $objCaptchaWidget + */ + protected function processForm($strFormId, $objCaptchaWidget) + { +// Validate the form + if (\Input::post('FORM_SUBMIT') == $strFormId) { + $varSubmitted = $this->validateForm($objCaptchaWidget); + + if ($varSubmitted !== false) { + \call_user_func_array([$this, 'addRecipient'], $varSubmitted); + } + } + } } From ac1d2423859e0b60d0b7657672bc26c221bea27f Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:19:35 +0200 Subject: [PATCH 20/51] Change indention and file header. --- ...eNewsletterSubscribeNotificationCenter.php | 185 +++++++++--------- 1 file changed, 91 insertions(+), 94 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index aa6857d9..f6e290ca 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -1,17 +1,15 @@ + * @license LGPL */ namespace Contao; -use Patchwork\Utf8; - /** * Front end module "newsletter subscribe". * @@ -25,11 +23,11 @@ */ class ModuleNewsletterSubscribeNotificationCenter extends ModuleSubscribe { - /** - * Generate the module - */ - protected function compile() - { + /** + * Generate the module + */ + protected function compile() + { $this->setCustomTemplate(); $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); @@ -41,87 +39,87 @@ protected function compile() $this->Template->email = ''; $this->Template->captcha = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; - $this->Template->channels = $this->compileChannels(); - $this->Template->showChannels = !$this->nl_hideChannels; - $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['subscribe']); - $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; - $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; - $this->Template->action = \Environment::get('indexFreeRequest'); - $this->Template->formId = $strFormId; - $this->Template->id = $this->id; - $this->Template->text = $this->nl_text; - } - - /** - * Add a new recipient - * - * @param string $strEmail - * @param array $arrNew - */ - protected function addRecipient($strEmail, $arrNew) - { - // Remove old subscriptions that have not been activated yet - if (($objOld = \NewsletterRecipientsModel::findOldSubscriptionsByEmailAndPids($strEmail, $arrNew)) !== null) - { - while ($objOld->next()) - { - $objOld->delete(); - } - } - - $time = time(); - $strToken = md5(uniqid(mt_rand(), true)); - - // Add the new subscriptions - foreach ($arrNew as $id) - { - $objRecipient = new \NewsletterRecipientsModel(); - $objRecipient->pid = $id; - $objRecipient->tstamp = $time; - $objRecipient->email = $strEmail; - $objRecipient->active = ''; - $objRecipient->addedOn = $time; - $objRecipient->ip = \Environment::get('ip'); - $objRecipient->token = $strToken; - $objRecipient->confirmed = ''; - $objRecipient->save(); - - // Remove the blacklist entry (see #4999) - if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid(md5($strEmail), $id)) !== null) - { - $objBlacklist->delete(); - } - } - - // Get the channels - $objChannel = \NewsletterChannelModel::findByIds($arrNew); - - // Prepare the simple token data - $arrData = array(); - $arrData['token'] = $strToken; - $arrData['domain'] = \Idna::decode(\Environment::get('host')); - $arrData['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $strToken; - $arrData['channel'] = $arrData['channels'] = implode("\n", $objChannel->fetchEach('title')); - - // Activation e-mail - $objEmail = new \Email(); - $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; - $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; - $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); - $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_subscribe, $arrData); - $objEmail->sendTo($strEmail); - - // Redirect to the jumpTo page - if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) - { - /** @var PageModel $objTarget */ - $this->redirect($objTarget->getFrontendUrl()); - } - - \System::getContainer()->get('session')->getFlashBag()->set('nl_confirm', $GLOBALS['TL_LANG']['MSC']['nl_confirm']); - - $this->reload(); - } + $this->Template->channels = $this->compileChannels(); + $this->Template->showChannels = !$this->nl_hideChannels; + $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['subscribe']); + $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; + $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; + $this->Template->action = \Environment::get('indexFreeRequest'); + $this->Template->formId = $strFormId; + $this->Template->id = $this->id; + $this->Template->text = $this->nl_text; + } + + /** + * Add a new recipient + * + * @param string $strEmail + * @param array $arrNew + */ + protected function addRecipient($strEmail, $arrNew) + { + // Remove old subscriptions that have not been activated yet + if (($objOld = \NewsletterRecipientsModel::findOldSubscriptionsByEmailAndPids($strEmail, $arrNew)) !== null) + { + while ($objOld->next()) + { + $objOld->delete(); + } + } + + $time = time(); + $strToken = md5(uniqid(mt_rand(), true)); + + // Add the new subscriptions + foreach ($arrNew as $id) + { + $objRecipient = new \NewsletterRecipientsModel(); + $objRecipient->pid = $id; + $objRecipient->tstamp = $time; + $objRecipient->email = $strEmail; + $objRecipient->active = ''; + $objRecipient->addedOn = $time; + $objRecipient->ip = \Environment::get('ip'); + $objRecipient->token = $strToken; + $objRecipient->confirmed = ''; + $objRecipient->save(); + + // Remove the blacklist entry (see #4999) + if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid(md5($strEmail), $id)) !== null) + { + $objBlacklist->delete(); + } + } + + // Get the channels + $objChannel = \NewsletterChannelModel::findByIds($arrNew); + + // Prepare the simple token data + $arrData = array(); + $arrData['token'] = $strToken; + $arrData['domain'] = \Idna::decode(\Environment::get('host')); + $arrData['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $strToken; + $arrData['channel'] = $arrData['channels'] = implode("\n", $objChannel->fetchEach('title')); + + // Activation e-mail + $objEmail = new \Email(); + $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; + $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; + $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); + $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_subscribe, $arrData); + $objEmail->sendTo($strEmail); + + // Redirect to the jumpTo page + if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) + { + /** @var PageModel $objTarget */ + $this->redirect($objTarget->getFrontendUrl()); + } + + \System::getContainer()->get('session')->getFlashBag()->set('nl_confirm', $GLOBALS['TL_LANG']['MSC']['nl_confirm']); + + $this->reload(); + } protected function setCustomTemplate() { @@ -192,7 +190,6 @@ private function compileChannels() */ protected function processForm($strFormId, $objCaptchaWidget) { -// Validate the form if (\Input::post('FORM_SUBMIT') == $strFormId) { $varSubmitted = $this->validateForm($objCaptchaWidget); From a6dee98742984ca8dfd80ebb5bf0052acd0f3e8e Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:25:01 +0200 Subject: [PATCH 21/51] Send notification instead of email. --- ...eNewsletterSubscribeNotificationCenter.php | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index f6e290ca..4d7fa1a7 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -10,6 +10,8 @@ namespace Contao; +use NotificationCenter\Model\Notification; + /** * Front end module "newsletter subscribe". * @@ -18,6 +20,7 @@ * @property string $nl_template * @property string $nl_text * @property bool $nl_hideChannels + * @property int $nc_notification * * @author Leo Feyer */ @@ -91,23 +94,7 @@ protected function addRecipient($strEmail, $arrNew) } } - // Get the channels - $objChannel = \NewsletterChannelModel::findByIds($arrNew); - - // Prepare the simple token data - $arrData = array(); - $arrData['token'] = $strToken; - $arrData['domain'] = \Idna::decode(\Environment::get('host')); - $arrData['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $strToken; - $arrData['channel'] = $arrData['channels'] = implode("\n", $objChannel->fetchEach('title')); - - // Activation e-mail - $objEmail = new \Email(); - $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; - $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; - $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); - $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_subscribe, $arrData); - $objEmail->sendTo($strEmail); + $this->sendNotification($strToken, $strEmail, $arrNew); // Redirect to the jumpTo page if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) @@ -198,4 +185,28 @@ protected function processForm($strFormId, $objCaptchaWidget) } } } + + protected function sendNotification($strToken, $strEmail, array $arrNew) + { + $objNotification = Notification::findByPk($this->nc_notification); + if (!$objNotification) { + return; + } + + $objChannel = \NewsletterChannelModel::findByIds($arrNew); + $arrChannels = $objChannel ? $objChannel->fetchEach('title') : []; + + // Prepare the simple token data + $arrData = array(); + $arrData['email'] = $strEmail; + $arrData['token'] = $strToken; + $arrData['domain'] = \Idna::decode(\Environment::get('host')); + $arrData['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $strToken; + $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); + $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; + $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; + $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); + + $objNotification->send($arrData); + } } From a47427e83dd50781b40cddfa3d77239ccf964028 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:25:34 +0200 Subject: [PATCH 22/51] Make private method as protected to stay compatible with coding style. --- modules/ModuleNewsletterSubscribeNotificationCenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 4d7fa1a7..8f91e425 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -154,7 +154,7 @@ protected function compileConfirmationMessage() } } - private function compileChannels() + protected function compileChannels() { $arrChannels = array(); $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); From 9997d6bbb0310a2e268174bf501faf10e627b5f5 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:32:46 +0200 Subject: [PATCH 23/51] Add compatibility layer for Contao < 4.1. --- ...eNewsletterSubscribeNotificationCenter.php | 68 +++++++++++++------ 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 8f91e425..f3accf37 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -103,7 +103,14 @@ protected function addRecipient($strEmail, $arrNew) $this->redirect($objTarget->getFrontendUrl()); } - \System::getContainer()->get('session')->getFlashBag()->set('nl_confirm', $GLOBALS['TL_LANG']['MSC']['nl_confirm']); + if (version_compare(VERSION, '4.1', '>=')) + { + \System::getContainer()->get('session')->getFlashBag()->set('nl_confirm', $GLOBALS['TL_LANG']['MSC']['nl_confirm']); + } + else + { + $_SESSION['SUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_confirm']; + } $this->reload(); } @@ -121,36 +128,55 @@ protected function setCustomTemplate() */ protected function createCaptchaWidgetIfEnabled() { - $objWidget = null; - - // Set up the captcha widget - if (!$this->disableCaptcha) { - $arrField = [ - 'name' => 'subscribe_' . $this->id, - 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], - 'inputType' => 'captcha', - 'eval' => ['mandatory' => true] - ]; - - /** @var Widget $objWidget */ - $objWidget = new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); + if (version_compare(VERSION, '4.1', '<') || $this->disableCaptcha) + { + return null; } - return $objWidget; + $arrField = [ + 'name' => 'subscribe_' . $this->id, + 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], + 'inputType' => 'captcha', + 'eval' => ['mandatory' => true] + ]; + + return new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); } protected function compileConfirmationMessage() { - $session = \System::getContainer()->get('session'); - $flashBag = $session->getFlashBag(); + if (version_compare(VERSION, '4.1', '>=')) + { + $session = \System::getContainer()->get('session'); + $flashBag = $session->getFlashBag(); - // Confirmation message - if ($session->isStarted() && $flashBag->has('nl_confirm')) + if ($session->isStarted() && $flashBag->has('nl_confirm')) + { + $arrMessages = $flashBag->get('nl_confirm'); + + $this->Template->mclass = 'confirm'; + $this->Template->message = $arrMessages[0]; + } + + return; + } + + // Error message + if (strlen($_SESSION['SUBSCRIBE_ERROR'])) { - $arrMessages = $flashBag->get('nl_confirm'); + $this->Template->mclass = 'error'; + $this->Template->message = $_SESSION['SUBSCRIBE_ERROR']; + $this->Template->hasError = true; + $_SESSION['SUBSCRIBE_ERROR'] = ''; + } + // Confirmation message + if (strlen($_SESSION['SUBSCRIBE_CONFIRM'])) + { $this->Template->mclass = 'confirm'; - $this->Template->message = $arrMessages[0]; + $this->Template->message = $_SESSION['SUBSCRIBE_CONFIRM']; + $this->Template->hasError = false; + $_SESSION['SUBSCRIBE_CONFIRM'] = ''; } } From 016fc8408df9d67795daf5cb290fdff4077c6d4f Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:36:26 +0200 Subject: [PATCH 24/51] Extend from ModuleUnsubscribe and drop code which won't change. --- ...ewsletterUnsubscribeNotificationCenter.php | 120 +----------------- 1 file changed, 1 insertion(+), 119 deletions(-) diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 692296d7..6d8c34f1 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -10,8 +10,6 @@ namespace Contao; -use Patchwork\Utf8; - /** * Front end module "newsletter unsubscribe". * @@ -22,45 +20,8 @@ * * @author Leo Feyer */ -class ModuleNewsletterUnsubscribeNotificationCenter extends Module +class ModuleNewsletterUnsubscribeNotificationCenter extends ModuleUnsubscribe { - - /** - * Template - * @var string - */ - protected $strTemplate = 'nl_default'; - - /** - * Display a wildcard in the back end - * - * @return string - */ - public function generate() - { - if (TL_MODE == 'BE') - { - $objTemplate = new \BackendTemplate('be_wildcard'); - $objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['unsubscribe'][0]) . ' ###'; - $objTemplate->title = $this->headline; - $objTemplate->id = $this->id; - $objTemplate->link = $this->name; - $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; - - return $objTemplate->parse(); - } - - $this->nl_channels = \StringUtil::deserialize($this->nl_channels); - - // Return if there are no channels - if (empty($this->nl_channels) || !\is_array($this->nl_channels)) - { - return ''; - } - - return parent::generate(); - } - /** * Generate the module */ @@ -148,83 +109,6 @@ protected function compile() $this->Template->id = $this->id; } - /** - * Validate the subscription form - * - * @param Widget $objWidget - * - * @return array|bool - */ - protected function validateForm(Widget $objWidget=null) - { - // Validate the e-mail address - $varInput = \Idna::encodeEmail(\Input::post('email', true)); - - if (!\Validator::isEmail($varInput)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; - - return false; - } - - $this->Template->email = $varInput; - - // Validate the channel selection - $arrChannels = \Input::post('channels'); - - if (!\is_array($arrChannels)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; - - return false; - } - - $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 - - if (empty($arrChannels) || !\is_array($arrChannels)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; - - return false; - } - - $this->Template->selectedChannels = $arrChannels; - - // Check if there are any new subscriptions - $arrSubscriptions = array(); - - if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) - { - $arrSubscriptions = $objSubscription->fetchEach('pid'); - } - - $arrRemove = array_intersect($arrChannels, $arrSubscriptions); - - if (empty($arrRemove) || !\is_array($arrRemove)) - { - $this->Template->mclass = 'error'; - $this->Template->message = $GLOBALS['TL_LANG']['ERR']['unsubscribed']; - - return false; - } - - // Validate the captcha - if ($objWidget !== null) - { - $objWidget->validate(); - - if ($objWidget->hasErrors()) - { - return false; - } - } - - return array($varInput, $arrRemove); - } - /** * Remove the recipient * @@ -292,5 +176,3 @@ protected function removeRecipient($strEmail, $arrRemove) $this->reload(); } } - -class_alias(ModuleNewsletterUnsubscribeNotificationCenter::class, 'ModuleUnsubscribe'); From cfafae078e9a22782f0b932685f2f43a0c2de05d Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:43:22 +0200 Subject: [PATCH 25/51] Reuse code from subscribe module by extracting it to a trait. --- ...eNewsletterSubscribeNotificationCenter.php | 64 +-------------- ...ewsletterUnsubscribeNotificationCenter.php | 55 ++----------- modules/NewsletterModuleTrait.php | 78 +++++++++++++++++++ 3 files changed, 89 insertions(+), 108 deletions(-) create mode 100644 modules/NewsletterModuleTrait.php diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index f3accf37..7dadff48 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -26,6 +26,8 @@ */ class ModuleNewsletterSubscribeNotificationCenter extends ModuleSubscribe { + use NewsletterModuleTrait; + /** * Generate the module */ @@ -37,7 +39,7 @@ protected function compile() $strFormId = 'tl_subscribe_' . $this->id; - $this->processForm($strFormId, $objCaptchaWidget); + $this->processForm($strFormId, $objCaptchaWidget, 'addRecipient'); $this->compileConfirmationMessage(); $this->Template->email = ''; @@ -115,34 +117,6 @@ protected function addRecipient($strEmail, $arrNew) $this->reload(); } - protected function setCustomTemplate() - { - if ($this->nl_template) { - $this->Template = new \FrontendTemplate($this->nl_template); - $this->Template->setData($this->arrData); - } - } - - /** - * @return Widget|null - */ - protected function createCaptchaWidgetIfEnabled() - { - if (version_compare(VERSION, '4.1', '<') || $this->disableCaptcha) - { - return null; - } - - $arrField = [ - 'name' => 'subscribe_' . $this->id, - 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], - 'inputType' => 'captcha', - 'eval' => ['mandatory' => true] - ]; - - return new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); - } - protected function compileConfirmationMessage() { if (version_compare(VERSION, '4.1', '>=')) @@ -180,38 +154,6 @@ protected function compileConfirmationMessage() } } - protected function compileChannels() - { - $arrChannels = array(); - $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); - - // Get the titles - if ($objChannel !== null) - { - while ($objChannel->next()) - { - $arrChannels[$objChannel->id] = $objChannel->title; - } - } - - return $arrChannels; - } - - /** - * @param $strFormId - * @param $objCaptchaWidget - */ - protected function processForm($strFormId, $objCaptchaWidget) - { - if (\Input::post('FORM_SUBMIT') == $strFormId) { - $varSubmitted = $this->validateForm($objCaptchaWidget); - - if ($varSubmitted !== false) { - \call_user_func_array([$this, 'addRecipient'], $varSubmitted); - } - } - } - protected function sendNotification($strToken, $strEmail, array $arrNew) { $objNotification = Notification::findByPk($this->nc_notification); diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 6d8c34f1..0f1d4f8a 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -22,55 +22,28 @@ */ class ModuleNewsletterUnsubscribeNotificationCenter extends ModuleUnsubscribe { + use NewsletterModuleTrait; + /** * Generate the module */ protected function compile() { - // Overwrite default template - if ($this->nl_template) - { - $this->Template = new \FrontendTemplate($this->nl_template); - $this->Template->setData($this->arrData); - } + $this->setCustomTemplate(); $this->Template->email = ''; $this->Template->captcha = ''; - $objWidget = null; - - // Set up the captcha widget - if (!$this->disableCaptcha) - { - $arrField = array - ( - 'name' => 'unsubscribe_'.$this->id, - 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], - 'inputType' => 'captcha', - 'eval' => array('mandatory'=>true) - ); - - /** @var Widget $objWidget */ - $objWidget = new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); - } + $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); $strFormId = 'tl_unsubscribe_' . $this->id; - // Unsubscribe - if (\Input::post('FORM_SUBMIT') == $strFormId) - { - $varSubmitted = $this->validateForm($objWidget); - - if ($varSubmitted !== false) - { - \call_user_func_array(array($this, 'removeRecipient'), $varSubmitted); - } - } + $this->processForm($strFormId, $objCaptchaWidget, 'removeRecipient'); // Add the captcha widget to the template - if ($objWidget !== null) + if ($objCaptchaWidget !== null) { - $this->Template->captcha = $objWidget->parse(); + $this->Template->captcha = $objCaptchaWidget->parse(); } $session = \System::getContainer()->get('session'); @@ -85,20 +58,8 @@ protected function compile() $this->Template->message = $arrMessages[0]; } - $arrChannels = array(); - $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); - - // Get the titles - if ($objChannel !== null) - { - while ($objChannel->next()) - { - $arrChannels[$objChannel->id] = $objChannel->title; - } - } - // Default template variables - $this->Template->channels = $arrChannels; + $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; $this->Template->email = \Input::get('email'); $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['unsubscribe']); diff --git a/modules/NewsletterModuleTrait.php b/modules/NewsletterModuleTrait.php new file mode 100644 index 00000000..33639c18 --- /dev/null +++ b/modules/NewsletterModuleTrait.php @@ -0,0 +1,78 @@ + + * @license LGPL + */ + +namespace Contao; + + +trait NewsletterModuleTrait +{ + protected function setCustomTemplate() + { + if ($this->nl_template) { + $this->Template = new \FrontendTemplate($this->nl_template); + $this->Template->setData($this->arrData); + } + } + + /** + * @return Widget|null + */ + protected function createCaptchaWidgetIfEnabled() + { + if (version_compare(VERSION, '4.1', '<') || $this->disableCaptcha) + { + return null; + } + + $arrField = [ + 'name' => 'subscribe_' . $this->id, + 'label' => $GLOBALS['TL_LANG']['MSC']['securityQuestion'], + 'inputType' => 'captcha', + 'eval' => ['mandatory' => true] + ]; + + return new \FormCaptcha(\FormCaptcha::getAttributesFromDca($arrField, $arrField['name'])); + } + + /** + * @param $strFormId + * @param $objCaptchaWidget + * @param $strCallback + */ + protected function processForm($strFormId, $objCaptchaWidget, $strCallback) + { + if (\Input::post('FORM_SUBMIT') == $strFormId) + { + $varSubmitted = $this->validateForm($objCaptchaWidget); + + if ($varSubmitted !== false) + { + \call_user_func_array([$this, $strCallback], $varSubmitted); + } + } + } + + protected function compileChannels() + { + $arrChannels = array(); + $objChannel = \NewsletterChannelModel::findByIds($this->nl_channels); + + // Get the titles + if ($objChannel !== null) + { + while ($objChannel->next()) + { + $arrChannels[$objChannel->id] = $objChannel->title; + } + } + + return $arrChannels; + } +} From 91844b0ff616a8cd24b15356ffb696e1e9e11bb3 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:43:47 +0200 Subject: [PATCH 26/51] Indent by spaces. --- ...ewsletterUnsubscribeNotificationCenter.php | 224 +++++++++--------- 1 file changed, 112 insertions(+), 112 deletions(-) diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 0f1d4f8a..c356ac91 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -24,116 +24,116 @@ class ModuleNewsletterUnsubscribeNotificationCenter extends ModuleUnsubscribe { use NewsletterModuleTrait; - /** - * Generate the module - */ - protected function compile() - { - $this->setCustomTemplate(); - - $this->Template->email = ''; - $this->Template->captcha = ''; - - $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); - - $strFormId = 'tl_unsubscribe_' . $this->id; - - $this->processForm($strFormId, $objCaptchaWidget, 'removeRecipient'); - - // Add the captcha widget to the template - if ($objCaptchaWidget !== null) - { - $this->Template->captcha = $objCaptchaWidget->parse(); - } - - $session = \System::getContainer()->get('session'); - $flashBag = $session->getFlashBag(); - - // Confirmation message - if ($session->isStarted() && $flashBag->has('nl_removed')) - { - $arrMessages = $flashBag->get('nl_removed'); - - $this->Template->mclass = 'confirm'; - $this->Template->message = $arrMessages[0]; - } - - // Default template variables - $this->Template->channels = $this->compileChannels(); - $this->Template->showChannels = !$this->nl_hideChannels; - $this->Template->email = \Input::get('email'); - $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['unsubscribe']); - $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; - $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; - $this->Template->action = \Environment::get('indexFreeRequest'); - $this->Template->formId = $strFormId; - $this->Template->id = $this->id; - } - - /** - * Remove the recipient - * - * @param string $strEmail - * @param array $arrRemove - */ - protected function removeRecipient($strEmail, $arrRemove) - { - // Remove the subscriptions - if (($objRemove = \NewsletterRecipientsModel::findByEmailAndPids($strEmail, $arrRemove)) !== null) - { - while ($objRemove->next()) - { - $strHash = md5($objRemove->email); - - // Add a blacklist entry (see #4999) - if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid($strHash, $objRemove->pid)) === null) - { - $objBlacklist = new \NewsletterBlacklistModel(); - $objBlacklist->pid = $objRemove->pid; - $objBlacklist->hash = $strHash; - $objBlacklist->save(); - } - - $objRemove->delete(); - } - } - - // Get the channels - $objChannels = \NewsletterChannelModel::findByIds($arrRemove); - $arrChannels = $objChannels->fetchEach('title'); - - // HOOK: post unsubscribe callback - if (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && \is_array($GLOBALS['TL_HOOKS']['removeRecipient'])) - { - foreach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback) - { - $this->import($callback[0]); - $this->{$callback[0]}->{$callback[1]}($strEmail, $arrRemove); - } - } - - // Prepare the simple token data - $arrData = array(); - $arrData['domain'] = \Idna::decode(\Environment::get('host')); - $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); - - // Confirmation e-mail - $objEmail = new \Email(); - $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; - $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; - $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); - $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_unsubscribe, $arrData); - $objEmail->sendTo($strEmail); - - // Redirect to the jumpTo page - if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) - { - /** @var PageModel $objTarget */ - $this->redirect($objTarget->getFrontendUrl()); - } - - \System::getContainer()->get('session')->getFlashBag()->set('nl_removed', $GLOBALS['TL_LANG']['MSC']['nl_removed']); - - $this->reload(); - } + /** + * Generate the module + */ + protected function compile() + { + $this->setCustomTemplate(); + + $this->Template->email = ''; + $this->Template->captcha = ''; + + $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); + + $strFormId = 'tl_unsubscribe_' . $this->id; + + $this->processForm($strFormId, $objCaptchaWidget, 'removeRecipient'); + + // Add the captcha widget to the template + if ($objCaptchaWidget !== null) + { + $this->Template->captcha = $objCaptchaWidget->parse(); + } + + $session = \System::getContainer()->get('session'); + $flashBag = $session->getFlashBag(); + + // Confirmation message + if ($session->isStarted() && $flashBag->has('nl_removed')) + { + $arrMessages = $flashBag->get('nl_removed'); + + $this->Template->mclass = 'confirm'; + $this->Template->message = $arrMessages[0]; + } + + // Default template variables + $this->Template->channels = $this->compileChannels(); + $this->Template->showChannels = !$this->nl_hideChannels; + $this->Template->email = \Input::get('email'); + $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['unsubscribe']); + $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; + $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; + $this->Template->action = \Environment::get('indexFreeRequest'); + $this->Template->formId = $strFormId; + $this->Template->id = $this->id; + } + + /** + * Remove the recipient + * + * @param string $strEmail + * @param array $arrRemove + */ + protected function removeRecipient($strEmail, $arrRemove) + { + // Remove the subscriptions + if (($objRemove = \NewsletterRecipientsModel::findByEmailAndPids($strEmail, $arrRemove)) !== null) + { + while ($objRemove->next()) + { + $strHash = md5($objRemove->email); + + // Add a blacklist entry (see #4999) + if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid($strHash, $objRemove->pid)) === null) + { + $objBlacklist = new \NewsletterBlacklistModel(); + $objBlacklist->pid = $objRemove->pid; + $objBlacklist->hash = $strHash; + $objBlacklist->save(); + } + + $objRemove->delete(); + } + } + + // Get the channels + $objChannels = \NewsletterChannelModel::findByIds($arrRemove); + $arrChannels = $objChannels->fetchEach('title'); + + // HOOK: post unsubscribe callback + if (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && \is_array($GLOBALS['TL_HOOKS']['removeRecipient'])) + { + foreach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback) + { + $this->import($callback[0]); + $this->{$callback[0]}->{$callback[1]}($strEmail, $arrRemove); + } + } + + // Prepare the simple token data + $arrData = array(); + $arrData['domain'] = \Idna::decode(\Environment::get('host')); + $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); + + // Confirmation e-mail + $objEmail = new \Email(); + $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; + $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; + $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); + $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_unsubscribe, $arrData); + $objEmail->sendTo($strEmail); + + // Redirect to the jumpTo page + if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) + { + /** @var PageModel $objTarget */ + $this->redirect($objTarget->getFrontendUrl()); + } + + \System::getContainer()->get('session')->getFlashBag()->set('nl_removed', $GLOBALS['TL_LANG']['MSC']['nl_removed']); + + $this->reload(); + } } From e153465c1ff40f2aa4726fe7f23edd6d907f277e Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:46:12 +0200 Subject: [PATCH 27/51] Extract compiling of confirmation message. --- ...ewsletterUnsubscribeNotificationCenter.php | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index c356ac91..94924e90 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -31,34 +31,14 @@ protected function compile() { $this->setCustomTemplate(); - $this->Template->email = ''; - $this->Template->captcha = ''; - $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); - $strFormId = 'tl_unsubscribe_' . $this->id; $this->processForm($strFormId, $objCaptchaWidget, 'removeRecipient'); - - // Add the captcha widget to the template - if ($objCaptchaWidget !== null) - { - $this->Template->captcha = $objCaptchaWidget->parse(); - } - - $session = \System::getContainer()->get('session'); - $flashBag = $session->getFlashBag(); - - // Confirmation message - if ($session->isStarted() && $flashBag->has('nl_removed')) - { - $arrMessages = $flashBag->get('nl_removed'); - - $this->Template->mclass = 'confirm'; - $this->Template->message = $arrMessages[0]; - } + $this->compileConfirmationMessage(); // Default template variables + $this->Template->captach = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; $this->Template->email = \Input::get('email'); @@ -136,4 +116,19 @@ protected function removeRecipient($strEmail, $arrRemove) $this->reload(); } + + protected function compileConfirmationMessage() + { + $session = \System::getContainer()->get('session'); + $flashBag = $session->getFlashBag(); + + // Confirmation message + if ($session->isStarted() && $flashBag->has('nl_removed')) + { + $arrMessages = $flashBag->get('nl_removed'); + + $this->Template->mclass = 'confirm'; + $this->Template->message = $arrMessages[0]; + } + } } From e156b85b3d0d7087941f817b3526bb5917f35a5a Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:51:48 +0200 Subject: [PATCH 28/51] Register classes and modules. --- config/autoload.php | 6 +++++- config/config.php | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/autoload.php b/config/autoload.php index 0a021719..34763ddd 100644 --- a/config/autoload.php +++ b/config/autoload.php @@ -40,5 +40,9 @@ */ ClassLoader::addClasses(array ( - 'Contao\ModulePasswordNotificationCenter' => 'system/modules/notification_center/modules/ModulePasswordNotificationCenter.php', + 'Contao\ModulePasswordNotificationCenter' => 'system/modules/notification_center/modules/ModulePasswordNotificationCenter.php', + 'Contao\NewsletterModuleTrait' => 'system/modules/notification_center/modules/NewsletterModuleTrait.php', + 'Contao\ModuleNewsletterSubscribeNotificationCenter' => 'system/modules/notification_center/modules/ModuleNewsletterSubscribeNotificationCenter.php', + 'Contao\ModuleNewsletterActivateNotificationCenter' => 'system/modules/notification_center/modules/ModuleNewsletterActivateNotificationCenter.php', + 'Contao\ModuleNewsletterUnSubscribeNotificationCenter' => 'system/modules/notification_center/modules/ModuleNewsletterUnSubscribeNotificationCenter.php', )); diff --git a/config/config.php b/config/config.php index f1360d90..3aeaf3e5 100644 --- a/config/config.php +++ b/config/config.php @@ -48,6 +48,12 @@ */ $GLOBALS['FE_MOD']['user']['lostPasswordNotificationCenter'] = 'ModulePasswordNotificationCenter'; +if (isset($GLOBALS['FE_MOD']['newsletter'])) { + $GLOBALS['FE_MOD']['newsletter']['newsletterSubscribeNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; + $GLOBALS['FE_MOD']['newsletter']['newsletterActivateNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; + $GLOBALS['FE_MOD']['newsletter']['newsletterUnsubscribeNotificationCenter'] = 'ModuleNewsletterUnSubscribeNotificationCenter'; +} + /** * Models */ From 0b3a1f49ff698a9f3ea972bb5d0ca6e6fbba5587 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 10:56:57 +0200 Subject: [PATCH 29/51] Add compatibility layer for Contao < 4.1. --- ...ewsletterUnsubscribeNotificationCenter.php | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 94924e90..3769b5ca 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -112,23 +112,51 @@ protected function removeRecipient($strEmail, $arrRemove) $this->redirect($objTarget->getFrontendUrl()); } - \System::getContainer()->get('session')->getFlashBag()->set('nl_removed', $GLOBALS['TL_LANG']['MSC']['nl_removed']); + if (version_compare(VERSION, '4.1', '>=')) + { + \System::getContainer()->get('session')->getFlashBag()->set('nl_removed', $GLOBALS['TL_LANG']['MSC']['nl_removed']); + } + else + { + $_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed']; + } $this->reload(); } protected function compileConfirmationMessage() { - $session = \System::getContainer()->get('session'); - $flashBag = $session->getFlashBag(); + if (version_compare(VERSION, '4.1', '>=')) + { + $session = \System::getContainer()->get('session'); + $flashBag = $session->getFlashBag(); - // Confirmation message - if ($session->isStarted() && $flashBag->has('nl_removed')) + // Confirmation message + if ($session->isStarted() && $flashBag->has('nl_removed')) + { + $arrMessages = $flashBag->get('nl_removed'); + + $this->Template->mclass = 'confirm'; + $this->Template->message = $arrMessages[0]; + } + + return; + } + + // Error message + if (strlen($_SESSION['UNSUBSCRIBE_ERROR'])) { - $arrMessages = $flashBag->get('nl_removed'); + $this->Template->mclass = 'error'; + $this->Template->message = $_SESSION['UNSUBSCRIBE_ERROR']; + $_SESSION['UNSUBSCRIBE_ERROR'] = ''; + } + // Confirmation message + if (strlen($_SESSION['UNSUBSCRIBE_CONFIRM'])) + { $this->Template->mclass = 'confirm'; - $this->Template->message = $arrMessages[0]; + $this->Template->message = $_SESSION['UNSUBSCRIBE_CONFIRM']; + $_SESSION['UNSUBSCRIBE_CONFIRM'] = ''; } } } From 42e37f1762d862eb43eed70f44636e8040db299c Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 11:04:25 +0200 Subject: [PATCH 30/51] Send notification instead of email. --- ...ewsletterUnsubscribeNotificationCenter.php | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 3769b5ca..2432c19f 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -10,6 +10,8 @@ namespace Contao; +use NotificationCenter\Model\Notification; + /** * Front end module "newsletter unsubscribe". * @@ -17,6 +19,7 @@ * @property string $nl_unsubscribe * @property array $nl_channels * @property string $nl_template + * @property int $nc_notification * * @author Leo Feyer */ @@ -78,10 +81,6 @@ protected function removeRecipient($strEmail, $arrRemove) } } - // Get the channels - $objChannels = \NewsletterChannelModel::findByIds($arrRemove); - $arrChannels = $objChannels->fetchEach('title'); - // HOOK: post unsubscribe callback if (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && \is_array($GLOBALS['TL_HOOKS']['removeRecipient'])) { @@ -92,18 +91,7 @@ protected function removeRecipient($strEmail, $arrRemove) } } - // Prepare the simple token data - $arrData = array(); - $arrData['domain'] = \Idna::decode(\Environment::get('host')); - $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); - - // Confirmation e-mail - $objEmail = new \Email(); - $objEmail->from = $GLOBALS['TL_ADMIN_EMAIL']; - $objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; - $objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); - $objEmail->text = \StringUtil::parseSimpleTokens($this->nl_unsubscribe, $arrData); - $objEmail->sendTo($strEmail); + $this->sendNotification($strEmail, $arrRemove); // Redirect to the jumpTo page if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) @@ -159,4 +147,28 @@ protected function compileConfirmationMessage() $_SESSION['UNSUBSCRIBE_CONFIRM'] = ''; } } + + protected function sendNotification($strEmail, array $arrRemove) + { + $objNotification = Notification::findByPk($this->nc_notification); + if (!$objNotification) { + return; + } + + // Get the channels + $objChannels = \NewsletterChannelModel::findByIds($arrRemove); + $arrChannels = $objChannels ? $objChannels->fetchEach('title') : []; + + // Prepare the simple token data + $arrData = array(); + $arrData['email'] = $strEmail; + $arrData['domain'] = \Idna::decode(\Environment::get('host')); + $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); + $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; + $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; + $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); + $arrData['text'] = $this->nl_unsubscribe; + + $objNotification->send($arrData); + } } From c6d2ce3c4ce98499e9c8322f0c1d915a086b7c81 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 11:15:11 +0200 Subject: [PATCH 31/51] Implement activation module. --- ...leNewsletterActivateNotificationCenter.php | 68 +++++++++++++++++-- ...eNewsletterSubscribeNotificationCenter.php | 8 +-- ...ewsletterUnsubscribeNotificationCenter.php | 8 +-- modules/NewsletterModuleTrait.php | 10 +++ 4 files changed, 74 insertions(+), 20 deletions(-) diff --git a/modules/ModuleNewsletterActivateNotificationCenter.php b/modules/ModuleNewsletterActivateNotificationCenter.php index 0ba874b2..c41d3ff1 100644 --- a/modules/ModuleNewsletterActivateNotificationCenter.php +++ b/modules/ModuleNewsletterActivateNotificationCenter.php @@ -10,9 +10,43 @@ namespace Contao; -final class ModuleNewsletterActivateNotificationCenter extends Module +use NotificationCenter\Model\Notification; + +class ModuleNewsletterActivateNotificationCenter extends Module { - protected $strTemplate = 'nl_default'; + use NewsletterModuleTrait; + + protected $strTemplate = 'mod_newsletter'; + + /** + * Display a wildcard in the back end + * + * @return string + */ + public function generate() + { + if (TL_MODE == 'BE') + { + $objTemplate = new \BackendTemplate('be_wildcard'); + $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['newsletterActivateNotificationCenter'][0]) . ' ###'; + $objTemplate->title = $this->headline; + $objTemplate->id = $this->id; + $objTemplate->link = $this->name; + $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; + + return $objTemplate->parse(); + } + + $this->nl_channels = \StringUtil::deserialize($this->nl_channels); + + // Return if there are no channels + if (empty($this->nl_channels) || !\is_array($this->nl_channels)) + { + return ''; + } + + return parent::generate(); + } protected function compile() { @@ -20,8 +54,6 @@ protected function compile() if (\Input::get('token')) { $this->activateRecipient(); - - return; } } @@ -30,8 +62,6 @@ protected function compile() */ protected function activateRecipient() { - $this->Template = new \FrontendTemplate('mod_newsletter'); - // Check the token $objRecipient = \NewsletterRecipientsModel::findByToken(\Input::get('token')); @@ -73,8 +103,34 @@ protected function activateRecipient() } } + $this->sendNotification($objRecipient->id, $arrCids); + $this->redirectToJumpToPage(); + // Confirm activation $this->Template->mclass = 'confirm'; $this->Template->message = $GLOBALS['TL_LANG']['MSC']['nl_activate']; } + + protected function sendNotification($strEmail, array $arrCids) + { + $objNotification = Notification::findByPk($this->nc_notification); + if (!$objNotification) { + return; + } + + $objChannel = \NewsletterChannelModel::findByIds($arrCids); + $arrChannels = $objChannel ? $objChannel->fetchEach('title') : []; + + // Prepare the simple token data + $arrData = array(); + $arrData['email'] = $strEmail; + $arrData['domain'] = \Idna::decode(\Environment::get('host')); + $arrData['channel'] = $arrData['channels'] = $arrChannels; + $arrData['channelIds'] = $arrCids; + $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; + $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; + $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); + + $objNotification->send($arrData); + } } diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 7dadff48..7614cd6d 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -97,13 +97,7 @@ protected function addRecipient($strEmail, $arrNew) } $this->sendNotification($strToken, $strEmail, $arrNew); - - // Redirect to the jumpTo page - if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) - { - /** @var PageModel $objTarget */ - $this->redirect($objTarget->getFrontendUrl()); - } + $this->redirectToJumpToPage(); if (version_compare(VERSION, '4.1', '>=')) { diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 2432c19f..ca3c4b46 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -92,13 +92,7 @@ protected function removeRecipient($strEmail, $arrRemove) } $this->sendNotification($strEmail, $arrRemove); - - // Redirect to the jumpTo page - if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) - { - /** @var PageModel $objTarget */ - $this->redirect($objTarget->getFrontendUrl()); - } + $this->redirectToJumpToPage(); if (version_compare(VERSION, '4.1', '>=')) { diff --git a/modules/NewsletterModuleTrait.php b/modules/NewsletterModuleTrait.php index 33639c18..2e436ac5 100644 --- a/modules/NewsletterModuleTrait.php +++ b/modules/NewsletterModuleTrait.php @@ -75,4 +75,14 @@ protected function compileChannels() return $arrChannels; } + + protected function redirectToJumpToPage() + { + // Redirect to the jumpTo page + if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) instanceof PageModel) + { + /** @var PageModel $objTarget */ + $this->redirect($objTarget->getFrontendUrl()); + } + } } From d8ee4152844d41a05b19b601138070a302481a13 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 11:27:01 +0200 Subject: [PATCH 32/51] Configure notification types and unify available tokens. --- config/config.php | 41 ++++++++++++++++++- ...leNewsletterActivateNotificationCenter.php | 4 +- ...eNewsletterSubscribeNotificationCenter.php | 5 ++- ...ewsletterUnsubscribeNotificationCenter.php | 5 ++- 4 files changed, 48 insertions(+), 7 deletions(-) diff --git a/config/config.php b/config/config.php index 3aeaf3e5..c59316e1 100644 --- a/config/config.php +++ b/config/config.php @@ -170,7 +170,46 @@ 'email_recipient_cc' => array('recipient_email'), 'email_recipient_bcc' => array('recipient_email'), 'email_replyTo' => array('recipient_email'), - ) + ), + 'newsletter_subscribe' => array( + 'recipients' => array('recipient_email', 'admin_email'), + 'email_subject' => array('domain', 'link', 'recipient_email', 'admin_email', 'channels', 'channel_ids', 'subject'), + 'email_text' => array('domain', 'link', 'recipient_email', 'admin_email', 'channels', 'channel_ids', 'token'), + 'email_html' => array('domain', 'link', 'recipient_email', 'admin_email', 'channels', 'channel_ids', 'token'), + 'file_name' => array('domain', 'link', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'file_content' => array('domain', 'link', 'recipient_email', 'admin_email', 'channels', 'channel_ids', 'token'), + 'email_sender_name' => array('recipient_email', 'admin_email', 'admin_name'), + 'email_sender_address' => array('recipient_email', 'admin_email'), + 'email_recipient_cc' => array('recipient_email', 'admin_email'), + 'email_recipient_bcc' => array('recipient_email', 'admin_email'), + 'email_replyTo' => array('recipient_email', 'admin_email'), + ), + 'newsletter_activate' => array( + 'recipients' => array('recipient_email', 'admin_email'), + 'email_subject' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids', 'subject'), + 'email_text' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'email_html' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'file_name' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'file_content' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'email_sender_name' => array('recipient_email', 'admin_email', 'admin_name'), + 'email_sender_address' => array('recipient_email', 'admin_email'), + 'email_recipient_cc' => array('recipient_email', 'admin_email'), + 'email_recipient_bcc' => array('recipient_email', 'admin_email'), + 'email_replyTo' => array('recipient_email', 'admin_email'), + ), + 'newsletter_unsubscribe' => array( + 'recipients' => array('recipient_email', 'admin_email'), + 'email_subject' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids', 'subject'), + 'email_text' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'email_html' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'file_name' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'file_content' => array('domain', 'recipient_email', 'admin_email', 'channels', 'channel_ids'), + 'email_sender_name' => array('recipient_email', 'admin_email', 'admin_name'), + 'email_sender_address' => array('recipient_email', 'admin_email'), + 'email_recipient_cc' => array('recipient_email', 'admin_email'), + 'email_recipient_bcc' => array('recipient_email', 'admin_email'), + 'email_replyTo' => array('recipient_email', 'admin_email'), + ), ) ) ); diff --git a/modules/ModuleNewsletterActivateNotificationCenter.php b/modules/ModuleNewsletterActivateNotificationCenter.php index c41d3ff1..a787ab39 100644 --- a/modules/ModuleNewsletterActivateNotificationCenter.php +++ b/modules/ModuleNewsletterActivateNotificationCenter.php @@ -123,10 +123,10 @@ protected function sendNotification($strEmail, array $arrCids) // Prepare the simple token data $arrData = array(); - $arrData['email'] = $strEmail; + $arrData['recipient_email'] = $strEmail; $arrData['domain'] = \Idna::decode(\Environment::get('host')); $arrData['channel'] = $arrData['channels'] = $arrChannels; - $arrData['channelIds'] = $arrCids; + $arrData['channel_ids'] = $arrCids; $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 7614cd6d..7a5b95bd 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -160,11 +160,12 @@ protected function sendNotification($strToken, $strEmail, array $arrNew) // Prepare the simple token data $arrData = array(); - $arrData['email'] = $strEmail; + $arrData['recipient_email'] = $strEmail; $arrData['token'] = $strToken; $arrData['domain'] = \Idna::decode(\Environment::get('host')); $arrData['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $strToken; - $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); + $arrData['channel'] = $arrData['channels'] = $arrChannels; + $arrData['channel_ids'] = $arrNew; $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index ca3c4b46..96ce90eb 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -155,9 +155,10 @@ protected function sendNotification($strEmail, array $arrRemove) // Prepare the simple token data $arrData = array(); - $arrData['email'] = $strEmail; + $arrData['recipient_email'] = $strEmail; $arrData['domain'] = \Idna::decode(\Environment::get('host')); - $arrData['channel'] = $arrData['channels'] = implode("\n", $arrChannels); + $arrData['channel'] = $arrData['channels'] = $arrChannels; + $arrData['channel_ids'] = $arrRemove; $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); From b9dc845dd56088dc9a8faaf8a97f900a01dad5cc Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 11:32:46 +0200 Subject: [PATCH 33/51] Add palettes and fix class name. --- config/autoload.php | 2 +- config/config.php | 2 +- dca/tl_module.php | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/autoload.php b/config/autoload.php index 34763ddd..56d6ec46 100644 --- a/config/autoload.php +++ b/config/autoload.php @@ -44,5 +44,5 @@ 'Contao\NewsletterModuleTrait' => 'system/modules/notification_center/modules/NewsletterModuleTrait.php', 'Contao\ModuleNewsletterSubscribeNotificationCenter' => 'system/modules/notification_center/modules/ModuleNewsletterSubscribeNotificationCenter.php', 'Contao\ModuleNewsletterActivateNotificationCenter' => 'system/modules/notification_center/modules/ModuleNewsletterActivateNotificationCenter.php', - 'Contao\ModuleNewsletterUnSubscribeNotificationCenter' => 'system/modules/notification_center/modules/ModuleNewsletterUnSubscribeNotificationCenter.php', + 'Contao\ModuleNewsletterUnsubscribeNotificationCenter' => 'system/modules/notification_center/modules/ModuleNewsletterUnsubscribeNotificationCenter.php', )); diff --git a/config/config.php b/config/config.php index c59316e1..6899e946 100644 --- a/config/config.php +++ b/config/config.php @@ -51,7 +51,7 @@ if (isset($GLOBALS['FE_MOD']['newsletter'])) { $GLOBALS['FE_MOD']['newsletter']['newsletterSubscribeNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; $GLOBALS['FE_MOD']['newsletter']['newsletterActivateNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; - $GLOBALS['FE_MOD']['newsletter']['newsletterUnsubscribeNotificationCenter'] = 'ModuleNewsletterUnSubscribeNotificationCenter'; + $GLOBALS['FE_MOD']['newsletter']['newsletterUnsubscribeNotificationCenter'] = 'ModuleNewsletterUnsubscribeNotificationCenter'; } /** diff --git a/dca/tl_module.php b/dca/tl_module.php index a06ff8bb..f1ef5d82 100644 --- a/dca/tl_module.php +++ b/dca/tl_module.php @@ -14,6 +14,9 @@ */ $GLOBALS['TL_DCA']['tl_module']['palettes']['registration'] = str_replace('reg_activate;', 'reg_activate,nc_notification,nc_activation_notification;', $GLOBALS['TL_DCA']['tl_module']['palettes']['registration']); $GLOBALS['TL_DCA']['tl_module']['palettes']['lostPasswordNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['lostPassword']); +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterSubscribeNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['subscribe']); +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterActivateNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['subscribe']); +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterUnsubscribeNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['unsubscribe']); if (strpos($GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'], 'newsletters')) { $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'] = str_replace('newsletters;', 'newsletters,nc_notification;', $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData']); @@ -44,4 +47,4 @@ */ $GLOBALS['TL_DCA']['tl_module']['fields']['nc_notification']['eval']['ncNotificationChoices']['registration'] = array('member_registration'); $GLOBALS['TL_DCA']['tl_module']['fields']['nc_notification']['eval']['ncNotificationChoices']['lostPasswordNotificationCenter'] = array('member_password'); -$GLOBALS['TL_DCA']['tl_module']['fields']['nc_activation_notification']['eval']['ncNotificationChoices']['registration'] = array('member_activation'); \ No newline at end of file +$GLOBALS['TL_DCA']['tl_module']['fields']['nc_activation_notification']['eval']['ncNotificationChoices']['registration'] = array('member_activation'); From 351635d8b54a529c3965fa8e49e2b531e87381fd Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 11:50:24 +0200 Subject: [PATCH 34/51] Fix palette configuration, activation handling and palette configuration. --- config/config.php | 2 +- dca/tl_module.php | 31 +++++++++++++++++-- ...leNewsletterActivateNotificationCenter.php | 13 ++++---- ...eNewsletterSubscribeNotificationCenter.php | 2 +- ...ewsletterUnsubscribeNotificationCenter.php | 2 +- 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/config/config.php b/config/config.php index 6899e946..9e15cea7 100644 --- a/config/config.php +++ b/config/config.php @@ -50,7 +50,7 @@ if (isset($GLOBALS['FE_MOD']['newsletter'])) { $GLOBALS['FE_MOD']['newsletter']['newsletterSubscribeNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; - $GLOBALS['FE_MOD']['newsletter']['newsletterActivateNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; + $GLOBALS['FE_MOD']['newsletter']['newsletterActivateNotificationCenter'] = 'ModuleNewsletterActivateNotificationCenter'; $GLOBALS['FE_MOD']['newsletter']['newsletterUnsubscribeNotificationCenter'] = 'ModuleNewsletterUnsubscribeNotificationCenter'; } diff --git a/dca/tl_module.php b/dca/tl_module.php index f1ef5d82..a6e12954 100644 --- a/dca/tl_module.php +++ b/dca/tl_module.php @@ -14,9 +14,31 @@ */ $GLOBALS['TL_DCA']['tl_module']['palettes']['registration'] = str_replace('reg_activate;', 'reg_activate,nc_notification,nc_activation_notification;', $GLOBALS['TL_DCA']['tl_module']['palettes']['registration']); $GLOBALS['TL_DCA']['tl_module']['palettes']['lostPasswordNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['lostPassword']); -$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterSubscribeNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['subscribe']); -$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterActivateNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['subscribe']); -$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterUnsubscribeNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['unsubscribe']); + +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterSubscribeNotificationCenter'] = '{title_legend},name,headline,type' + . ';{config_legend},nl_channels,nl_hideChannels,disableCaptcha' + . ';{text_legend},nl_text' + . ';{notification_legend},nc_notification' + . ';{redirect_legend},jumpTo' + . ';{template_legend:hide},nl_template' + . ';{protected_legend:hide},protected' + . ';{expert_legend:hide},guests,cssID'; + +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterActivateNotificationCenter'] = '{title_legend},name,headline,type' + . ';{config_legend},nl_channels,nl_hideChannels' + . ';{notification_legend},nc_notification' + . ';{redirect_legend},jumpTo' + . ';{template_legend:hide},customTpl' + . ';{protected_legend:hide},protected' + . ';{expert_legend:hide},guests,cssID'; + +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterUnsubscribeNotificationCenter'] = '{title_legend},name,headline,type' + . ';{config_legend},nl_channels,nl_hideChannels,disableCaptcha' + . ';{notification_legend},nc_notification' + . ';{redirect_legend},jumpTo' + . ';{template_legend:hide},nl_template' + . ';{protected_legend:hide},protected' + . ';{expert_legend:hide},guests,cssID'; if (strpos($GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'], 'newsletters')) { $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'] = str_replace('newsletters;', 'newsletters,nc_notification;', $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData']); @@ -47,4 +69,7 @@ */ $GLOBALS['TL_DCA']['tl_module']['fields']['nc_notification']['eval']['ncNotificationChoices']['registration'] = array('member_registration'); $GLOBALS['TL_DCA']['tl_module']['fields']['nc_notification']['eval']['ncNotificationChoices']['lostPasswordNotificationCenter'] = array('member_password'); +$GLOBALS['TL_DCA']['tl_module']['fields']['nc_notification']['eval']['ncNotificationChoices']['newsletterSubscribeNotificationCenter'] = array('newsletter_subscribe'); +$GLOBALS['TL_DCA']['tl_module']['fields']['nc_notification']['eval']['ncNotificationChoices']['newsletterActivateNotificationCenter'] = array('newsletter_activate'); +$GLOBALS['TL_DCA']['tl_module']['fields']['nc_notification']['eval']['ncNotificationChoices']['newsletterUnsubscribeNotificationCenter'] = array('newsletter_unsubscribe'); $GLOBALS['TL_DCA']['tl_module']['fields']['nc_activation_notification']['eval']['ncNotificationChoices']['registration'] = array('member_activation'); diff --git a/modules/ModuleNewsletterActivateNotificationCenter.php b/modules/ModuleNewsletterActivateNotificationCenter.php index a787ab39..b23f3d08 100644 --- a/modules/ModuleNewsletterActivateNotificationCenter.php +++ b/modules/ModuleNewsletterActivateNotificationCenter.php @@ -37,7 +37,7 @@ public function generate() return $objTemplate->parse(); } - $this->nl_channels = \StringUtil::deserialize($this->nl_channels); + $this->nl_channels = deserialize($this->nl_channels); // Return if there are no channels if (empty($this->nl_channels) || !\is_array($this->nl_channels)) @@ -45,16 +45,17 @@ public function generate() return ''; } + if (!\Input::get('token')) { + return ''; + } + + $this->activateRecipient(); + return parent::generate(); } protected function compile() { - // Activate e-mail address - if (\Input::get('token')) - { - $this->activateRecipient(); - } } /** diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 7a5b95bd..bfee3b21 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -46,7 +46,7 @@ protected function compile() $this->Template->captcha = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; - $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['subscribe']); + $this->Template->submit = specialchars($GLOBALS['TL_LANG']['MSC']['subscribe']); $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; $this->Template->action = \Environment::get('indexFreeRequest'); diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 96ce90eb..a5d9e18b 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -45,7 +45,7 @@ protected function compile() $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; $this->Template->email = \Input::get('email'); - $this->Template->submit = \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['unsubscribe']); + $this->Template->submit = specialchars($GLOBALS['TL_LANG']['MSC']['unsubscribe']); $this->Template->channelsLabel = $GLOBALS['TL_LANG']['MSC']['nl_channels']; $this->Template->emailLabel = $GLOBALS['TL_LANG']['MSC']['emailAddress']; $this->Template->action = \Environment::get('indexFreeRequest'); From 3bea954244f4c7a83bf8f069fc863a049e8eb67d Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 11:52:30 +0200 Subject: [PATCH 35/51] Readd validateForm for Contao 3.5 compatibility. --- ...eNewsletterSubscribeNotificationCenter.php | 77 +++++++++++++++++++ ...ewsletterUnsubscribeNotificationCenter.php | 77 +++++++++++++++++++ 2 files changed, 154 insertions(+) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index bfee3b21..0c1410bd 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -55,6 +55,83 @@ protected function compile() $this->Template->text = $this->nl_text; } + /** + * Validate the subscription form + * + * @param Widget $objWidget + * + * @return array|bool + */ + protected function validateForm(Widget $objWidget=null) + { + // Validate the e-mail address + $varInput = \Idna::encodeEmail(\Input::post('email', true)); + + if (!\Validator::isEmail($varInput)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; + + return false; + } + + $this->Template->email = $varInput; + + // Validate the channel selection + $arrChannels = \Input::post('channels'); + + if (!\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 + + if (empty($arrChannels) || !\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $this->Template->selectedChannels = $arrChannels; + + // Check if there are any new subscriptions + $arrSubscriptions = array(); + + if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) + { + $arrSubscriptions = $objSubscription->fetchEach('pid'); + } + + $arrNew = array_diff($arrChannels, $arrSubscriptions); + + if (empty($arrNew) || !\is_array($arrNew)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['subscribed']; + + return false; + } + + // Validate the captcha + if ($objWidget !== null) + { + $objWidget->validate(); + + if ($objWidget->hasErrors()) + { + return false; + } + } + + return array($varInput, $arrNew); + } + /** * Add a new recipient * diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index a5d9e18b..25eec9da 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -53,6 +53,83 @@ protected function compile() $this->Template->id = $this->id; } + /** + * Validate the subscription form + * + * @param Widget $objWidget + * + * @return array|bool + */ + protected function validateForm(Widget $objWidget=null) + { + // Validate the e-mail address + $varInput = \Idna::encodeEmail(\Input::post('email', true)); + + if (!\Validator::isEmail($varInput)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; + + return false; + } + + $this->Template->email = $varInput; + + // Validate the channel selection + $arrChannels = \Input::post('channels'); + + if (!\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 + + if (empty($arrChannels) || !\is_array($arrChannels)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; + + return false; + } + + $this->Template->selectedChannels = $arrChannels; + + // Check if there are any new subscriptions + $arrSubscriptions = array(); + + if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) + { + $arrSubscriptions = $objSubscription->fetchEach('pid'); + } + + $arrRemove = array_intersect($arrChannels, $arrSubscriptions); + + if (empty($arrRemove) || !\is_array($arrRemove)) + { + $this->Template->mclass = 'error'; + $this->Template->message = $GLOBALS['TL_LANG']['ERR']['unsubscribed']; + + return false; + } + + // Validate the captcha + if ($objWidget !== null) + { + $objWidget->validate(); + + if ($objWidget->hasErrors()) + { + return false; + } + } + + return array($varInput, $arrRemove); + } + /** * Remove the recipient * From 911bb52a085644977eb1e19f49d0fd1f0ef1c0c1 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 11:53:46 +0200 Subject: [PATCH 36/51] Disable blacklist handling for Contao < 4.1. --- modules/ModuleNewsletterSubscribeNotificationCenter.php | 2 +- modules/ModuleNewsletterUnsubscribeNotificationCenter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 0c1410bd..312912f2 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -167,7 +167,7 @@ protected function addRecipient($strEmail, $arrNew) $objRecipient->save(); // Remove the blacklist entry (see #4999) - if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid(md5($strEmail), $id)) !== null) + if (version_compare(VERSION, '4.1', '>=') && ($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid(md5($strEmail), $id)) !== null) { $objBlacklist->delete(); } diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 25eec9da..c5ad1bd2 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -146,7 +146,7 @@ protected function removeRecipient($strEmail, $arrRemove) $strHash = md5($objRemove->email); // Add a blacklist entry (see #4999) - if (($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid($strHash, $objRemove->pid)) === null) + if (version_compare(VERSION, '4.1', '>=') && $objBlacklist = (\NewsletterBlacklistModel::findByHashAndPid($strHash, $objRemove->pid)) === null) { $objBlacklist = new \NewsletterBlacklistModel(); $objBlacklist->pid = $objRemove->pid; From 6d4ea9ba3daa289349110222ccc0734d6657a1ce Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 12:00:04 +0200 Subject: [PATCH 37/51] Fix channel serialization. --- modules/ModuleNewsletterActivateNotificationCenter.php | 4 ++-- modules/ModuleNewsletterSubscribeNotificationCenter.php | 4 ++-- modules/ModuleNewsletterUnsubscribeNotificationCenter.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ModuleNewsletterActivateNotificationCenter.php b/modules/ModuleNewsletterActivateNotificationCenter.php index b23f3d08..f883fffa 100644 --- a/modules/ModuleNewsletterActivateNotificationCenter.php +++ b/modules/ModuleNewsletterActivateNotificationCenter.php @@ -126,8 +126,8 @@ protected function sendNotification($strEmail, array $arrCids) $arrData = array(); $arrData['recipient_email'] = $strEmail; $arrData['domain'] = \Idna::decode(\Environment::get('host')); - $arrData['channel'] = $arrData['channels'] = $arrChannels; - $arrData['channel_ids'] = $arrCids; + $arrData['channels'] = implode(', ', $arrChannels); + $arrData['channel_ids'] = implode(', ', $arrCids); $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 312912f2..89fe828e 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -241,8 +241,8 @@ protected function sendNotification($strToken, $strEmail, array $arrNew) $arrData['token'] = $strToken; $arrData['domain'] = \Idna::decode(\Environment::get('host')); $arrData['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $strToken; - $arrData['channel'] = $arrData['channels'] = $arrChannels; - $arrData['channel_ids'] = $arrNew; + $arrData['channels'] = implode(', ', $arrChannels); + $arrData['channel_ids'] = implode(', ', $arrNew); $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index c5ad1bd2..d3b80fff 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -234,8 +234,8 @@ protected function sendNotification($strEmail, array $arrRemove) $arrData = array(); $arrData['recipient_email'] = $strEmail; $arrData['domain'] = \Idna::decode(\Environment::get('host')); - $arrData['channel'] = $arrData['channels'] = $arrChannels; - $arrData['channel_ids'] = $arrRemove; + $arrData['channels'] = implode(', ', $arrChannels); + $arrData['channel_ids'] = implode(', ', $arrRemove); $arrData['admin_email'] = $GLOBALS['TL_ADMIN_EMAIL']; $arrData['admin_name'] = $GLOBALS['TL_ADMIN_NAME']; $arrData['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], \Idna::decode(\Environment::get('host'))); From d67df27e5183613ef048a72846247814d409d76f Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 12:04:59 +0200 Subject: [PATCH 38/51] Fix newsletter activation. --- modules/ModuleNewsletterActivateNotificationCenter.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/ModuleNewsletterActivateNotificationCenter.php b/modules/ModuleNewsletterActivateNotificationCenter.php index f883fffa..fcaa432e 100644 --- a/modules/ModuleNewsletterActivateNotificationCenter.php +++ b/modules/ModuleNewsletterActivateNotificationCenter.php @@ -49,13 +49,12 @@ public function generate() return ''; } - $this->activateRecipient(); - return parent::generate(); } protected function compile() { + $this->activateRecipient(); } /** @@ -104,7 +103,7 @@ protected function activateRecipient() } } - $this->sendNotification($objRecipient->id, $arrCids); + $this->sendNotification($objRecipient->email, $arrCids); $this->redirectToJumpToPage(); // Confirm activation From 85a93a4016caf22d39a0aecf58aacba2566e71ab Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 5 Oct 2018 12:11:53 +0200 Subject: [PATCH 39/51] Add translations. --- languages/en/tl_module.php | 3 ++- languages/en/tl_nc_notification.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/languages/en/tl_module.php b/languages/en/tl_module.php index cbd77988..59b957bb 100644 --- a/languages/en/tl_module.php +++ b/languages/en/tl_module.php @@ -11,5 +11,6 @@ /** * Fields */ +$GLOBALS['TL_LANG']['tl_module']['notification_legend'] = 'Notification'; $GLOBALS['TL_LANG']['tl_module']['nc_notification'] = array('Notification', 'Please select a notification.'); -$GLOBALS['TL_LANG']['tl_module']['nc_activation_notification'] = array('Activation notification', 'Please select an activation notification.'); \ No newline at end of file +$GLOBALS['TL_LANG']['tl_module']['nc_activation_notification'] = array('Activation notification', 'Please select an activation notification.'); diff --git a/languages/en/tl_nc_notification.php b/languages/en/tl_nc_notification.php index 18fd11e4..4e132622 100644 --- a/languages/en/tl_nc_notification.php +++ b/languages/en/tl_nc_notification.php @@ -46,3 +46,6 @@ $GLOBALS['TL_LANG']['tl_nc_notification']['type']['member_registration'] = array('Member registration'); $GLOBALS['TL_LANG']['tl_nc_notification']['type']['member_personaldata'] = array('Member personal data'); $GLOBALS['TL_LANG']['tl_nc_notification']['type']['member_password'] = array('Member lost password'); +$GLOBALS['TL_LANG']['tl_nc_notification']['type']['newsletter_subscribe'] = array('Newsletter subscribed'); +$GLOBALS['TL_LANG']['tl_nc_notification']['type']['newsletter_activate'] = array('Newsletter activation'); +$GLOBALS['TL_LANG']['tl_nc_notification']['type']['newsletter_unsubscribe'] = array('Newsletter unsubscribed'); From 11e6bd43561d8e2940ec67a31fceae38be277269 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 8 Oct 2018 15:07:05 +0200 Subject: [PATCH 40/51] Add missing module translations. --- languages/en/modules.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/languages/en/modules.php b/languages/en/modules.php index 95f40a24..f66544ff 100644 --- a/languages/en/modules.php +++ b/languages/en/modules.php @@ -19,4 +19,7 @@ /** * Front end modules */ -$GLOBALS['TL_LANG']['FMD']['lostPasswordNotificationCenter'] = array('Lost password (Notification Center)', 'Generates a form to request a new password and sends the notification using the notification center.'); +$GLOBALS['TL_LANG']['FMD']['lostPasswordNotificationCenter'] = array('Lost password (Notification Center)', 'Generates a form to request a new password and sends the notification using the notification center.'); +$GLOBALS['TL_LANG']['FMD']['newsletterSubscribeNotificationCenter'] = array('Subscribe (Notification Center)', 'Generates a form to subscribe to one or more channels and sends the notification using the notification center.'); +$GLOBALS['TL_LANG']['FMD']['newsletterActivateNotificationCenter'] = array('Activate(Notification Center)', 'Generates a form to activate subscription to one or more channels the notification using the notification center.'); +$GLOBALS['TL_LANG']['FMD']['newsletterUnsubscribeNotificationCenter'] = array('Unsubscribe (Notification Center)', 'Generates a form to unsubscribe from one or more channels and sends the notification using the notification center.'); From 9678fd6c0e391babf7bc0ee15f811a3813ed39eb Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 8 Oct 2018 15:10:23 +0200 Subject: [PATCH 41/51] Use ModuleLoader::getActive to check if newsletter module is used. --- config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index 9e15cea7..208238e3 100644 --- a/config/config.php +++ b/config/config.php @@ -48,7 +48,7 @@ */ $GLOBALS['FE_MOD']['user']['lostPasswordNotificationCenter'] = 'ModulePasswordNotificationCenter'; -if (isset($GLOBALS['FE_MOD']['newsletter'])) { +if (in_array('newsletter', \ModuleLoader::getActive())) { $GLOBALS['FE_MOD']['newsletter']['newsletterSubscribeNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; $GLOBALS['FE_MOD']['newsletter']['newsletterActivateNotificationCenter'] = 'ModuleNewsletterActivateNotificationCenter'; $GLOBALS['FE_MOD']['newsletter']['newsletterUnsubscribeNotificationCenter'] = 'ModuleNewsletterUnsubscribeNotificationCenter'; From 1f67eeba4081fbf51a7b1d95b3d3cd7d2d0421c2 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 8 Oct 2018 15:15:14 +0200 Subject: [PATCH 42/51] Concat palette legends to a long string and remove disableCaptcha setting for Contao < 4.1 as it's not recognized in the templates here. --- dca/tl_module.php | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/dca/tl_module.php b/dca/tl_module.php index a6e12954..0e6a3315 100644 --- a/dca/tl_module.php +++ b/dca/tl_module.php @@ -14,31 +14,14 @@ */ $GLOBALS['TL_DCA']['tl_module']['palettes']['registration'] = str_replace('reg_activate;', 'reg_activate,nc_notification,nc_activation_notification;', $GLOBALS['TL_DCA']['tl_module']['palettes']['registration']); $GLOBALS['TL_DCA']['tl_module']['palettes']['lostPasswordNotificationCenter'] = str_replace('reg_password', 'nc_notification', $GLOBALS['TL_DCA']['tl_module']['palettes']['lostPassword']); +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterSubscribeNotificationCenter'] = '{title_legend},name,headline,type;{config_legend},nl_channels,nl_hideChannels,disableCaptcha;{text_legend},nl_text{notification_legend},nc_notification;{redirect_legend},jumpTo;{template_legend:hide},nl_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID'; +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterActivateNotificationCenter'] = '{title_legend},name,headline,type;{config_legend},nl_channels,nl_hideChannels;{notification_legend},nc_notification;{redirect_legend},jumpTo;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID'; +$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterUnsubscribeNotificationCenter'] = '{title_legend},name,headline,type;{config_legend},nl_channels,nl_hideChannels,disableCaptcha;{notification_legend},nc_notification;{redirect_legend},jumpTo;{template_legend:hide},nl_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID'; -$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterSubscribeNotificationCenter'] = '{title_legend},name,headline,type' - . ';{config_legend},nl_channels,nl_hideChannels,disableCaptcha' - . ';{text_legend},nl_text' - . ';{notification_legend},nc_notification' - . ';{redirect_legend},jumpTo' - . ';{template_legend:hide},nl_template' - . ';{protected_legend:hide},protected' - . ';{expert_legend:hide},guests,cssID'; - -$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterActivateNotificationCenter'] = '{title_legend},name,headline,type' - . ';{config_legend},nl_channels,nl_hideChannels' - . ';{notification_legend},nc_notification' - . ';{redirect_legend},jumpTo' - . ';{template_legend:hide},customTpl' - . ';{protected_legend:hide},protected' - . ';{expert_legend:hide},guests,cssID'; - -$GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterUnsubscribeNotificationCenter'] = '{title_legend},name,headline,type' - . ';{config_legend},nl_channels,nl_hideChannels,disableCaptcha' - . ';{notification_legend},nc_notification' - . ';{redirect_legend},jumpTo' - . ';{template_legend:hide},nl_template' - . ';{protected_legend:hide},protected' - . ';{expert_legend:hide},guests,cssID'; +if (version_compare(VERSION, '4.1', '<')) { + $GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterSubscribeNotificationCenter'] = str_replace(',disableCaptcha', '', $GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterSubscribeNotificationCenter']); + $GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterUnsubscribeNotificationCenter'] = str_replace(',disableCaptcha', '', $GLOBALS['TL_DCA']['tl_module']['palettes']['newsletterUnsubscribeNotificationCenter']); +} if (strpos($GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'], 'newsletters')) { $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'] = str_replace('newsletters;', 'newsletters,nc_notification;', $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData']); From 6d271dbbe9584c00c7a61c534ae41d485ea2e53e Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 8 Oct 2018 15:16:50 +0200 Subject: [PATCH 43/51] Fix file header and author information. --- .../ModuleNewsletterSubscribeNotificationCenter.php | 2 -- ...ModuleNewsletterUnsubscribeNotificationCenter.php | 12 +++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 89fe828e..2d051d1c 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -21,8 +21,6 @@ * @property string $nl_text * @property bool $nl_hideChannels * @property int $nc_notification - * - * @author Leo Feyer */ class ModuleNewsletterSubscribeNotificationCenter extends ModuleSubscribe { diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index d3b80fff..9ba167f1 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -1,11 +1,11 @@ + * @license LGPL */ namespace Contao; @@ -20,8 +20,6 @@ * @property array $nl_channels * @property string $nl_template * @property int $nc_notification - * - * @author Leo Feyer */ class ModuleNewsletterUnsubscribeNotificationCenter extends ModuleUnsubscribe { From 90c9e897b2f638baa8c7657e641ae37293b7d57e Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 8 Oct 2018 15:22:26 +0200 Subject: [PATCH 44/51] Add missing space. --- languages/en/modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/en/modules.php b/languages/en/modules.php index f66544ff..e0485639 100644 --- a/languages/en/modules.php +++ b/languages/en/modules.php @@ -21,5 +21,5 @@ */ $GLOBALS['TL_LANG']['FMD']['lostPasswordNotificationCenter'] = array('Lost password (Notification Center)', 'Generates a form to request a new password and sends the notification using the notification center.'); $GLOBALS['TL_LANG']['FMD']['newsletterSubscribeNotificationCenter'] = array('Subscribe (Notification Center)', 'Generates a form to subscribe to one or more channels and sends the notification using the notification center.'); -$GLOBALS['TL_LANG']['FMD']['newsletterActivateNotificationCenter'] = array('Activate(Notification Center)', 'Generates a form to activate subscription to one or more channels the notification using the notification center.'); +$GLOBALS['TL_LANG']['FMD']['newsletterActivateNotificationCenter'] = array('Activate (Notification Center)', 'Generates a form to activate subscription to one or more channels the notification using the notification center.'); $GLOBALS['TL_LANG']['FMD']['newsletterUnsubscribeNotificationCenter'] = array('Unsubscribe (Notification Center)', 'Generates a form to unsubscribe from one or more channels and sends the notification using the notification center.'); From e8c1b70d1502b60e73bd130fed6aa6593ba27ecd Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 8 Oct 2018 15:52:09 +0200 Subject: [PATCH 45/51] Fix captcha name. --- modules/ModuleNewsletterUnsubscribeNotificationCenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 9ba167f1..0fc235e7 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -39,7 +39,7 @@ protected function compile() $this->compileConfirmationMessage(); // Default template variables - $this->Template->captach = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; + $this->Template->captcha = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; $this->Template->email = \Input::get('email'); From 872f03bc40e326997458093a962b6801ec38cb7c Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Thu, 11 Oct 2018 16:05:12 +0200 Subject: [PATCH 46/51] Fixed some coding style --- config/config.php | 2 +- ...leNewsletterActivateNotificationCenter.php | 20 ++--- ...eNewsletterSubscribeNotificationCenter.php | 72 ++++++---------- ...ewsletterUnsubscribeNotificationCenter.php | 84 ++++++++----------- 4 files changed, 67 insertions(+), 111 deletions(-) diff --git a/config/config.php b/config/config.php index 208238e3..03405aa7 100644 --- a/config/config.php +++ b/config/config.php @@ -48,7 +48,7 @@ */ $GLOBALS['FE_MOD']['user']['lostPasswordNotificationCenter'] = 'ModulePasswordNotificationCenter'; -if (in_array('newsletter', \ModuleLoader::getActive())) { +if (in_array('newsletter', \ModuleLoader::getActive(), true)) { $GLOBALS['FE_MOD']['newsletter']['newsletterSubscribeNotificationCenter'] = 'ModuleNewsletterSubscribeNotificationCenter'; $GLOBALS['FE_MOD']['newsletter']['newsletterActivateNotificationCenter'] = 'ModuleNewsletterActivateNotificationCenter'; $GLOBALS['FE_MOD']['newsletter']['newsletterUnsubscribeNotificationCenter'] = 'ModuleNewsletterUnsubscribeNotificationCenter'; diff --git a/modules/ModuleNewsletterActivateNotificationCenter.php b/modules/ModuleNewsletterActivateNotificationCenter.php index fcaa432e..ea7c32a2 100644 --- a/modules/ModuleNewsletterActivateNotificationCenter.php +++ b/modules/ModuleNewsletterActivateNotificationCenter.php @@ -25,10 +25,9 @@ class ModuleNewsletterActivateNotificationCenter extends Module */ public function generate() { - if (TL_MODE == 'BE') - { + if (TL_MODE == 'BE') { $objTemplate = new \BackendTemplate('be_wildcard'); - $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['newsletterActivateNotificationCenter'][0]) . ' ###'; + $objTemplate->wildcard = '### ' . strtoupper($GLOBALS['TL_LANG']['FMD']['newsletterActivateNotificationCenter'][0]) . ' ###'; $objTemplate->title = $this->headline; $objTemplate->id = $this->id; $objTemplate->link = $this->name; @@ -40,8 +39,7 @@ public function generate() $this->nl_channels = deserialize($this->nl_channels); // Return if there are no channels - if (empty($this->nl_channels) || !\is_array($this->nl_channels)) - { + if (empty($this->nl_channels) || !\is_array($this->nl_channels)) { return ''; } @@ -65,8 +63,7 @@ protected function activateRecipient() // Check the token $objRecipient = \NewsletterRecipientsModel::findByToken(\Input::get('token')); - if ($objRecipient === null) - { + if ($objRecipient === null) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['invalidToken']; @@ -78,8 +75,7 @@ protected function activateRecipient() $arrCids = array(); // Update the subscriptions - while ($objRecipient->next()) - { + while ($objRecipient->next()) { /** @var NewsletterChannelModel $objChannel */ $objChannel = $objRecipient->getRelated('pid'); @@ -94,10 +90,8 @@ protected function activateRecipient() } // HOOK: post activation callback - if (isset($GLOBALS['TL_HOOKS']['activateRecipient']) && \is_array($GLOBALS['TL_HOOKS']['activateRecipient'])) - { - foreach ($GLOBALS['TL_HOOKS']['activateRecipient'] as $callback) - { + if (isset($GLOBALS['TL_HOOKS']['activateRecipient']) && \is_array($GLOBALS['TL_HOOKS']['activateRecipient'])) { + foreach ($GLOBALS['TL_HOOKS']['activateRecipient'] as $callback) { $this->import($callback[0]); $this->{$callback[0]}->{$callback[1]}($objRecipient->email, $arrAdd, $arrCids); } diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 2d051d1c..f9bd73dd 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -12,16 +12,6 @@ use NotificationCenter\Model\Notification; -/** - * Front end module "newsletter subscribe". - * - * @property string $nl_subscribe - * @property array $nl_channels - * @property string $nl_template - * @property string $nl_text - * @property bool $nl_hideChannels - * @property int $nc_notification - */ class ModuleNewsletterSubscribeNotificationCenter extends ModuleSubscribe { use NewsletterModuleTrait; @@ -60,13 +50,12 @@ protected function compile() * * @return array|bool */ - protected function validateForm(Widget $objWidget=null) + protected function validateForm(Widget $objWidget = null) { // Validate the e-mail address $varInput = \Idna::encodeEmail(\Input::post('email', true)); - if (!\Validator::isEmail($varInput)) - { + if (!\Validator::isEmail($varInput)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; @@ -78,8 +67,7 @@ protected function validateForm(Widget $objWidget=null) // Validate the channel selection $arrChannels = \Input::post('channels'); - if (!\is_array($arrChannels)) - { + if (!\is_array($arrChannels)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; @@ -88,8 +76,7 @@ protected function validateForm(Widget $objWidget=null) $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 - if (empty($arrChannels) || !\is_array($arrChannels)) - { + if (empty($arrChannels) || !\is_array($arrChannels)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; @@ -101,15 +88,13 @@ protected function validateForm(Widget $objWidget=null) // Check if there are any new subscriptions $arrSubscriptions = array(); - if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) - { + if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) { $arrSubscriptions = $objSubscription->fetchEach('pid'); } $arrNew = array_diff($arrChannels, $arrSubscriptions); - if (empty($arrNew) || !\is_array($arrNew)) - { + if (empty($arrNew) || !\is_array($arrNew)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['subscribed']; @@ -117,12 +102,10 @@ protected function validateForm(Widget $objWidget=null) } // Validate the captcha - if ($objWidget !== null) - { + if ($objWidget !== null) { $objWidget->validate(); - if ($objWidget->hasErrors()) - { + if ($objWidget->hasErrors()) { return false; } } @@ -139,10 +122,8 @@ protected function validateForm(Widget $objWidget=null) protected function addRecipient($strEmail, $arrNew) { // Remove old subscriptions that have not been activated yet - if (($objOld = \NewsletterRecipientsModel::findOldSubscriptionsByEmailAndPids($strEmail, $arrNew)) !== null) - { - while ($objOld->next()) - { + if (($objOld = \NewsletterRecipientsModel::findOldSubscriptionsByEmailAndPids($strEmail, $arrNew)) !== null) { + while ($objOld->next()) { $objOld->delete(); } } @@ -151,8 +132,7 @@ protected function addRecipient($strEmail, $arrNew) $strToken = md5(uniqid(mt_rand(), true)); // Add the new subscriptions - foreach ($arrNew as $id) - { + foreach ($arrNew as $id) { $objRecipient = new \NewsletterRecipientsModel(); $objRecipient->pid = $id; $objRecipient->tstamp = $time; @@ -165,8 +145,9 @@ protected function addRecipient($strEmail, $arrNew) $objRecipient->save(); // Remove the blacklist entry (see #4999) - if (version_compare(VERSION, '4.1', '>=') && ($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid(md5($strEmail), $id)) !== null) - { + if (version_compare(VERSION, '4.1', '>=') + && ($objBlacklist = \NewsletterBlacklistModel::findByHashAndPid(md5($strEmail), $id)) !== null + ) { $objBlacklist->delete(); } } @@ -174,12 +155,13 @@ protected function addRecipient($strEmail, $arrNew) $this->sendNotification($strToken, $strEmail, $arrNew); $this->redirectToJumpToPage(); - if (version_compare(VERSION, '4.1', '>=')) - { - \System::getContainer()->get('session')->getFlashBag()->set('nl_confirm', $GLOBALS['TL_LANG']['MSC']['nl_confirm']); - } - else - { + if (version_compare(VERSION, '4.1', '>=')) { + \System::getContainer() + ->get('session') + ->getFlashBag() + ->set('nl_confirm', $GLOBALS['TL_LANG']['MSC']['nl_confirm']) + ; + } else { $_SESSION['SUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_confirm']; } @@ -188,13 +170,11 @@ protected function addRecipient($strEmail, $arrNew) protected function compileConfirmationMessage() { - if (version_compare(VERSION, '4.1', '>=')) - { + if (version_compare(VERSION, '4.1', '>=')) { $session = \System::getContainer()->get('session'); $flashBag = $session->getFlashBag(); - if ($session->isStarted() && $flashBag->has('nl_confirm')) - { + if ($session->isStarted() && $flashBag->has('nl_confirm')) { $arrMessages = $flashBag->get('nl_confirm'); $this->Template->mclass = 'confirm'; @@ -205,8 +185,7 @@ protected function compileConfirmationMessage() } // Error message - if (strlen($_SESSION['SUBSCRIBE_ERROR'])) - { + if (strlen($_SESSION['SUBSCRIBE_ERROR'])) { $this->Template->mclass = 'error'; $this->Template->message = $_SESSION['SUBSCRIBE_ERROR']; $this->Template->hasError = true; @@ -214,8 +193,7 @@ protected function compileConfirmationMessage() } // Confirmation message - if (strlen($_SESSION['SUBSCRIBE_CONFIRM'])) - { + if (strlen($_SESSION['SUBSCRIBE_CONFIRM'])) { $this->Template->mclass = 'confirm'; $this->Template->message = $_SESSION['SUBSCRIBE_CONFIRM']; $this->Template->hasError = false; diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 0fc235e7..62cb6621 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -12,15 +12,6 @@ use NotificationCenter\Model\Notification; -/** - * Front end module "newsletter unsubscribe". - * - * @property bool $nl_hideChannels - * @property string $nl_unsubscribe - * @property array $nl_channels - * @property string $nl_template - * @property int $nc_notification - */ class ModuleNewsletterUnsubscribeNotificationCenter extends ModuleUnsubscribe { use NewsletterModuleTrait; @@ -39,7 +30,7 @@ protected function compile() $this->compileConfirmationMessage(); // Default template variables - $this->Template->captcha = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; + $this->Template->captcha = $objCaptchaWidget ? $objCaptchaWidget->parse() : ''; $this->Template->channels = $this->compileChannels(); $this->Template->showChannels = !$this->nl_hideChannels; $this->Template->email = \Input::get('email'); @@ -58,13 +49,12 @@ protected function compile() * * @return array|bool */ - protected function validateForm(Widget $objWidget=null) + protected function validateForm(Widget $objWidget = null) { // Validate the e-mail address $varInput = \Idna::encodeEmail(\Input::post('email', true)); - if (!\Validator::isEmail($varInput)) - { + if (!\Validator::isEmail($varInput)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['email']; @@ -76,8 +66,7 @@ protected function validateForm(Widget $objWidget=null) // Validate the channel selection $arrChannels = \Input::post('channels'); - if (!\is_array($arrChannels)) - { + if (!\is_array($arrChannels)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; @@ -86,8 +75,7 @@ protected function validateForm(Widget $objWidget=null) $arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240 - if (empty($arrChannels) || !\is_array($arrChannels)) - { + if (empty($arrChannels) || !\is_array($arrChannels)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['noChannels']; @@ -99,15 +87,16 @@ protected function validateForm(Widget $objWidget=null) // Check if there are any new subscriptions $arrSubscriptions = array(); - if (($objSubscription = \NewsletterRecipientsModel::findBy(array("email=? AND active=1"), $varInput)) !== null) - { + if (($objSubscription = \NewsletterRecipientsModel::findBy( + array("email=? AND active=1"), + $varInput + )) !== null) { $arrSubscriptions = $objSubscription->fetchEach('pid'); } $arrRemove = array_intersect($arrChannels, $arrSubscriptions); - if (empty($arrRemove) || !\is_array($arrRemove)) - { + if (empty($arrRemove) || !\is_array($arrRemove)) { $this->Template->mclass = 'error'; $this->Template->message = $GLOBALS['TL_LANG']['ERR']['unsubscribed']; @@ -115,17 +104,18 @@ protected function validateForm(Widget $objWidget=null) } // Validate the captcha - if ($objWidget !== null) - { + if ($objWidget !== null) { $objWidget->validate(); - if ($objWidget->hasErrors()) - { + if ($objWidget->hasErrors()) { return false; } } - return array($varInput, $arrRemove); + return array( + $varInput, + $arrRemove, + ); } /** @@ -137,15 +127,14 @@ protected function validateForm(Widget $objWidget=null) protected function removeRecipient($strEmail, $arrRemove) { // Remove the subscriptions - if (($objRemove = \NewsletterRecipientsModel::findByEmailAndPids($strEmail, $arrRemove)) !== null) - { - while ($objRemove->next()) - { + if (($objRemove = \NewsletterRecipientsModel::findByEmailAndPids($strEmail, $arrRemove)) !== null) { + while ($objRemove->next()) { $strHash = md5($objRemove->email); // Add a blacklist entry (see #4999) - if (version_compare(VERSION, '4.1', '>=') && $objBlacklist = (\NewsletterBlacklistModel::findByHashAndPid($strHash, $objRemove->pid)) === null) - { + if (version_compare(VERSION, '4.1', '>=') + && $objBlacklist = (\NewsletterBlacklistModel::findByHashAndPid($strHash, $objRemove->pid)) === null + ) { $objBlacklist = new \NewsletterBlacklistModel(); $objBlacklist->pid = $objRemove->pid; $objBlacklist->hash = $strHash; @@ -157,10 +146,8 @@ protected function removeRecipient($strEmail, $arrRemove) } // HOOK: post unsubscribe callback - if (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && \is_array($GLOBALS['TL_HOOKS']['removeRecipient'])) - { - foreach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback) - { + if (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && \is_array($GLOBALS['TL_HOOKS']['removeRecipient'])) { + foreach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback) { $this->import($callback[0]); $this->{$callback[0]}->{$callback[1]}($strEmail, $arrRemove); } @@ -169,12 +156,13 @@ protected function removeRecipient($strEmail, $arrRemove) $this->sendNotification($strEmail, $arrRemove); $this->redirectToJumpToPage(); - if (version_compare(VERSION, '4.1', '>=')) - { - \System::getContainer()->get('session')->getFlashBag()->set('nl_removed', $GLOBALS['TL_LANG']['MSC']['nl_removed']); - } - else - { + if (version_compare(VERSION, '4.1', '>=')) { + \System::getContainer() + ->get('session') + ->getFlashBag() + ->set('nl_removed', $GLOBALS['TL_LANG']['MSC']['nl_removed']) + ; + } else { $_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed']; } @@ -183,14 +171,12 @@ protected function removeRecipient($strEmail, $arrRemove) protected function compileConfirmationMessage() { - if (version_compare(VERSION, '4.1', '>=')) - { + if (version_compare(VERSION, '4.1', '>=')) { $session = \System::getContainer()->get('session'); $flashBag = $session->getFlashBag(); // Confirmation message - if ($session->isStarted() && $flashBag->has('nl_removed')) - { + if ($session->isStarted() && $flashBag->has('nl_removed')) { $arrMessages = $flashBag->get('nl_removed'); $this->Template->mclass = 'confirm'; @@ -201,16 +187,14 @@ protected function compileConfirmationMessage() } // Error message - if (strlen($_SESSION['UNSUBSCRIBE_ERROR'])) - { + if (strlen($_SESSION['UNSUBSCRIBE_ERROR'])) { $this->Template->mclass = 'error'; $this->Template->message = $_SESSION['UNSUBSCRIBE_ERROR']; $_SESSION['UNSUBSCRIBE_ERROR'] = ''; } // Confirmation message - if (strlen($_SESSION['UNSUBSCRIBE_CONFIRM'])) - { + if (strlen($_SESSION['UNSUBSCRIBE_CONFIRM'])) { $this->Template->mclass = 'confirm'; $this->Template->message = $_SESSION['UNSUBSCRIBE_CONFIRM']; $_SESSION['UNSUBSCRIBE_CONFIRM'] = ''; From 43541d48f88d158b8b844de3b12198602cd0bd67 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 12 Oct 2018 12:10:52 +0200 Subject: [PATCH 47/51] Rename addRecipient to addNewsletterRecipient to avoid method declarations warning in Contao 3.5. Method signature has changed in Contao 4. --- modules/ModuleNewsletterSubscribeNotificationCenter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ModuleNewsletterSubscribeNotificationCenter.php b/modules/ModuleNewsletterSubscribeNotificationCenter.php index 2d051d1c..142bdbd4 100644 --- a/modules/ModuleNewsletterSubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterSubscribeNotificationCenter.php @@ -37,7 +37,7 @@ protected function compile() $strFormId = 'tl_subscribe_' . $this->id; - $this->processForm($strFormId, $objCaptchaWidget, 'addRecipient'); + $this->processForm($strFormId, $objCaptchaWidget, 'addNewsletterRecipient'); $this->compileConfirmationMessage(); $this->Template->email = ''; @@ -136,7 +136,7 @@ protected function validateForm(Widget $objWidget=null) * @param string $strEmail * @param array $arrNew */ - protected function addRecipient($strEmail, $arrNew) + protected function addNewsletterRecipient($strEmail, $arrNew) { // Remove old subscriptions that have not been activated yet if (($objOld = \NewsletterRecipientsModel::findOldSubscriptionsByEmailAndPids($strEmail, $arrNew)) !== null) From 6be46dfb9919ccec39b047b9464599ff1623e3d4 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 12 Oct 2018 13:05:07 +0200 Subject: [PATCH 48/51] Rename removeRecipient to removeNewsletterRecipient to avoid method declarations warning in Contao 3.5. Method signature has changed in Contao 4. --- modules/ModuleNewsletterUnsubscribeNotificationCenter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php index 62cb6621..c0979c79 100644 --- a/modules/ModuleNewsletterUnsubscribeNotificationCenter.php +++ b/modules/ModuleNewsletterUnsubscribeNotificationCenter.php @@ -26,7 +26,7 @@ protected function compile() $objCaptchaWidget = $this->createCaptchaWidgetIfEnabled(); $strFormId = 'tl_unsubscribe_' . $this->id; - $this->processForm($strFormId, $objCaptchaWidget, 'removeRecipient'); + $this->processForm($strFormId, $objCaptchaWidget, 'removeNewsletterRecipient'); $this->compileConfirmationMessage(); // Default template variables @@ -124,7 +124,7 @@ protected function validateForm(Widget $objWidget = null) * @param string $strEmail * @param array $arrRemove */ - protected function removeRecipient($strEmail, $arrRemove) + protected function removeNewsletterRecipient($strEmail, $arrRemove) { // Remove the subscriptions if (($objRemove = \NewsletterRecipientsModel::findByEmailAndPids($strEmail, $arrRemove)) !== null) { From dce04f18b8c3d5450b66e0ff1327840751d1b260 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Mon, 22 Oct 2018 11:08:15 +0200 Subject: [PATCH 49/51] Use XLIFF and regular Transifex client --- .gitignore | 20 +- .tx/config | 48 ++++ composer.json | 9 +- languages/cs/modules.php | 24 -- languages/cs/modules.xlf | 61 +++++ languages/cs/tl_form.php | 17 -- languages/cs/tl_form.xlf | 15 ++ languages/cs/tl_module.php | 19 -- languages/cs/tl_module.xlf | 26 ++ languages/cs/tl_nc_gateway.php | 90 ------- languages/cs/tl_nc_gateway.xlf | 333 ++++++++++++++++++++++++++ languages/cs/tl_nc_language.php | 22 -- languages/cs/tl_nc_language.xlf | 191 +++++++++++++++ languages/cs/tl_nc_message.xlf | 130 ++++++++++ languages/cs/tl_nc_notification.xlf | 112 +++++++++ languages/cs/tl_nc_queue.xlf | 70 ++++++ languages/cs/tokens.xlf | 40 ++++ languages/de/modules.php | 23 -- languages/de/modules.xlf | 61 +++++ languages/de/tl_form.php | 16 -- languages/de/tl_form.xlf | 15 ++ languages/de/tl_module.php | 18 -- languages/de/tl_module.xlf | 26 ++ languages/de/tl_nc_gateway.php | 90 ------- languages/de/tl_nc_gateway.xlf | 333 ++++++++++++++++++++++++++ languages/de/tl_nc_language.php | 73 ------ languages/de/tl_nc_language.xlf | 241 +++++++++++++++++++ languages/de/tl_nc_message.php | 55 ----- languages/de/tl_nc_message.xlf | 171 ++++++++++++++ languages/de/tl_nc_notification.php | 42 ---- languages/de/tl_nc_notification.xlf | 140 +++++++++++ languages/de/tl_nc_queue.php | 26 -- languages/de/tl_nc_queue.xlf | 82 +++++++ languages/de/tokens.php | 22 -- languages/de/tokens.xlf | 48 ++++ languages/en/modules.php | 25 -- languages/en/modules.xlf | 67 ++++++ languages/en/tl_form.php | 14 -- languages/en/tl_form.xlf | 15 ++ languages/en/tl_module.php | 16 -- languages/en/tl_module.xlf | 27 +++ languages/en/tl_nc_gateway.php | 100 -------- languages/en/tl_nc_gateway.xlf | 353 ++++++++++++++++++++++++++++ languages/en/tl_nc_language.php | 64 ----- languages/en/tl_nc_language.xlf | 243 +++++++++++++++++++ languages/en/tl_nc_message.php | 49 ---- languages/en/tl_nc_message.xlf | 171 ++++++++++++++ languages/en/tl_nc_notification.php | 53 ----- languages/en/tl_nc_notification.xlf | 147 ++++++++++++ languages/en/tl_nc_queue.php | 43 ---- languages/en/tl_nc_queue.xlf | 91 +++++++ languages/en/tokens.php | 25 -- languages/en/tokens.xlf | 51 ++++ languages/fa/modules.xlf | 52 ++++ languages/fa/tl_form.xlf | 13 + languages/fa/tl_module.xlf | 22 ++ languages/fa/tl_nc_gateway.xlf | 258 ++++++++++++++++++++ languages/fa/tl_nc_language.xlf | 184 +++++++++++++++ languages/fa/tl_nc_message.xlf | 130 ++++++++++ languages/fa/tl_nc_notification.xlf | 112 +++++++++ languages/fa/tl_nc_queue.xlf | 70 ++++++ languages/fa/tokens.xlf | 40 ++++ languages/fi/modules.xlf | 52 ++++ languages/fi/tl_form.xlf | 13 + languages/fi/tl_module.xlf | 22 ++ languages/fi/tl_nc_gateway.xlf | 258 ++++++++++++++++++++ languages/fi/tl_nc_language.xlf | 184 +++++++++++++++ languages/fi/tl_nc_message.xlf | 130 ++++++++++ languages/fi/tl_nc_notification.xlf | 112 +++++++++ languages/fi/tl_nc_queue.xlf | 70 ++++++ languages/fi/tokens.xlf | 40 ++++ languages/fr/modules.php | 21 -- languages/fr/modules.xlf | 59 +++++ languages/fr/tl_form.php | 17 -- languages/fr/tl_form.xlf | 15 ++ languages/fr/tl_module.php | 17 -- languages/fr/tl_module.xlf | 24 ++ languages/fr/tl_nc_gateway.php | 62 ----- languages/fr/tl_nc_gateway.xlf | 305 ++++++++++++++++++++++++ languages/fr/tl_nc_language.php | 65 ----- languages/fr/tl_nc_language.xlf | 233 ++++++++++++++++++ languages/fr/tl_nc_message.php | 55 ----- languages/fr/tl_nc_message.xlf | 171 ++++++++++++++ languages/fr/tl_nc_notification.php | 41 ---- languages/fr/tl_nc_notification.xlf | 138 +++++++++++ languages/fr/tl_nc_queue.xlf | 70 ++++++ languages/fr/tokens.php | 17 -- languages/fr/tokens.xlf | 43 ++++ languages/it/modules.php | 22 -- languages/it/modules.xlf | 59 +++++ languages/it/tl_form.php | 17 -- languages/it/tl_form.xlf | 15 ++ languages/it/tl_module.php | 17 -- languages/it/tl_module.xlf | 24 ++ languages/it/tl_nc_gateway.php | 32 --- languages/it/tl_nc_gateway.xlf | 275 ++++++++++++++++++++++ languages/it/tl_nc_language.php | 30 --- languages/it/tl_nc_language.xlf | 199 ++++++++++++++++ languages/it/tl_nc_message.php | 32 --- languages/it/tl_nc_message.xlf | 147 ++++++++++++ languages/it/tl_nc_notification.php | 27 --- languages/it/tl_nc_notification.xlf | 123 ++++++++++ languages/it/tl_nc_queue.xlf | 70 ++++++ languages/it/tokens.xlf | 40 ++++ languages/pl/modules.php | 21 -- languages/pl/modules.xlf | 59 +++++ languages/pl/tl_form.php | 17 -- languages/pl/tl_form.xlf | 15 ++ languages/pl/tl_module.php | 17 -- languages/pl/tl_module.xlf | 24 ++ languages/pl/tl_nc_gateway.php | 55 ----- languages/pl/tl_nc_gateway.xlf | 298 +++++++++++++++++++++++ languages/pl/tl_nc_language.php | 65 ----- languages/pl/tl_nc_language.xlf | 233 ++++++++++++++++++ languages/pl/tl_nc_message.php | 50 ---- languages/pl/tl_nc_message.xlf | 165 +++++++++++++ languages/pl/tl_nc_notification.php | 40 ---- languages/pl/tl_nc_notification.xlf | 137 +++++++++++ languages/pl/tl_nc_queue.xlf | 70 ++++++ languages/pl/tokens.php | 17 -- languages/pl/tokens.xlf | 42 ++++ languages/ru/modules.php | 23 -- languages/ru/modules.xlf | 61 +++++ languages/ru/tl_form.php | 17 -- languages/ru/tl_form.xlf | 15 ++ languages/ru/tl_module.php | 18 -- languages/ru/tl_module.xlf | 26 ++ languages/ru/tl_nc_gateway.php | 87 ------- languages/ru/tl_nc_gateway.xlf | 330 ++++++++++++++++++++++++++ languages/ru/tl_nc_language.php | 73 ------ languages/ru/tl_nc_language.xlf | 241 +++++++++++++++++++ languages/ru/tl_nc_message.php | 55 ----- languages/ru/tl_nc_message.xlf | 171 ++++++++++++++ languages/ru/tl_nc_notification.php | 44 ---- languages/ru/tl_nc_notification.xlf | 141 +++++++++++ languages/ru/tl_nc_queue.php | 34 --- languages/ru/tl_nc_queue.xlf | 89 +++++++ languages/ru/tokens.php | 24 -- languages/ru/tokens.xlf | 50 ++++ 139 files changed, 9250 insertions(+), 2081 deletions(-) create mode 100644 .tx/config delete mode 100644 languages/cs/modules.php create mode 100644 languages/cs/modules.xlf delete mode 100644 languages/cs/tl_form.php create mode 100644 languages/cs/tl_form.xlf delete mode 100644 languages/cs/tl_module.php create mode 100644 languages/cs/tl_module.xlf delete mode 100644 languages/cs/tl_nc_gateway.php create mode 100644 languages/cs/tl_nc_gateway.xlf delete mode 100644 languages/cs/tl_nc_language.php create mode 100644 languages/cs/tl_nc_language.xlf create mode 100644 languages/cs/tl_nc_message.xlf create mode 100644 languages/cs/tl_nc_notification.xlf create mode 100644 languages/cs/tl_nc_queue.xlf create mode 100644 languages/cs/tokens.xlf delete mode 100644 languages/de/modules.php create mode 100644 languages/de/modules.xlf delete mode 100644 languages/de/tl_form.php create mode 100644 languages/de/tl_form.xlf delete mode 100644 languages/de/tl_module.php create mode 100644 languages/de/tl_module.xlf delete mode 100644 languages/de/tl_nc_gateway.php create mode 100644 languages/de/tl_nc_gateway.xlf delete mode 100644 languages/de/tl_nc_language.php create mode 100644 languages/de/tl_nc_language.xlf delete mode 100644 languages/de/tl_nc_message.php create mode 100644 languages/de/tl_nc_message.xlf delete mode 100644 languages/de/tl_nc_notification.php create mode 100644 languages/de/tl_nc_notification.xlf delete mode 100644 languages/de/tl_nc_queue.php create mode 100644 languages/de/tl_nc_queue.xlf delete mode 100644 languages/de/tokens.php create mode 100644 languages/de/tokens.xlf delete mode 100644 languages/en/modules.php create mode 100644 languages/en/modules.xlf delete mode 100644 languages/en/tl_form.php create mode 100644 languages/en/tl_form.xlf delete mode 100644 languages/en/tl_module.php create mode 100644 languages/en/tl_module.xlf delete mode 100644 languages/en/tl_nc_gateway.php create mode 100644 languages/en/tl_nc_gateway.xlf delete mode 100644 languages/en/tl_nc_language.php create mode 100644 languages/en/tl_nc_language.xlf delete mode 100644 languages/en/tl_nc_message.php create mode 100644 languages/en/tl_nc_message.xlf delete mode 100644 languages/en/tl_nc_notification.php create mode 100644 languages/en/tl_nc_notification.xlf delete mode 100644 languages/en/tl_nc_queue.php create mode 100644 languages/en/tl_nc_queue.xlf delete mode 100755 languages/en/tokens.php create mode 100644 languages/en/tokens.xlf create mode 100644 languages/fa/modules.xlf create mode 100644 languages/fa/tl_form.xlf create mode 100644 languages/fa/tl_module.xlf create mode 100644 languages/fa/tl_nc_gateway.xlf create mode 100644 languages/fa/tl_nc_language.xlf create mode 100644 languages/fa/tl_nc_message.xlf create mode 100644 languages/fa/tl_nc_notification.xlf create mode 100644 languages/fa/tl_nc_queue.xlf create mode 100644 languages/fa/tokens.xlf create mode 100644 languages/fi/modules.xlf create mode 100644 languages/fi/tl_form.xlf create mode 100644 languages/fi/tl_module.xlf create mode 100644 languages/fi/tl_nc_gateway.xlf create mode 100644 languages/fi/tl_nc_language.xlf create mode 100644 languages/fi/tl_nc_message.xlf create mode 100644 languages/fi/tl_nc_notification.xlf create mode 100644 languages/fi/tl_nc_queue.xlf create mode 100644 languages/fi/tokens.xlf delete mode 100644 languages/fr/modules.php create mode 100644 languages/fr/modules.xlf delete mode 100644 languages/fr/tl_form.php create mode 100644 languages/fr/tl_form.xlf delete mode 100644 languages/fr/tl_module.php create mode 100644 languages/fr/tl_module.xlf delete mode 100644 languages/fr/tl_nc_gateway.php create mode 100644 languages/fr/tl_nc_gateway.xlf delete mode 100644 languages/fr/tl_nc_language.php create mode 100644 languages/fr/tl_nc_language.xlf delete mode 100644 languages/fr/tl_nc_message.php create mode 100644 languages/fr/tl_nc_message.xlf delete mode 100644 languages/fr/tl_nc_notification.php create mode 100644 languages/fr/tl_nc_notification.xlf create mode 100644 languages/fr/tl_nc_queue.xlf delete mode 100644 languages/fr/tokens.php create mode 100644 languages/fr/tokens.xlf delete mode 100644 languages/it/modules.php create mode 100644 languages/it/modules.xlf delete mode 100644 languages/it/tl_form.php create mode 100644 languages/it/tl_form.xlf delete mode 100644 languages/it/tl_module.php create mode 100644 languages/it/tl_module.xlf delete mode 100644 languages/it/tl_nc_gateway.php create mode 100644 languages/it/tl_nc_gateway.xlf delete mode 100644 languages/it/tl_nc_language.php create mode 100644 languages/it/tl_nc_language.xlf delete mode 100644 languages/it/tl_nc_message.php create mode 100644 languages/it/tl_nc_message.xlf delete mode 100644 languages/it/tl_nc_notification.php create mode 100644 languages/it/tl_nc_notification.xlf create mode 100644 languages/it/tl_nc_queue.xlf create mode 100644 languages/it/tokens.xlf delete mode 100644 languages/pl/modules.php create mode 100644 languages/pl/modules.xlf delete mode 100644 languages/pl/tl_form.php create mode 100644 languages/pl/tl_form.xlf delete mode 100644 languages/pl/tl_module.php create mode 100644 languages/pl/tl_module.xlf delete mode 100644 languages/pl/tl_nc_gateway.php create mode 100644 languages/pl/tl_nc_gateway.xlf delete mode 100644 languages/pl/tl_nc_language.php create mode 100644 languages/pl/tl_nc_language.xlf delete mode 100644 languages/pl/tl_nc_message.php create mode 100644 languages/pl/tl_nc_message.xlf delete mode 100644 languages/pl/tl_nc_notification.php create mode 100644 languages/pl/tl_nc_notification.xlf create mode 100644 languages/pl/tl_nc_queue.xlf delete mode 100644 languages/pl/tokens.php create mode 100644 languages/pl/tokens.xlf delete mode 100644 languages/ru/modules.php create mode 100644 languages/ru/modules.xlf delete mode 100644 languages/ru/tl_form.php create mode 100644 languages/ru/tl_form.xlf delete mode 100644 languages/ru/tl_module.php create mode 100644 languages/ru/tl_module.xlf delete mode 100644 languages/ru/tl_nc_gateway.php create mode 100644 languages/ru/tl_nc_gateway.xlf delete mode 100644 languages/ru/tl_nc_language.php create mode 100644 languages/ru/tl_nc_language.xlf delete mode 100644 languages/ru/tl_nc_message.php create mode 100644 languages/ru/tl_nc_message.xlf delete mode 100644 languages/ru/tl_nc_notification.php create mode 100644 languages/ru/tl_nc_notification.xlf delete mode 100644 languages/ru/tl_nc_queue.php create mode 100644 languages/ru/tl_nc_queue.xlf delete mode 100644 languages/ru/tokens.php create mode 100644 languages/ru/tokens.xlf diff --git a/.gitignore b/.gitignore index 06348811..4fbb073c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,2 @@ -# OS -.DS_Store -Thumbs.db - -# IDEs -.buildpath -.project -.settings/ -.build/ -.idea/ -nbproject/ - -# Transifex -.tx/ - -# Composer -vendor/ -composer.lock +/vendor/ +/composer.lock diff --git a/.tx/config b/.tx/config new file mode 100644 index 00000000..8e86d6a8 --- /dev/null +++ b/.tx/config @@ -0,0 +1,48 @@ +[main] +host = https://www.transifex.com +type = XLIFF + +[notification_center.master-notification_center-modules] +source_file = languages/en/modules.xlf +source_lang = en +file_filter = languages//modules.xlf + +[notification_center.master-notification_center-tl_form] +source_file = languages/en/tl_form.xlf +source_lang = en +file_filter = languages//tl_form.xlf + +[notification_center.master-notification_center-tl_module] +source_file = languages/en/tl_module.xlf +source_lang = en +file_filter = languages//tl_module.xlf + +[notification_center.master-notification_center-tl_nc_gateway] +source_file = languages/en/tl_nc_gateway.xlf +source_lang = en +file_filter = languages//tl_nc_gateway.xlf + +[notification_center.master-notification_center-tl_nc_language] +source_file = languages/en/tl_nc_language.xlf +source_lang = en +file_filter = languages//tl_nc_language.xlf + +[notification_center.master-notification_center-tl_nc_message] +source_file = languages/en/tl_nc_message.xlf +source_lang = en +file_filter = languages//tl_nc_message.xlf + +[notification_center.master-notification_center-tl_nc_notification] +source_file = languages/en/tl_nc_notification.xlf +source_lang = en +file_filter = languages//tl_nc_notification.xlf + +[notification_center.master-notification_center-tl_nc_queue] +source_file = languages/en/tl_nc_queue.xlf +source_lang = en +file_filter = languages//tl_nc_queue.xlf + +[notification_center.master-notification_center-tokens] +source_file = languages/en/tokens.xlf +source_lang = en +file_filter = languages//tokens.xlf diff --git a/composer.json b/composer.json index c5fc6a4d..c3ecc527 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,7 @@ "terminal42/dcawizard":"2.*" }, "require-dev": { - "contao/newsletter-bundle":"~3.5 || ~4.1", - "cyberspectrum/contao-toolbox": "^0.7.2" + "contao/newsletter-bundle":"~3.5 || ~4.1" }, "autoload":{ "psr-0": { @@ -47,12 +46,6 @@ "contao": { "sources":{ "": "system/modules/notification_center" - }, - "transifex": { - "project": "notification_center", - "prefix": "master-notification_center-", - "languages_cto": "languages", - "languages_tx": ".tx" } } } diff --git a/languages/cs/modules.php b/languages/cs/modules.php deleted file mode 100644 index 6b012334..00000000 --- a/languages/cs/modules.php +++ /dev/null @@ -1,24 +0,0 @@ - + + + + + Notification Center + Oznamovací centrum + + + Notifications + Oznámení + + + Manage notifications. + Spravovat oznámení + + + Queue + Fronta + + + View the message queue. + Zobrazit zprávy ve frontě + + + Gateways + Způsoby rozesílání + + + Manage gateways + Spravovat způsoby rozesílání + + + Lost password (Notification Center) + Poslední heslo (Oznamovací centrum) + + + Generates a form to request a new password and sends the notification using the notification center. + Vytvoří formulář požadující nové heslo a zašle oznámení pomocí Oznamovacího centra. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/cs/tl_form.php b/languages/cs/tl_form.php deleted file mode 100644 index 722004d3..00000000 --- a/languages/cs/tl_form.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Oznámení + + + Please select a notification. + Vyberte prosím oznámení. + + + + diff --git a/languages/cs/tl_module.php b/languages/cs/tl_module.php deleted file mode 100644 index aa927001..00000000 --- a/languages/cs/tl_module.php +++ /dev/null @@ -1,19 +0,0 @@ - + + + + + Notification + Oznámení + + + Please select a notification. + Vyberte prosím oznámení. + + + Activation notification + Aktivovat oznámení + + + Please select an activation notification. + Vyberte prosím aktivní oznámení. + + + Notification + + + + diff --git a/languages/cs/tl_nc_gateway.php b/languages/cs/tl_nc_gateway.php deleted file mode 100644 index bbdb292f..00000000 --- a/languages/cs/tl_nc_gateway.php +++ /dev/null @@ -1,90 +0,0 @@ -dowloads).'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['0'] = 'Číslo portu'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['1'] = 'Sem můžete zadat číslo portu. Ponechte pole prázdné pro použití výchozích hodnot.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['0'] = 'Druh souboru'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['1'] = 'Vyberte prosím druh souboru.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['csv'] = 'CSV'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['xml'] = 'Prostý text / XML'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['0'] = 'Užívatelské jméno'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['1'] = 'Zadejte prosím uživatelské jméno.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_confirm'] = 'Připojení navázáno'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_connect'] = 'Nelze se připojit k serveru FTP!'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_login'] = 'Nepodařilo se přihlásit k serveru FTP!'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['gateway_legend'] = 'Nastavení tohoto způsobu rozesílání'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['0'] = 'Nový druh rozesílání'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['1'] = 'Vytvořit nový způsob rozesílání.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_key']['0'] = 'Klíč API Postmarku'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_key']['1'] = 'Zadejte prosím klíč API Postmarku.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_ssl']['0'] = 'Povolit SSL'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_ssl']['1'] = 'Zde můžete povolit zabezpečené připojení SSL.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_test']['0'] = 'Spustit testovací modus'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_test']['1'] = 'Zde můžete povolit testovací modus.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronEnable']['0'] = 'Aktivovat intervalové zasílání'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronEnable']['1'] = 'Tím budou zprávy rozesílané ve vybraném intervalu.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['0'] = 'Četnost, interval'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['1'] = 'Vyberte četnost, s níž byste rádi obdrželi zprávy. '; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['daily'] = 'Každý den'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['hourly'] = 'Každou hodinu'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['minutely'] = 'Každou minutu'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['monthly'] = 'Každý měsíc'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['weekly'] = 'Každý týden'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronMessages']['0'] = 'Počet zpráv'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronMessages']['1'] = 'Zde můžete zadat počet zpráv, které mají být odeslané v rámci jednoho intervalu.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_targetGateway']['0'] = 'Rozdělené rozesílání'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_targetGateway']['1'] = 'Tento typ umístí všechny zprávy do fronty a pak je rozešle přes druh rozesílání, který si tu zvolíte.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['0'] = 'Podrobnosti k tomuto způsobu rozesílání'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['1'] = 'Zobrazit podrobnosti ke způsobu rozesílání %s.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpEnc']['0'] = 'Šifrování SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpEnc']['1'] = 'Zde můžete zvolit šifrovací metodu (SSL nebo TLS).'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpHost']['0'] = 'Název serveru SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpHost']['1'] = 'Zadejte prosím jméno poskytovatele serveru SMTP.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPass']['0'] = 'Heslo SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPass']['1'] = 'Zde můžete zadat heslo pro SMTP.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPort']['0'] = 'Číslo portu SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPort']['1'] = 'Zadejte prosím číslo portu serveru SMTP.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpUser']['0'] = 'Uživatelské jméno SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpUser']['1'] = 'Zde můžete zadat uživatelské jméno SMTP.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['0'] = 'Název'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['1'] = 'Zadejte prosím název pro tento druh rozesílání.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title_legend'] = 'Název a druh'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['0'] = 'Druh'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['1'] = 'Vyberte prosím druh rozesílání.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['email'] = 'Standardní rozesílání mailů'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['file'] = 'Zápis do souboru'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['postmark'] = 'Postmark (postmarkapp.com)'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['queue'] = 'Fronta'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['useSMTP']['0'] = 'Zaslat maily přes SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['useSMTP']['1'] = 'Použít pro odesílání mailů server SMTP místo funkce PHP mail().'; - diff --git a/languages/cs/tl_nc_gateway.xlf b/languages/cs/tl_nc_gateway.xlf new file mode 100644 index 00000000..65b968ed --- /dev/null +++ b/languages/cs/tl_nc_gateway.xlf @@ -0,0 +1,333 @@ + + + + + + Title + Název + + + Please enter a title for this gateway. + Zadejte prosím název pro tento druh rozesílání. + + + Type + Druh + + + Please select a type for this gateway. + Vyberte prosím druh rozesílání. + + + Target gateway + Rozdělené rozesílání + + + This gateway will queue all the messages and then send them over the gateway you define here. + Tento typ umístí všechny zprávy do fronty a pak je rozešle přes druh rozesílání, který si tu zvolíte. + + + Enable poor man's cronjob + Aktivovat intervalové zasílání + + + This will register this queue gateway to the poor man's cronjob. + Tím budou zprávy rozesílané ve vybraném intervalu. + + + Interval + Četnost, interval + + + Choose the interval you would like to have this queue gateway be invoked. + Vyberte četnost, s níž byste rádi obdrželi zprávy. + + + Number of messages + Počet zpráv + + + Here you can enter the number of messages that should be sent per invocation. + Zde můžete zadat počet zpráv, které mají být odeslané v rámci jednoho intervalu. + + + Override SMTP settings + Přepsat nastavení SMTP + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + Tento druh rozesílání převezme výchozí nastavení rozesílání mailů. Pokud si přejete použít jiná nastavení SMTP pro tento druh, zaškrtněte toto políčko. + + + File type + Druh souboru + + + Please choose the file type. + Vyberte prosím druh souboru. + + + Connection type + Druh připojení + + + Please choose the connection type. + Vyberte prosím druh připojení. + + + Host name + Název poskytovatele (host) + + + Please enter the host name. + Zadejte prosím jméno poskytovatele. + + + Port number + Číslo portu + + + Here you can enter the port number. Leave empty to use the default. + Sem můžete zadat číslo portu. Ponechte pole prázdné pro použití výchozích hodnot. + + + Username + Užívatelské jméno + + + Please enter the username. + Zadejte prosím uživatelské jméno. + + + Password + Heslo + + + Please enter the password. + Zadejte prosím heslo. + + + Path + Cesta + + + Here you can enter the path (e.g. <em>downloads</em>). + Zde můžete zadat cestu k souboru (např. <em>dowloads</em>). + + + Postmark API key + Klíč API Postmarku + + + Please enter your unique Postmark API key. + Zadejte prosím klíč API Postmarku. + + + Enable test mode + Spustit testovací modus + + + Here you can enable the test mode. + Zde můžete povolit testovací modus. + + + Enable SSL + Povolit SSL + + + Here you can enable the SSL connection. + Zde můžete povolit zabezpečené připojení SSL. + + + Send e-mails via SMTP + Zaslat maily přes SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + Použít pro odesílání mailů server SMTP místo funkce PHP mail(). + + + SMTP hostname + Název serveru SMTP + + + Please enter the host name of the SMTP server. + Zadejte prosím jméno poskytovatele serveru SMTP. + + + SMTP username + Uživatelské jméno SMTP + + + Here you can enter the SMTP username. + Zde můžete zadat uživatelské jméno SMTP. + + + SMTP password + Heslo SMTP + + + Here you can enter the SMTP password. + Zde můžete zadat heslo pro SMTP. + + + SMTP encryption + Šifrování SMTP + + + Here you can choose an encryption method (SSL or TLS). + Zde můžete zvolit šifrovací metodu (SSL nebo TLS). + + + SMTP port number + Číslo portu SMTP + + + Please enter the port number of the SMTP server. + Zadejte prosím číslo portu serveru SMTP. + + + Queue + Fronta + + + Standard email gateway + Standardní rozesílání mailů + + + Write to file + Zápis do souboru + + + Postmark (postmarkapp.com) + Postmark (postmarkapp.com) + + + Every minute + Každou minutu + + + Every hour + Každou hodinu + + + Every day + Každý den + + + Every week + Každý týden + + + Every month + Každý měsíc + + + CSV + CSV + + + Plain Text / XML + Prostý text / XML + + + Local + Lokální + + + FTP + FTP + + + Connection successful + Připojení navázáno + + + Could not connect to the FTP server! + Nelze se připojit k serveru FTP! + + + New gateway + Nový druh rozesílání + + + Create a new gateway. + Vytvořit nový způsob rozesílání. + + + Edit gateway + Upravit tento způsob rozesílání + + + Edit gateway ID %s. + Upravit způsob rozesílání %s + + + Copy gateway + Zkopírovat tento způsob rozesílání + + + Copy gateway ID %s. + Zkopírovat způsob rozesílání %s. + + + Delete gateway + Smazat tento způsob rozesílání + + + Delete gateway ID %s. + Smazat způsob rozesílání %s. + + + Gateway details + Podrobnosti k tomuto způsobu rozesílání + + + Show details for gateway ID %s. + Zobrazit podrobnosti ke způsobu rozesílání %s. + + + Title & type + Název a druh + + + Gateway settings + Nastavení tohoto způsobu rozesílání + + + Cronjob settings + Nastavení cronu + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Could not login to the FTP server! + Nepodařilo se přihlásit k serveru FTP! + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/cs/tl_nc_language.php b/languages/cs/tl_nc_language.php deleted file mode 100644 index 576db237..00000000 --- a/languages/cs/tl_nc_language.php +++ /dev/null @@ -1,22 +0,0 @@ -čárkou oddělené příjemce. Použijte automatické vyplňování, abyste viděli spuštěné jednoduché tokeny. '; - diff --git a/languages/cs/tl_nc_language.xlf b/languages/cs/tl_nc_language.xlf new file mode 100644 index 00000000..be93b12f --- /dev/null +++ b/languages/cs/tl_nc_language.xlf @@ -0,0 +1,191 @@ + + + + + + Language + Jazyk + + + Please select a language. + Vyberte prosím jazyk. + + + Fallback + Výchozí jazyk + + + Activate this checkbox if this language should be your fallback. + Zaškrtněte tuto možnost, pokud si přejete použít tento jazyk jako výchozí + + + Recipients + Příjemci + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + Zadejte prosím <strong>čárkou</strong> oddělené příjemce. Použijte automatické vyplňování, abyste viděli spuštěné jednoduché tokeny. + + + Attachments via tokens + Přílohy pomocí tokenu + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + + + Attachments from file system + + + Please choose from the file picker if you would like to add static files. + + + Sender name + + + Please enter the sender name. + + + Sender address + + + Please enter the sender email address. + + + Send a CC to + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + + + Send a BCC to + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + + + Reply-to address + + + You can optionally set a reply-to address for this message. + + + Subject + + + Please enter the subject for the e-mail. + + + Mode + + + Choose the mode you would like to be used for this email. + + + Raw text + + + Please enter the text. + + + HTML + + + Please enter the HTML. + + + File name + + + Please enter the file name. + + + Storage mode + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + + + File content + + + Please enter the file content. + + + Text only + + + HTML and text + + + Create new file + + + Override existing file + + + Append to existing file + + + New language + + + Add a new language. + + + Edit language + + + Edit language ID %s. + + + Copy language + + + Copy language ID %s. + + + Delete language + + + Delete language ID %s. + + + Language details + + + Show details for language ID %s. + + + General language settings + + + Attachments + + + Meta information + + + Content + + + The following tokens you have used are not supported by this notification type: %s. + + + External images + + + Do not embed images in HTML emails. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/cs/tl_nc_message.xlf b/languages/cs/tl_nc_message.xlf new file mode 100644 index 00000000..163f9265 --- /dev/null +++ b/languages/cs/tl_nc_message.xlf @@ -0,0 +1,130 @@ + + + + + + Title + + + Please enter a title for this message. + + + Gateway + + + Please select a gateway for this message. + + + Languages + + + Here you can manage the different languages. + + + Manage languages + + + Close + + + Priority + + + Please select a priority. + + + Template file + + + Please choose a template file. + + + Tag + + + Here you can enter the tag. + + + Enable open tracking + + + Here you can enable open tracking. + + + Publish message + + + Include this message when a notification is being sent. + + + New message + + + Create a new message. + + + Edit message + + + Edit message ID %s. + + + Duplicate message + + + Duplicate message ID %s. + + + Move message + + + Move message ID %s. + + + Delete message + + + Delete message ID %s. + + + Toggle visibility of message + + + Toggle visibility of message ID %s. + + + Gateway message + + + Show details for message ID %s. + + + Title & Gateway + + + Languages + + + Expert settings + + + Publish settings + + + very high + + + high + + + normal + + + low + + + very low + + + + diff --git a/languages/cs/tl_nc_notification.xlf b/languages/cs/tl_nc_notification.xlf new file mode 100644 index 00000000..7608d8dc --- /dev/null +++ b/languages/cs/tl_nc_notification.xlf @@ -0,0 +1,112 @@ + + + + + + Title + + + Please enter a title for this notification. + + + Type + + + Please select a type for this notification. + + + Standard eMail gateway + + + Write to file + + + New notification + + + Create a new notification. + + + Manage notifications + + + Manage messages for notification ID %s. + + + Edit notification + + + Edit notification ID %s. + + + Copy notification + + + Copy notification ID %s. + + + Delete notification + + + Delete notification ID %s. + + + Notification details + + + Show details for notification ID %s. + + + Title & type + + + Configuration + + + Contao + + + Form submission + + + This notification type can be sent when the form is submitted. + + + Member registration + + + Member personal data + + + Member lost password + + + Delimiter for lists + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Member activation + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/cs/tl_nc_queue.xlf b/languages/cs/tl_nc_queue.xlf new file mode 100644 index 00000000..a3ba5059 --- /dev/null +++ b/languages/cs/tl_nc_queue.xlf @@ -0,0 +1,70 @@ + + + + + + Source queue gateway + + + Target gateway + + + Source message + + + Date added to queue + + + Date sent from queue + + + Had an error during delivery process + + + Tokens + + + Language + + + Waiting in queue. + + + Error sending the message. Check the system log for more details. + + + Message sent. + + + Source + + + Add to queue again + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + + + Delete queued message (ID %s). + + + Show details + + + Shows details of the queued message ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/cs/tokens.xlf b/languages/cs/tokens.xlf new file mode 100644 index 00000000..f420b750 --- /dev/null +++ b/languages/cs/tokens.xlf @@ -0,0 +1,40 @@ + + + + + + E-mail address of administrator of the current page. + + + All the form fields. + + + All the form fields and their raw values. + + + All the form field labels. + + + E-mail address of administrator of the current page. + + + E-mail address of the member. + + + The current domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + + + Output of template "%s" + + + + diff --git a/languages/de/modules.php b/languages/de/modules.php deleted file mode 100644 index 650cef1f..00000000 --- a/languages/de/modules.php +++ /dev/null @@ -1,23 +0,0 @@ - + + + + + Notification Center + Notification Center + + + Notifications + Benachrichtigungen + + + Manage notifications. + Benachrichtigungen verwalten. + + + Queue + Warteschlange + + + View the message queue. + Anzeigen der Nachrichtenwarteschlange. + + + Gateways + Gateways + + + Manage gateways + Gateways verwalten + + + Lost password (Notification Center) + Passwort vergessen (Notification Center) + + + Generates a form to request a new password and sends the notification using the notification center. + Generiert ein Formular um ein neues Passwort anzufordern und versendet anschließend die Benachrichtigung über das Notification Center. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/de/tl_form.php b/languages/de/tl_form.php deleted file mode 100644 index 788e6099..00000000 --- a/languages/de/tl_form.php +++ /dev/null @@ -1,16 +0,0 @@ - + + + + + Notification + Benachrichtigung + + + Please select a notification. + Bitte wählen Sie eine Benachrichtigung aus. + + + + diff --git a/languages/de/tl_module.php b/languages/de/tl_module.php deleted file mode 100644 index 8f25c57a..00000000 --- a/languages/de/tl_module.php +++ /dev/null @@ -1,18 +0,0 @@ - + + + + + Notification + Benachrichtigung + + + Please select a notification. + Bitte wählen Sie eine Benachrichtigung. + + + Activation notification + Aktivierungsbenachrichtigung + + + Please select an activation notification. + Bitte wählen Sie eine Aktivierungsbenachrichtigung. + + + Notification + + + + diff --git a/languages/de/tl_nc_gateway.php b/languages/de/tl_nc_gateway.php deleted file mode 100644 index a723053c..00000000 --- a/languages/de/tl_nc_gateway.php +++ /dev/null @@ -1,90 +0,0 @@ - + + + + + Title + Titel + + + Please enter a title for this gateway. + Bitte geben Sie einen Titel für dieses Gateway ein. + + + Type + Typ + + + Please select a type for this gateway. + Bitte wählen Sie einen Typen für dieses Gateway. + + + Target gateway + Ziel-Gateway + + + This gateway will queue all the messages and then send them over the gateway you define here. + Dieses Gateway wird alle Nachrichten zuerst in die Warteschlange übertragen. Danach werden sie über das hier gewählte Ziel-Gateway übermittelt. + + + Enable poor man's cronjob + Poor-Man-Cron aktivieren + + + This will register this queue gateway to the poor man's cronjob. + Gateway in Poor-Man-Cron registrieren. + + + Interval + Intervall + + + Choose the interval you would like to have this queue gateway be invoked. + Wählen Sie den Intervall für die Aufrufe der Warteschlange des Gateways. + + + Number of messages + Anzahl Nachrichten + + + Here you can enter the number of messages that should be sent per invocation. + Hier können Sie bestimmen wie viele Nachrichten pro Aurfruf gesendet werden. + + + Override SMTP settings + SMTP-Einstellungen überschreiben + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + Aktivieren Sie diese Checkbox um die Contao SMTP-Einstellungen (Systemeinstellungen) zu überschreiben und sie anschließend zu individualisieren. + + + File type + Dateiformat + + + Please choose the file type. + Bitte wählen Sie ein Dateiformat aus. + + + Connection type + Verbindungstyp + + + Please choose the connection type. + Bitte wählen Sie einen Verbindungstyp aus. + + + Host name + Server + + + Please enter the host name. + Bitte geben Sie den Servernamen ein. + + + Port number + Port + + + Here you can enter the port number. Leave empty to use the default. + Bitte geben Sie die Portnummer ein. Wenn das Feld leer bleibt wird der Standard-Port verwendet. + + + Username + Benutzername + + + Please enter the username. + Bitte geben Sie den FTP-Benutzernamen ein. + + + Password + Passwort + + + Please enter the password. + Bitte geben Sie das zugehörige FTP-Passwort ein. + + + Path + Pfad + + + Here you can enter the path (e.g. <em>downloads</em>). + Hier können Sie den Zielordner bestimmen. (z.B. downloads) + + + Postmark API key + Postmark API-Key + + + Please enter your unique Postmark API key. + Bitte gebe deinen persönlichen Postmark API-Key ein. + + + Enable test mode + Testmodus aktivieren + + + Here you can enable the test mode. + Hier aktivieren Sie den Testmodus. + + + Enable SSL + SSL-Verbindung aktivieren + + + Here you can enable the SSL connection. + Hier können Sie die SSL-Verbindung aktivieren. + + + Send e-mails via SMTP + SMTP-Einstellungen überschreiben + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + Aktivieren Sie diese Checkbox um die Contao SMTP-Einstellungen (Systemeinstellungen) zu überschreiben und sie anschließend zu individualisieren. + + + SMTP hostname + SMTP-Hostname + + + Please enter the host name of the SMTP server. + Bitte geben Sie den Hostnamen des SMTP-Servers ein. + + + SMTP username + SMTP-Benutzername + + + Here you can enter the SMTP username. + Hier können Sie den SMTP-Benutzernamen eingeben. + + + SMTP password + SMTP-Passwort + + + Here you can enter the SMTP password. + Hier können Sie das SMTP-Passwort eingeben. + + + SMTP encryption + SMTP-Verschlüsselung + + + Here you can choose an encryption method (SSL or TLS). + Hier können Sie eine Verschlüsselungsmethode auswählen (SSL oder TLS). + + + SMTP port number + SMTP-Portnummer + + + Please enter the port number of the SMTP server. + Bitte geben Sie die Portnummer des SMTP-Servers ein. + + + Queue + Warteschlange + + + Standard email gateway + Standard E-Mail-Gateway + + + Write to file + In Datei schreiben + + + Postmark (postmarkapp.com) + Postmark (postmarkapp.com) + + + Every minute + Jede Minute + + + Every hour + Jede Stunde + + + Every day + Jeder Tag + + + Every week + Jede Woche + + + Every month + Jeder Monat + + + CSV + CSV + + + Plain Text / XML + Plain Text / XML + + + Local + Lokal + + + FTP + FTP + + + Connection successful + Verbindung erfolgreich! + + + Could not connect to the FTP server! + Verbindung zum FTP-Server konnte nicht hergestellt werden. + + + Could not login to the FTP server! + Login auf FTP-Server fehlgeschlagen. + + + New gateway + Neues Gateway + + + Create a new gateway. + Neues Gateway anlegen. + + + Edit gateway + Gateway editieren + + + Edit gateway ID %s. + Editieren Sie das Gateway ID %s + + + Copy gateway + Gateway duplizieren + + + Copy gateway ID %s. + Editieren Sie das Gateway ID %s + + + Delete gateway + Gateway löschen + + + Delete gateway ID %s. + Löschen Sie das Gateway ID %s + + + Gateway details + Gateway-Details + + + Show details for gateway ID %s. + Details des Gateways ID %s anzeigen. + + + Title & type + Titel & Typ + + + Gateway settings + Gateway Einstellungen + + + Cronjob settings + Cronjob-Einstellungen + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/de/tl_nc_language.php b/languages/de/tl_nc_language.php deleted file mode 100644 index 8f1070f5..00000000 --- a/languages/de/tl_nc_language.php +++ /dev/null @@ -1,73 +0,0 @@ -Komma-separierte Liste von Attachment-Tokens in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##)'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['0'] = 'Dateianhänge vom Dateisystem'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['1'] = 'Bitte wählen Sie mit dem Dateiwähler die statischen Dateien aus, die zur Mail hinzugefügt werden sollen.'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments_legend'] = 'Attachments'; -$GLOBALS['TL_LANG']['tl_nc_language']['content_legend'] = 'Inhalt'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['0'] = 'Sprache kopieren'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['1'] = 'Kopiere Sprache ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['0'] = 'Sprache löschen'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['1'] = 'Sprache mit ID %s löschen.'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['0'] = 'Sprache editieren'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['1'] = 'Sprache ID %s editieren.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_external_images']['0'] = 'Externe Bilder'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_external_images']['1'] = 'Bilder in HTML-E-Mails nicht einbetten.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['0'] = 'HTML'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['1'] = 'Bitte HTML eingeben.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['0'] = 'Modus'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['1'] = 'Bitte den gewünschten Modus für diese E-Mail wählen.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textAndHtml'] = 'HTML und Text'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textOnly'] = 'Nur Text'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['0'] = 'BCC-Empfänger'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['1'] = 'Empfänger die eine Kopie der E-Mail erhalten. Mehrere Adressen per Komma separieren.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['0'] = 'CC-Empfänger'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['1'] = 'Empfänger die eine Kopie der E-Mail erhalten. Mehrere Adressen per Komma separieren.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['0'] = 'Antwort an (Reply-To)'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['1'] = 'Optionale "Antwort an" E-Mail-Adresse.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['0'] = 'Absender-E-Mail'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['1'] = 'Bitte geben Sie die Absender-Adresse ein.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['0'] = 'Absendername'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['1'] = 'Bitte geben Sie den Absender ein.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['0'] = 'Subject'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['1'] = 'Bitte geben Sie den Betreff der E-Mail ein.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['0'] = 'Rohtext'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['1'] = 'Bitte den Text eingeben.'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['0'] = 'Fallback-Sprache'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['1'] = 'Markieren Sie die Checkbox falls dies die Fallback-Sprache ist.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['0'] = 'Datei Inhalt'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['1'] = 'Dateiinhalt eingeben.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['0'] = 'Dateiname'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['1'] = 'Bitte geben Sie den Dateinamen ein.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['0'] = 'Bestehende Datei überschreiben'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['1'] = 'Überschreibt die bestehende Datei.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['0'] = 'Speichermodus'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['1'] = 'Hier können Sie wählen, ob Sie die bestehende Datei überschreiben, oder an sie anhängen wollen.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['append'] = 'Zu einer existierenden Datei hinzufügen'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['create'] = 'Neue Datei erstellen'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['override'] = 'Eine existierende Datei überschreiben'; -$GLOBALS['TL_LANG']['tl_nc_language']['general_legend'] = 'Generelle Spracheinstellungen'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['0'] = 'Sprache'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['1'] = 'Bitte wählen Sie eine Sprache.'; -$GLOBALS['TL_LANG']['tl_nc_language']['meta_legend'] = 'Meta-Informationen'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['0'] = 'Neue Sprache'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['1'] = 'Füge eine neue Sprache hinzu.'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['0'] = 'Empfänger'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['1'] = 'Bitte geben Sie eine Komma-separierte Liste der Empfänger in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##)'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['0'] = 'Sprach-Details'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['1'] = 'Details für ID %s anzeigen.'; -$GLOBALS['TL_LANG']['tl_nc_language']['token_character_error'] = 'Der Inhalt enthält invalide Tokens. Simple Tokens können keines der folgenden Zeichen enthalten: "<>!=*". Sie werden entweder für if-Bedingungen oder als Platzhalter verwendet.'; -$GLOBALS['TL_LANG']['tl_nc_language']['token_error'] = 'Die folgenden eingesetzten Tokens werden vom Notification-Typ nicht unterstützt: %s.'; - diff --git a/languages/de/tl_nc_language.xlf b/languages/de/tl_nc_language.xlf new file mode 100644 index 00000000..820e41fd --- /dev/null +++ b/languages/de/tl_nc_language.xlf @@ -0,0 +1,241 @@ + + + + + + Language + Sprache + + + Please select a language. + Bitte wählen Sie eine Sprache. + + + Fallback + Fallback-Sprache + + + Activate this checkbox if this language should be your fallback. + Markieren Sie die Checkbox falls dies die Fallback-Sprache ist. + + + Recipients + Empfänger + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + Bitte geben Sie eine <strong>Komma-separierte</strong> Liste der Empfänger in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##) + + + Attachments via tokens + Dateianhänge via Tokens + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + Bitte geben Sie eine <strong>Komma-separierte</strong> Liste von Attachment-Tokens in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##) + + + Attachments from file system + Dateianhänge vom Dateisystem + + + Please choose from the file picker if you would like to add static files. + Bitte wählen Sie mit dem Dateiwähler die statischen Dateien aus, die zur Mail hinzugefügt werden sollen. + + + Sender name + Absendername + + + Please enter the sender name. + Bitte geben Sie den Absender ein. + + + Sender address + Absender-E-Mail + + + Please enter the sender email address. + Bitte geben Sie die Absender-Adresse ein. + + + Send a CC to + CC-Empfänger + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + Empfänger die eine Kopie der E-Mail erhalten. Mehrere Adressen per Komma separieren. + + + Send a BCC to + BCC-Empfänger + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + Empfänger die eine Kopie der E-Mail erhalten. Mehrere Adressen per Komma separieren. + + + Reply-to address + Antwort an (Reply-To) + + + You can optionally set a reply-to address for this message. + Optionale "Antwort an" E-Mail-Adresse. + + + Subject + Subject + + + Please enter the subject for the e-mail. + Bitte geben Sie den Betreff der E-Mail ein. + + + Mode + Modus + + + Choose the mode you would like to be used for this email. + Bitte den gewünschten Modus für diese E-Mail wählen. + + + Raw text + Rohtext + + + Please enter the text. + Bitte den Text eingeben. + + + HTML + HTML + + + Please enter the HTML. + Bitte HTML eingeben. + + + External images + Externe Bilder + + + Do not embed images in HTML emails. + Bilder in HTML-E-Mails nicht einbetten. + + + File name + Dateiname + + + Please enter the file name. + Bitte geben Sie den Dateinamen ein. + + + Storage mode + Speichermodus + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + Hier können Sie wählen, ob Sie die bestehende Datei überschreiben, oder an sie anhängen wollen. + + + File content + Datei Inhalt + + + Please enter the file content. + Dateiinhalt eingeben. + + + Text only + Nur Text + + + HTML and text + HTML und Text + + + Create new file + Neue Datei erstellen + + + Override existing file + Eine existierende Datei überschreiben + + + Append to existing file + Zu einer existierenden Datei hinzufügen + + + New language + Neue Sprache + + + Add a new language. + Füge eine neue Sprache hinzu. + + + Edit language + Sprache editieren + + + Edit language ID %s. + Sprache ID %s editieren. + + + Copy language + Sprache kopieren + + + Copy language ID %s. + Kopiere Sprache ID %s. + + + Delete language + Sprache löschen + + + Delete language ID %s. + Sprache mit ID %s löschen. + + + Language details + Sprach-Details + + + Show details for language ID %s. + Details für ID %s anzeigen. + + + General language settings + Generelle Spracheinstellungen + + + Attachments + Attachments + + + Meta information + Meta-Informationen + + + Content + Inhalt + + + The following tokens you have used are not supported by this notification type: %s. + Die folgenden eingesetzten Tokens werden vom Notification-Typ nicht unterstützt: %s. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + Der Inhalt enthält invalide Tokens. Simple Tokens können keines der folgenden Zeichen enthalten: "<>!=*". Sie werden entweder für if-Bedingungen oder als Platzhalter verwendet. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/de/tl_nc_message.php b/languages/de/tl_nc_message.php deleted file mode 100644 index 9b50440f..00000000 --- a/languages/de/tl_nc_message.php +++ /dev/null @@ -1,55 +0,0 @@ - + + + + + Title + Titel + + + Please enter a title for this message. + Bitte geben Sie einen Namen für diese Nachricht ein. + + + Gateway + Gateway + + + Please select a gateway for this message. + Bitte wählen Sie einen Gateway für diese Nachricht. + + + Languages + Sprachen + + + Here you can manage the different languages. + Hier können Sie die verschiedenen Sprachen verwalten. + + + Manage languages + Sprachen verwalten + + + Close + Schliessen + + + Priority + Priorität + + + Please select a priority. + Bitte wählen Sie die Priorität aus. + + + Template file + Template-Datei + + + Please choose a template file. + Bitte wählen Sie eine Template-Datei aus. + + + Tag + Schlagwort + + + Here you can enter the tag. + Hier können Sie ein Schlagwort definieren. + + + Enable open tracking + Open-Tracking aktivieren + + + Here you can enable open tracking. + Hier können Sie das "Open-Tracking" aktivieren. + + + Publish message + Nachricht veröffentlichen + + + Include this message when a notification is being sent. + Diese Nachricht einfügen beim Versenden der Notification. + + + New message + Neue Nachricht + + + Create a new message. + Eine neue Nachricht hinzufügen. + + + Edit message + Nachricht editieren + + + Edit message ID %s. + Nachricht ID %s editieren. + + + Duplicate message + Nachricht kopieren + + + Duplicate message ID %s. + Nachricht mit ID %s kopieren. + + + Move message + Nachricht verschieben + + + Move message ID %s. + Nachricht mit ID %s verschieben. + + + Delete message + Nachricht löschen + + + Delete message ID %s. + Nachricht mit ID %s löschen. + + + Toggle visibility of message + Nachricht ein-/ausblenden + + + Toggle visibility of message ID %s. + Blende die Nachricht ID %s ein/aus. + + + Gateway message + Nachrichtendetails + + + Show details for message ID %s. + Details für Nachricht ID %s anzeigen. + + + Title & Gateway + Titel & Gateway + + + Languages + Sprachen + + + Expert settings + Experteneinstellungen + + + Publish settings + Einstellungen veröffentlichen + + + very high + sehr hoch + + + high + hoch + + + normal + normal + + + low + tief + + + very low + sehr tief + + + + diff --git a/languages/de/tl_nc_notification.php b/languages/de/tl_nc_notification.php deleted file mode 100644 index cfb34f58..00000000 --- a/languages/de/tl_nc_notification.php +++ /dev/null @@ -1,42 +0,0 @@ - + + + + + Title + Titel + + + Please enter a title for this notification. + Bitte geben Sie einen Namen für diese Benachrichtigung ein. + + + Type + Benachrichtigungstyp + + + Please select a type for this notification. + Bitte wählen Sie einen Benachrichtigungstyp aus. + + + Delimiter for lists + Trennzeichen für Listen + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Standard eMail gateway + Standard eMail Gateway + + + Write to file + In Datei schreiben + + + New notification + Neue Benachrichtigung + + + Create a new notification. + Neue Benachrichtigung erstellen. + + + Manage notifications + Benachrichtigung editieren + + + Manage messages for notification ID %s. + Benachrichtigung ID %s editieren. + + + Edit notification + Benachrichtigung bearbeiten + + + Edit notification ID %s. + Benachrichtigung ID %s editieren. + + + Copy notification + Benachrichtigung kopieren + + + Copy notification ID %s. + Benachrichtigung ID %s kopieren. + + + Delete notification + Benachrichtigung löschen + + + Delete notification ID %s. + Benachrichtigung ID %s löschen. + + + Notification details + Benachrichtigungsdetails + + + Show details for notification ID %s. + Details für Benachrichtigung ID %s anzeigen. + + + Title & type + Titel & Benachrichtigungstyp + + + Configuration + Konfiguration + + + Contao + Contao + + + Form submission + Formularübertragung + + + This notification type can be sent when the form is submitted. + Dieser Benachrichtigungstyp wird nach erfolgreicher Formularübertragung versendet. + + + Member activation + Mitglied: Aktivierung + + + Member registration + Mitglieds Registration + + + Member personal data + Mitglied: Persönliche Daten + + + Member lost password + Mitglied: Passwort vergessen + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/de/tl_nc_queue.php b/languages/de/tl_nc_queue.php deleted file mode 100644 index ad01c105..00000000 --- a/languages/de/tl_nc_queue.php +++ /dev/null @@ -1,26 +0,0 @@ - + + + + + Source queue gateway + + + Target gateway + Ziel Gateway + + + Source message + + + Date added to queue + + + Date sent from queue + + + Had an error during delivery process + Fehler bei der Auslierfung + + + Tokens + Tokens + + + Language + Sprache + + + Waiting in queue. + In der Warteschlange + + + Error sending the message. Check the system log for more details. + + + Message sent. + Nachricht gesendet. + + + Source + Quelle + + + Add to queue again + Nochmals zur Warteschlange hinzufügen + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + Warteschlangennachricht löschen + + + Delete queued message (ID %s). + Warteschlangennachricht löschen (ID %s). + + + Show details + Details anzeigen + + + Shows details of the queued message ID %s. + Zeige + + + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/de/tokens.php b/languages/de/tokens.php deleted file mode 100644 index 19e3798f..00000000 --- a/languages/de/tokens.php +++ /dev/null @@ -1,22 +0,0 @@ - + + + + + E-mail address of administrator of the current page. + E-Mail-Adresse des aktuellen Seitenadministrator. + + + All the form fields. + Alle Formular-Felder. + + + All the form field labels. + Alle Formularfelder und ihre Labels + + + All the form fields and their raw values. + Alle Formular Felder und ihr Rohinhalt. + + + E-mail address of administrator of the current page. + E-Mail-Adresse des Administrators der aktuellen Seite. + + + E-mail address of the member. + E-Mail-Adresse des Mitglieds. + + + The current domain. + Die aktuelle Domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + Flag (0 oder 1). das anzeigt, ob sich ein Feld geändert hat. Zur Verwendung in if-Bedingungen. + + + Output of template "%s" + + + + diff --git a/languages/en/modules.php b/languages/en/modules.php deleted file mode 100644 index e0485639..00000000 --- a/languages/en/modules.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @license LGPL - */ - -/** - * Backend Modules - */ -$GLOBALS['TL_LANG']['MOD']['notification_center'] = 'Notification Center'; -$GLOBALS['TL_LANG']['MOD']['nc_notifications'] = array('Notifications', 'Manage notifications.'); -$GLOBALS['TL_LANG']['MOD']['nc_queue'] = array('Queue', 'View the message queue.'); -$GLOBALS['TL_LANG']['MOD']['nc_gateways'] = array('Gateways', 'Manage gateways'); - -/** - * Front end modules - */ -$GLOBALS['TL_LANG']['FMD']['lostPasswordNotificationCenter'] = array('Lost password (Notification Center)', 'Generates a form to request a new password and sends the notification using the notification center.'); -$GLOBALS['TL_LANG']['FMD']['newsletterSubscribeNotificationCenter'] = array('Subscribe (Notification Center)', 'Generates a form to subscribe to one or more channels and sends the notification using the notification center.'); -$GLOBALS['TL_LANG']['FMD']['newsletterActivateNotificationCenter'] = array('Activate (Notification Center)', 'Generates a form to activate subscription to one or more channels the notification using the notification center.'); -$GLOBALS['TL_LANG']['FMD']['newsletterUnsubscribeNotificationCenter'] = array('Unsubscribe (Notification Center)', 'Generates a form to unsubscribe from one or more channels and sends the notification using the notification center.'); diff --git a/languages/en/modules.xlf b/languages/en/modules.xlf new file mode 100644 index 00000000..1c0aa387 --- /dev/null +++ b/languages/en/modules.xlf @@ -0,0 +1,67 @@ + + + + + + Notification Center + Notification Center + + + Notifications + Notifications + + + Manage notifications. + Manage notifications. + + + Queue + Queue + + + View the message queue. + View the message queue. + + + Gateways + Gateways + + + Manage gateways + Manage gateways + + + Lost password (Notification Center) + Lost password (Notification Center) + + + Generates a form to request a new password and sends the notification using the notification center. + Generates a form to request a new password and sends the notification using the notification center. + + + Subscribe (Notification Center) + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/en/tl_form.php b/languages/en/tl_form.php deleted file mode 100644 index 8211f3e1..00000000 --- a/languages/en/tl_form.php +++ /dev/null @@ -1,14 +0,0 @@ - - * @license LGPL - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_form']['nc_notification'] = array('Notification', 'Please select a notification.'); \ No newline at end of file diff --git a/languages/en/tl_form.xlf b/languages/en/tl_form.xlf new file mode 100644 index 00000000..802aa4dc --- /dev/null +++ b/languages/en/tl_form.xlf @@ -0,0 +1,15 @@ + + + + + + Notification + Notification + + + Please select a notification. + Please select a notification. + + + + diff --git a/languages/en/tl_module.php b/languages/en/tl_module.php deleted file mode 100644 index 59b957bb..00000000 --- a/languages/en/tl_module.php +++ /dev/null @@ -1,16 +0,0 @@ - - * @license LGPL - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_module']['notification_legend'] = 'Notification'; -$GLOBALS['TL_LANG']['tl_module']['nc_notification'] = array('Notification', 'Please select a notification.'); -$GLOBALS['TL_LANG']['tl_module']['nc_activation_notification'] = array('Activation notification', 'Please select an activation notification.'); diff --git a/languages/en/tl_module.xlf b/languages/en/tl_module.xlf new file mode 100644 index 00000000..c815a158 --- /dev/null +++ b/languages/en/tl_module.xlf @@ -0,0 +1,27 @@ + + + + + + Notification + Notification + + + Please select a notification. + Please select a notification. + + + Activation notification + Activation notification + + + Please select an activation notification. + Please select an activation notification. + + + Notification + Notification + + + + diff --git a/languages/en/tl_nc_gateway.php b/languages/en/tl_nc_gateway.php deleted file mode 100644 index 55185893..00000000 --- a/languages/en/tl_nc_gateway.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @license LGPL - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_nc_gateway']['title'] = array('Title', 'Please enter a title for this gateway.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['type'] = array('Type', 'Please select a type for this gateway.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_targetGateway'] = array('Target gateway', 'This gateway will queue all the messages and then send them over the gateway you define here.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_delay'] = array('Delayed delivery', 'Enter a strtotime time interval to delay message delivery (e.g. +1 day).'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronEnable'] = array('Enable poor man\'s cronjob', 'This will register this queue gateway to the poor man\'s cronjob.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval'] = array('Interval', 'Choose the interval you would like to have this queue gateway be invoked.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronMessages'] = array('Number of messages', 'Here you can enter the number of messages that should be sent per invocation.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['email_overrideSmtp'] = array('Override SMTP settings', 'This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type'] = array('File type', 'Please choose the file type.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_connection'] = array('Connection type', 'Please choose the connection type.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_host'] = array('Host name', 'Please enter the host name.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port'] = array('Port number', 'Here you can enter the port number. Leave empty to use the default.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username'] = array('Username', 'Please enter the username.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_password'] = array('Password', 'Please enter the password.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_path'] = array('Path', 'Here you can enter the path (e.g. downloads).'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_key'] = array('Postmark API key', 'Please enter your unique Postmark API key.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_test'] = array('Enable test mode', 'Here you can enable the test mode.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_ssl'] = array('Enable SSL', 'Here you can enable the SSL connection.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['useSMTP'] = array('Send e-mails via SMTP', 'Use an SMTP server instead of the PHP mail() function to send e-mails.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpHost'] = array('SMTP hostname', 'Please enter the host name of the SMTP server.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpUser'] = array('SMTP username', 'Here you can enter the SMTP username.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPass'] = array('SMTP password', 'Here you can enter the SMTP password.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpEnc'] = array('SMTP encryption', 'Here you can choose an encryption method (SSL or TLS).'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPort'] = array('SMTP port number', 'Please enter the port number of the SMTP server.'); - - -/** - * Reference - */ -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['queue'] = 'Queue'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['email'] = 'Standard email gateway'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['file'] = 'Write to file'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['postmark'] = 'Postmark (postmarkapp.com)'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['minutely'] = 'Every minute'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['hourly'] = 'Every hour'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['daily'] = 'Every day'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['weekly'] = 'Every week'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['monthly'] = 'Every month'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['csv'] = 'CSV'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['xml'] = 'Plain Text / XML'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_connection']['local'] = 'Local'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_connection']['ftp'] = 'FTP'; - -/** - * Messages - */ -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_confirm'] = 'Connection successful'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_connect'] = 'Could not connect to the FTP server!'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_login'] = 'Could not login to the FTP server!'; - -/** - * Buttons - */ -$GLOBALS['TL_LANG']['tl_nc_gateway']['new'] = array('New gateway', 'Create a new gateway.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['edit'] = array('Edit gateway', 'Edit gateway ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['copy'] = array('Copy gateway', 'Copy gateway ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['delete'] = array('Delete gateway', 'Delete gateway ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_gateway']['show'] = array('Gateway details', 'Show details for gateway ID %s.'); - -/** - * Legends - */ -$GLOBALS['TL_LANG']['tl_nc_gateway']['title_legend'] = 'Title & type'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['gateway_legend'] = 'Gateway settings'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['cronjob_legend'] = 'Cronjob settings'; - -/** - * Others - */ -$GLOBALS['TL_LANG']['queueCronjobExplanation'] = 'Queued messages will remain in the queue forever unless -you trigger the sending mechanism by either using a real cron job or -the Contao internal poor man\'s cronjob. The Notification Center is shipped -with a binary that can be executed using a real cronjob. To setup a real cronjob -that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, -you would need to setup the following crontab: -
*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15

-or let\'s say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: -
5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30

-If you don\'t have access to real cronjobs then you can enable the poor man\'s cron. Note that it doesn\'t provide the same -flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by -PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. -

-Note: When you installed the notification center using Composer, the path to the binary differs: -
-/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue -
-'; diff --git a/languages/en/tl_nc_gateway.xlf b/languages/en/tl_nc_gateway.xlf new file mode 100644 index 00000000..cb5817dd --- /dev/null +++ b/languages/en/tl_nc_gateway.xlf @@ -0,0 +1,353 @@ + + + + + + Title + Title + + + Please enter a title for this gateway. + Please enter a title for this gateway. + + + Type + Type + + + Please select a type for this gateway. + Please select a type for this gateway. + + + Target gateway + Target gateway + + + This gateway will queue all the messages and then send them over the gateway you define here. + This gateway will queue all the messages and then send them over the gateway you define here. + + + Enable poor man's cronjob + Enable poor man's cronjob + + + This will register this queue gateway to the poor man's cronjob. + This will register this queue gateway to the poor man's cronjob. + + + Interval + Interval + + + Choose the interval you would like to have this queue gateway be invoked. + Choose the interval you would like to have this queue gateway be invoked. + + + Number of messages + Number of messages + + + Here you can enter the number of messages that should be sent per invocation. + Here you can enter the number of messages that should be sent per invocation. + + + Override SMTP settings + Override SMTP settings + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + + + File type + File type + + + Please choose the file type. + Please choose the file type. + + + Connection type + Connection type + + + Please choose the connection type. + Please choose the connection type. + + + Host name + Host name + + + Please enter the host name. + Please enter the host name. + + + Port number + Port number + + + Here you can enter the port number. Leave empty to use the default. + Here you can enter the port number. Leave empty to use the default. + + + Username + Username + + + Please enter the username. + Please enter the username. + + + Password + Password + + + Please enter the password. + Please enter the password. + + + Path + Path + + + Here you can enter the path (e.g. <em>downloads</em>). + Here you can enter the path (e.g. <em>downloads</em>). + + + Postmark API key + Postmark API key + + + Please enter your unique Postmark API key. + Please enter your unique Postmark API key. + + + Enable test mode + Enable test mode + + + Here you can enable the test mode. + Here you can enable the test mode. + + + Enable SSL + Enable SSL + + + Here you can enable the SSL connection. + Here you can enable the SSL connection. + + + Send e-mails via SMTP + Send e-mails via SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + Use an SMTP server instead of the PHP mail() function to send e-mails. + + + SMTP hostname + SMTP hostname + + + Please enter the host name of the SMTP server. + Please enter the host name of the SMTP server. + + + SMTP username + SMTP username + + + Here you can enter the SMTP username. + Here you can enter the SMTP username. + + + SMTP password + SMTP password + + + Here you can enter the SMTP password. + Here you can enter the SMTP password. + + + SMTP encryption + SMTP encryption + + + Here you can choose an encryption method (SSL or TLS). + Here you can choose an encryption method (SSL or TLS). + + + SMTP port number + SMTP port number + + + Please enter the port number of the SMTP server. + Please enter the port number of the SMTP server. + + + Queue + Queue + + + Standard email gateway + Standard email gateway + + + Write to file + Write to file + + + Postmark (postmarkapp.com) + Postmark (postmarkapp.com) + + + Every minute + Every minute + + + Every hour + Every hour + + + Every day + Every day + + + Every week + Every week + + + Every month + Every month + + + CSV + CSV + + + Plain Text / XML + Plain Text / XML + + + Local + Local + + + FTP + FTP + + + Connection successful + Connection successful + + + Could not connect to the FTP server! + Could not connect to the FTP server! + + + Could not login to the FTP server! + Could not login to the FTP server! + + + New gateway + New gateway + + + Create a new gateway. + Create a new gateway. + + + Edit gateway + Edit gateway + + + Edit gateway ID %s. + Edit gateway ID %s. + + + Copy gateway + Copy gateway + + + Copy gateway ID %s. + Copy gateway ID %s. + + + Delete gateway + Delete gateway + + + Delete gateway ID %s. + Delete gateway ID %s. + + + Gateway details + Gateway details + + + Show details for gateway ID %s. + Show details for gateway ID %s. + + + Title & type + Title & type + + + Gateway settings + Gateway settings + + + Cronjob settings + Cronjob settings + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Delayed delivery + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/en/tl_nc_language.php b/languages/en/tl_nc_language.php deleted file mode 100644 index 5359b736..00000000 --- a/languages/en/tl_nc_language.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @license LGPL - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_nc_language']['language'] = array('Language', 'Please select a language.'); -$GLOBALS['TL_LANG']['tl_nc_language']['fallback'] = array('Fallback', 'Activate this checkbox if this language should be your fallback.'); -$GLOBALS['TL_LANG']['tl_nc_language']['recipients'] = array('Recipients', 'Please enter a comma-separated list of recipients in this field. Use the autocompleter to see the available simple tokens.'); -$GLOBALS['TL_LANG']['tl_nc_language']['attachment_tokens'] = array('Attachments via tokens', 'Please enter a comma-separated list of attachment tokens in this field. Use the autocompleter to see the available simple tokens.'); -$GLOBALS['TL_LANG']['tl_nc_language']['attachments'] = array('Attachments from file system', 'Please choose from the file picker if you would like to add static files.'); -$GLOBALS['TL_LANG']['tl_nc_language']['attachment_templates'] = array('Attachments from templates', 'These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name'] = array('Sender name', 'Please enter the sender name.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address'] = array('Sender address', 'Please enter the sender email address.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc'] = array('Send a CC to', 'Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc'] = array('Send a BCC to', 'Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo'] = array('Reply-to address', 'You can optionally set a reply-to address for this message.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject'] = array('Subject', 'Please enter the subject for the e-mail.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode'] = array('Mode', 'Choose the mode you would like to be used for this email.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_text'] = array('Raw text', 'Please enter the text.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_html'] = array('HTML', 'Please enter the HTML.'); -$GLOBALS['TL_LANG']['tl_nc_language']['email_external_images'] = array('External images', 'Do not embed images in HTML emails.'); -$GLOBALS['TL_LANG']['tl_nc_language']['file_name'] = array('File name', 'Please enter the file name.'); -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode'] = array('Storage mode', 'Here you can choose whether you want to override the existing file or append to an existing file if present.'); -$GLOBALS['TL_LANG']['tl_nc_language']['file_content'] = array('File content', 'Please enter the file content.'); - -/** - * Reference - */ -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textOnly'] = 'Text only'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textAndHtml'] = 'HTML and text'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['create'] = 'Create new file'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['override'] = 'Override existing file'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['append'] = 'Append to existing file'; - -/** - * Buttons - */ -$GLOBALS['TL_LANG']['tl_nc_language']['new'] = array('New language', 'Add a new language.'); -$GLOBALS['TL_LANG']['tl_nc_language']['edit'] = array('Edit language', 'Edit language ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_language']['copy'] = array('Copy language', 'Copy language ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_language']['delete'] = array('Delete language', 'Delete language ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_language']['show'] = array('Language details', 'Show details for language ID %s.'); - -/** - * Legends - */ -$GLOBALS['TL_LANG']['tl_nc_language']['general_legend'] = 'General language settings'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments_legend'] = 'Attachments'; -$GLOBALS['TL_LANG']['tl_nc_language']['meta_legend'] = 'Meta information'; -$GLOBALS['TL_LANG']['tl_nc_language']['content_legend'] = 'Content'; - -/** - * Errors - */ -$GLOBALS['TL_LANG']['tl_nc_language']['token_error'] = 'The following tokens you have used are not supported by this notification type: %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['token_character_error'] = 'Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard.'; diff --git a/languages/en/tl_nc_language.xlf b/languages/en/tl_nc_language.xlf new file mode 100644 index 00000000..c430ffe2 --- /dev/null +++ b/languages/en/tl_nc_language.xlf @@ -0,0 +1,243 @@ + + + + + + Language + Language + + + Please select a language. + Please select a language. + + + Fallback + Fallback + + + Activate this checkbox if this language should be your fallback. + Activate this checkbox if this language should be your fallback. + + + Recipients + Recipients + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + + + Attachments via tokens + Attachments via tokens + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + + + Attachments from file system + Attachments from file system + + + Please choose from the file picker if you would like to add static files. + Please choose from the file picker if you would like to add static files. + + + Sender name + Sender name + + + Please enter the sender name. + Please enter the sender name. + + + Sender address + Sender address + + + Please enter the sender email address. + Please enter the sender email address. + + + Send a CC to + Send a CC to + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + + + Send a BCC to + Send a BCC to + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + + + Reply-to address + Reply-to address + + + You can optionally set a reply-to address for this message. + You can optionally set a reply-to address for this message. + + + Subject + Subject + + + Please enter the subject for the e-mail. + Please enter the subject for the e-mail. + + + Mode + Mode + + + Choose the mode you would like to be used for this email. + Choose the mode you would like to be used for this email. + + + Raw text + Raw text + + + Please enter the text. + Please enter the text. + + + HTML + HTML + + + Please enter the HTML. + Please enter the HTML. + + + External images + External images + + + Do not embed images in HTML emails. + Do not embed images in HTML emails. + + + File name + File name + + + Please enter the file name. + Please enter the file name. + + + Storage mode + Storage mode + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + Here you can choose whether you want to override the existing file or append to an existing file if present. + + + File content + File content + + + Please enter the file content. + Please enter the file content. + + + Text only + Text only + + + HTML and text + HTML and text + + + Create new file + Create new file + + + Override existing file + Override existing file + + + Append to existing file + Append to existing file + + + New language + New language + + + Add a new language. + Add a new language. + + + Edit language + Edit language + + + Edit language ID %s. + Edit language ID %s. + + + Copy language + Copy language + + + Copy language ID %s. + Copy language ID %s. + + + Delete language + Delete language + + + Delete language ID %s. + Delete language ID %s. + + + Language details + Language details + + + Show details for language ID %s. + Show details for language ID %s. + + + General language settings + General language settings + + + Attachments + Attachments + + + Meta information + Meta information + + + Content + Content + + + The following tokens you have used are not supported by this notification type: %s. + The following tokens you have used are not supported by this notification type: %s. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + + + Attachments from templates + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/en/tl_nc_message.php b/languages/en/tl_nc_message.php deleted file mode 100644 index fc3bea29..00000000 --- a/languages/en/tl_nc_message.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license LGPL - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_nc_message']['title'] = array('Title', 'Please enter a title for this message.'); -$GLOBALS['TL_LANG']['tl_nc_message']['gateway'] = array('Gateway', 'Please select a gateway for this message.'); -$GLOBALS['TL_LANG']['tl_nc_message']['languages'] = array('Languages', 'Here you can manage the different languages.', 'Manage languages', 'Close'); -$GLOBALS['TL_LANG']['tl_nc_message']['email_priority'] = array('Priority', 'Please select a priority.'); -$GLOBALS['TL_LANG']['tl_nc_message']['email_template'] = array('Template file', 'Please choose a template file.'); -$GLOBALS['TL_LANG']['tl_nc_message']['postmark_tag'] = array('Tag', 'Here you can enter the tag.'); -$GLOBALS['TL_LANG']['tl_nc_message']['postmark_trackOpens'] = array('Enable open tracking', 'Here you can enable open tracking.'); -$GLOBALS['TL_LANG']['tl_nc_message']['published'] = array('Publish message', 'Include this message when a notification is being sent.'); - -/** - * Buttons - */ -$GLOBALS['TL_LANG']['tl_nc_message']['new'] = array('New message', 'Create a new message.'); -$GLOBALS['TL_LANG']['tl_nc_message']['edit'] = array('Edit message', 'Edit message ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_message']['copy'] = array('Duplicate message', 'Duplicate message ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_message']['cut'] = array('Move message', 'Move message ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_message']['delete'] = array('Delete message', 'Delete message ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_message']['toggle'] = array('Toggle visibility of message', 'Toggle visibility of message ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_message']['show'] = array('Gateway message', 'Show details for message ID %s.'); - -/** - * Legends - */ -$GLOBALS['TL_LANG']['tl_nc_message']['title_legend'] = 'Title & Gateway'; -$GLOBALS['TL_LANG']['tl_nc_message']['languages_legend'] = 'Languages'; -$GLOBALS['TL_LANG']['tl_nc_message']['expert_legend'] = 'Expert settings'; -$GLOBALS['TL_LANG']['tl_nc_message']['publish_legend'] = 'Publish settings'; - -/** - * References - */ -$GLOBALS['TL_LANG']['tl_nc_message']['email_priority_options']['1'] = 'very high'; -$GLOBALS['TL_LANG']['tl_nc_message']['email_priority_options']['2'] = 'high'; -$GLOBALS['TL_LANG']['tl_nc_message']['email_priority_options']['3'] = 'normal'; -$GLOBALS['TL_LANG']['tl_nc_message']['email_priority_options']['4'] = 'low'; -$GLOBALS['TL_LANG']['tl_nc_message']['email_priority_options']['5'] = 'very low'; diff --git a/languages/en/tl_nc_message.xlf b/languages/en/tl_nc_message.xlf new file mode 100644 index 00000000..900154cd --- /dev/null +++ b/languages/en/tl_nc_message.xlf @@ -0,0 +1,171 @@ + + + + + + Title + Title + + + Please enter a title for this message. + Please enter a title for this message. + + + Gateway + Gateway + + + Please select a gateway for this message. + Please select a gateway for this message. + + + Languages + Languages + + + Here you can manage the different languages. + Here you can manage the different languages. + + + Manage languages + Manage languages + + + Close + Close + + + Priority + Priority + + + Please select a priority. + Please select a priority. + + + Template file + Template file + + + Please choose a template file. + Please choose a template file. + + + Tag + Tag + + + Here you can enter the tag. + Here you can enter the tag. + + + Enable open tracking + Enable open tracking + + + Here you can enable open tracking. + Here you can enable open tracking. + + + Publish message + Publish message + + + Include this message when a notification is being sent. + Include this message when a notification is being sent. + + + New message + New message + + + Create a new message. + Create a new message. + + + Edit message + Edit message + + + Edit message ID %s. + Edit message ID %s. + + + Duplicate message + Duplicate message + + + Duplicate message ID %s. + Duplicate message ID %s. + + + Move message + Move message + + + Move message ID %s. + Move message ID %s. + + + Delete message + Delete message + + + Delete message ID %s. + Delete message ID %s. + + + Toggle visibility of message + Toggle visibility of message + + + Toggle visibility of message ID %s. + Toggle visibility of message ID %s. + + + Gateway message + Gateway message + + + Show details for message ID %s. + Show details for message ID %s. + + + Title & Gateway + Title & Gateway + + + Languages + Languages + + + Expert settings + Expert settings + + + Publish settings + Publish settings + + + very high + very high + + + high + high + + + normal + normal + + + low + low + + + very low + very low + + + + diff --git a/languages/en/tl_nc_notification.php b/languages/en/tl_nc_notification.php deleted file mode 100644 index 63844e97..00000000 --- a/languages/en/tl_nc_notification.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @license LGPL - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_nc_notification']['title'] = array('Title', 'Please enter a title for this notification.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type'] = array('Type', 'Please select a type for this notification.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['flatten_delimiter'] = array('Delimiter for lists', 'When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['templates'] = array('Token Templates', 'Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token.'); - -/** - * Reference - */ -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['email'] = 'Standard eMail gateway'; -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['file'] = 'Write to file'; - -/** - * Buttons - */ -$GLOBALS['TL_LANG']['tl_nc_notification']['new'] = array('New notification', 'Create a new notification.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['edit'] = array('Manage notifications', 'Manage messages for notification ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['editheader'] = array('Edit notification', 'Edit notification ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['copy'] = array('Copy notification', 'Copy notification ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['delete'] = array('Delete notification', 'Delete notification ID %s.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['show'] = array('Notification details', 'Show details for notification ID %s.'); - -/** - * Legends - */ -$GLOBALS['TL_LANG']['tl_nc_notification']['title_legend'] = 'Title & type'; -$GLOBALS['TL_LANG']['tl_nc_notification']['config_legend'] = 'Configuration'; -$GLOBALS['TL_LANG']['tl_nc_notification']['templates_legend'] = 'Templates'; - -/** - * Notification types - */ -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['contao'] = 'Contao'; -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['core_form'] = array('Form submission', 'This notification type can be sent when the form is submitted.'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['member_activation'] = array('Member activation'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['member_registration'] = array('Member registration'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['member_personaldata'] = array('Member personal data'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['member_password'] = array('Member lost password'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['newsletter_subscribe'] = array('Newsletter subscribed'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['newsletter_activate'] = array('Newsletter activation'); -$GLOBALS['TL_LANG']['tl_nc_notification']['type']['newsletter_unsubscribe'] = array('Newsletter unsubscribed'); diff --git a/languages/en/tl_nc_notification.xlf b/languages/en/tl_nc_notification.xlf new file mode 100644 index 00000000..86d7e425 --- /dev/null +++ b/languages/en/tl_nc_notification.xlf @@ -0,0 +1,147 @@ + + + + + + Title + Title + + + Please enter a title for this notification. + Please enter a title for this notification. + + + Type + Type + + + Please select a type for this notification. + Please select a type for this notification. + + + Delimiter for lists + Delimiter for lists + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Standard eMail gateway + Standard eMail gateway + + + Write to file + Write to file + + + New notification + New notification + + + Create a new notification. + Create a new notification. + + + Manage notifications + Manage notifications + + + Manage messages for notification ID %s. + Manage messages for notification ID %s. + + + Edit notification + Edit notification + + + Edit notification ID %s. + Edit notification ID %s. + + + Copy notification + Copy notification + + + Copy notification ID %s. + Copy notification ID %s. + + + Delete notification + Delete notification + + + Delete notification ID %s. + Delete notification ID %s. + + + Notification details + Notification details + + + Show details for notification ID %s. + Show details for notification ID %s. + + + Title & type + Title & type + + + Configuration + Configuration + + + Contao + Contao + + + Form submission + Form submission + + + This notification type can be sent when the form is submitted. + This notification type can be sent when the form is submitted. + + + Member activation + Member activation + + + Member registration + Member registration + + + Member personal data + Member personal data + + + Member lost password + Member lost password + + + Token Templates + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + Templates + + + Newsletter subscribed + Newsletter subscribed + + + Newsletter activation + Newsletter activation + + + Newsletter unsubscribed + Newsletter unsubscribed + + + + diff --git a/languages/en/tl_nc_queue.php b/languages/en/tl_nc_queue.php deleted file mode 100644 index 055b5a2c..00000000 --- a/languages/en/tl_nc_queue.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @license LGPL - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_nc_queue']['sourceQueue'][0] = 'Source queue gateway'; -$GLOBALS['TL_LANG']['tl_nc_queue']['targetGateway'][0] = 'Target gateway'; -$GLOBALS['TL_LANG']['tl_nc_queue']['message'][0] = 'Source message'; -$GLOBALS['TL_LANG']['tl_nc_queue']['dateAdded'][0] = 'Date added to queue'; -$GLOBALS['TL_LANG']['tl_nc_queue']['dateDelay'][0] = 'Date delayed in queue'; -$GLOBALS['TL_LANG']['tl_nc_queue']['dateSent'][0] = 'Date sent from queue'; -$GLOBALS['TL_LANG']['tl_nc_queue']['error'][0] = 'Had an error during delivery process'; -$GLOBALS['TL_LANG']['tl_nc_queue']['tokens'][0] = 'Tokens'; -$GLOBALS['TL_LANG']['tl_nc_queue']['language'][0] = 'Language'; -$GLOBALS['TL_LANG']['tl_nc_queue']['attachments'][0] = 'Attachments'; - -/** - * Status - */ -$GLOBALS['TL_LANG']['tl_nc_queue']['status']['queued'] = 'Waiting in queue.'; -$GLOBALS['TL_LANG']['tl_nc_queue']['status']['error'] = 'Error sending the message. Check the system log for more details.'; -$GLOBALS['TL_LANG']['tl_nc_queue']['status']['sent'] = 'Message sent.'; -$GLOBALS['TL_LANG']['tl_nc_queue']['source'] = 'Source'; - -/** - * Buttons - */ -$GLOBALS['TL_LANG']['tl_nc_queue']['re-queue'] = array('Add to queue again', 'This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button.'); -$GLOBALS['TL_LANG']['tl_nc_queue']['delete'] = array('Delete queued message', 'Delete queued message (ID %s).'); -$GLOBALS['TL_LANG']['tl_nc_queue']['show'] = array('Show details', 'Shows details of the queued message ID %s.'); - -/** - * Confirmation - */ -$GLOBALS['TL_LANG']['tl_nc_queue']['re-queueConfirmation'] = 'Are you sure you want to re-add queued message ID %s to the queue?'; diff --git a/languages/en/tl_nc_queue.xlf b/languages/en/tl_nc_queue.xlf new file mode 100644 index 00000000..30d2fca2 --- /dev/null +++ b/languages/en/tl_nc_queue.xlf @@ -0,0 +1,91 @@ + + + + + + Source queue gateway + Source queue gateway + + + Target gateway + Target gateway + + + Source message + Source message + + + Date added to queue + Date added to queue + + + Date sent from queue + Date sent from queue + + + Had an error during delivery process + Had an error during delivery process + + + Tokens + Tokens + + + Language + Language + + + Waiting in queue. + Waiting in queue. + + + Error sending the message. Check the system log for more details. + Error sending the message. Check the system log for more details. + + + Message sent. + Message sent. + + + Source + Source + + + Add to queue again + Add to queue again + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + Delete queued message + + + Delete queued message (ID %s). + Delete queued message (ID %s). + + + Show details + Show details + + + Shows details of the queued message ID %s. + Shows details of the queued message ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + Date delayed in queue + + + Attachments + Attachments + + + + diff --git a/languages/en/tokens.php b/languages/en/tokens.php deleted file mode 100755 index 44d6cc9c..00000000 --- a/languages/en/tokens.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @license LGPL - */ - -/** - * Tokens - */ -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['template'] = 'Output of template "%s"'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['core_form']['admin_email'] = 'E-mail address of administrator of the current page.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['core_form']['form_*'] = 'All the form fields.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['core_form']['formlabel_*'] = 'All the form field labels.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['core_form']['raw_data'] = 'All the form fields and their raw values.'; - -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['member_personaldata']['admin_email'] = 'E-mail address of administrator of the current page.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['member_personaldata']['recipients'] = 'E-mail address of the member.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['member_personaldata']['domain'] = 'The current domain.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['member_personaldata']['member_*'] = 'Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['member_personaldata']['member_old_*'] = 'Member fields as they were before the changes.'; -$GLOBALS['TL_LANG']['NOTIFICATION_CENTER_TOKEN']['member_personaldata']['changed_*'] = 'Flag (1 or 0) if a field has changed, to be used with if-conditions.'; diff --git a/languages/en/tokens.xlf b/languages/en/tokens.xlf new file mode 100644 index 00000000..77447b92 --- /dev/null +++ b/languages/en/tokens.xlf @@ -0,0 +1,51 @@ + + + + + + E-mail address of administrator of the current page. + E-mail address of administrator of the current page. + + + All the form fields. + All the form fields. + + + All the form field labels. + All the form field labels. + + + All the form fields and their raw values. + All the form fields and their raw values. + + + E-mail address of administrator of the current page. + E-mail address of administrator of the current page. + + + E-mail address of the member. + E-mail address of the member. + + + The current domain. + The current domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + Flag (1 or 0) if a field has changed, to be used with if-conditions. + + + Output of template "%s" + Output of template "%s" + + + + diff --git a/languages/fa/modules.xlf b/languages/fa/modules.xlf new file mode 100644 index 00000000..4766e121 --- /dev/null +++ b/languages/fa/modules.xlf @@ -0,0 +1,52 @@ + + + + + + Notification Center + + + Notifications + + + Manage notifications. + + + Queue + + + View the message queue. + + + Gateways + + + Manage gateways + + + Lost password (Notification Center) + + + Generates a form to request a new password and sends the notification using the notification center. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/fa/tl_form.xlf b/languages/fa/tl_form.xlf new file mode 100644 index 00000000..b5bcf668 --- /dev/null +++ b/languages/fa/tl_form.xlf @@ -0,0 +1,13 @@ + + + + + + Notification + + + Please select a notification. + + + + diff --git a/languages/fa/tl_module.xlf b/languages/fa/tl_module.xlf new file mode 100644 index 00000000..d20ee1f9 --- /dev/null +++ b/languages/fa/tl_module.xlf @@ -0,0 +1,22 @@ + + + + + + Notification + + + Please select a notification. + + + Activation notification + + + Please select an activation notification. + + + Notification + + + + diff --git a/languages/fa/tl_nc_gateway.xlf b/languages/fa/tl_nc_gateway.xlf new file mode 100644 index 00000000..50150004 --- /dev/null +++ b/languages/fa/tl_nc_gateway.xlf @@ -0,0 +1,258 @@ + + + + + + Title + + + Please enter a title for this gateway. + + + Type + + + Please select a type for this gateway. + + + Target gateway + + + This gateway will queue all the messages and then send them over the gateway you define here. + + + Enable poor man's cronjob + + + This will register this queue gateway to the poor man's cronjob. + + + Interval + + + Choose the interval you would like to have this queue gateway be invoked. + + + Number of messages + + + Here you can enter the number of messages that should be sent per invocation. + + + Override SMTP settings + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + + + File type + + + Please choose the file type. + + + Connection type + + + Please choose the connection type. + + + Host name + + + Please enter the host name. + + + Port number + + + Here you can enter the port number. Leave empty to use the default. + + + Username + + + Please enter the username. + + + Password + + + Please enter the password. + + + Path + + + Here you can enter the path (e.g. <em>downloads</em>). + + + Postmark API key + + + Please enter your unique Postmark API key. + + + Enable test mode + + + Here you can enable the test mode. + + + Enable SSL + + + Here you can enable the SSL connection. + + + Send e-mails via SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + + + SMTP hostname + + + Please enter the host name of the SMTP server. + + + SMTP username + + + Here you can enter the SMTP username. + + + SMTP password + + + Here you can enter the SMTP password. + + + SMTP encryption + + + Here you can choose an encryption method (SSL or TLS). + + + SMTP port number + + + Please enter the port number of the SMTP server. + + + Queue + + + Standard email gateway + + + Write to file + + + Postmark (postmarkapp.com) + + + Every minute + + + Every hour + + + Every day + + + Every week + + + Every month + + + CSV + + + Plain Text / XML + + + Local + + + FTP + + + Connection successful + + + Could not connect to the FTP server! + + + New gateway + + + Create a new gateway. + + + Edit gateway + + + Edit gateway ID %s. + + + Copy gateway + + + Copy gateway ID %s. + + + Delete gateway + + + Delete gateway ID %s. + + + Gateway details + + + Show details for gateway ID %s. + + + Title & type + + + Gateway settings + + + Cronjob settings + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Could not login to the FTP server! + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/fa/tl_nc_language.xlf b/languages/fa/tl_nc_language.xlf new file mode 100644 index 00000000..474d968c --- /dev/null +++ b/languages/fa/tl_nc_language.xlf @@ -0,0 +1,184 @@ + + + + + + Language + + + Please select a language. + + + Fallback + + + Activate this checkbox if this language should be your fallback. + + + Recipients + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + + + Attachments via tokens + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + + + Attachments from file system + + + Please choose from the file picker if you would like to add static files. + + + Sender name + + + Please enter the sender name. + + + Sender address + + + Please enter the sender email address. + + + Send a CC to + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + + + Send a BCC to + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + + + Reply-to address + + + You can optionally set a reply-to address for this message. + + + Subject + + + Please enter the subject for the e-mail. + + + Mode + + + Choose the mode you would like to be used for this email. + + + Raw text + + + Please enter the text. + + + HTML + + + Please enter the HTML. + + + File name + + + Please enter the file name. + + + Storage mode + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + + + File content + + + Please enter the file content. + + + Text only + + + HTML and text + + + Create new file + + + Override existing file + + + Append to existing file + + + New language + + + Add a new language. + + + Edit language + + + Edit language ID %s. + + + Copy language + + + Copy language ID %s. + + + Delete language + + + Delete language ID %s. + + + Language details + + + Show details for language ID %s. + + + General language settings + + + Attachments + + + Meta information + + + Content + + + The following tokens you have used are not supported by this notification type: %s. + + + External images + + + Do not embed images in HTML emails. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/fa/tl_nc_message.xlf b/languages/fa/tl_nc_message.xlf new file mode 100644 index 00000000..f34fe3cb --- /dev/null +++ b/languages/fa/tl_nc_message.xlf @@ -0,0 +1,130 @@ + + + + + + Title + + + Please enter a title for this message. + + + Gateway + + + Please select a gateway for this message. + + + Languages + + + Here you can manage the different languages. + + + Manage languages + + + Close + + + Priority + + + Please select a priority. + + + Template file + + + Please choose a template file. + + + Tag + + + Here you can enter the tag. + + + Enable open tracking + + + Here you can enable open tracking. + + + Publish message + + + Include this message when a notification is being sent. + + + New message + + + Create a new message. + + + Edit message + + + Edit message ID %s. + + + Duplicate message + + + Duplicate message ID %s. + + + Move message + + + Move message ID %s. + + + Delete message + + + Delete message ID %s. + + + Toggle visibility of message + + + Toggle visibility of message ID %s. + + + Gateway message + + + Show details for message ID %s. + + + Title & Gateway + + + Languages + + + Expert settings + + + Publish settings + + + very high + + + high + + + normal + + + low + + + very low + + + + diff --git a/languages/fa/tl_nc_notification.xlf b/languages/fa/tl_nc_notification.xlf new file mode 100644 index 00000000..c620739b --- /dev/null +++ b/languages/fa/tl_nc_notification.xlf @@ -0,0 +1,112 @@ + + + + + + Title + + + Please enter a title for this notification. + + + Type + + + Please select a type for this notification. + + + Standard eMail gateway + + + Write to file + + + New notification + + + Create a new notification. + + + Manage notifications + + + Manage messages for notification ID %s. + + + Edit notification + + + Edit notification ID %s. + + + Copy notification + + + Copy notification ID %s. + + + Delete notification + + + Delete notification ID %s. + + + Notification details + + + Show details for notification ID %s. + + + Title & type + + + Configuration + + + Contao + + + Form submission + + + This notification type can be sent when the form is submitted. + + + Member registration + + + Member personal data + + + Member lost password + + + Delimiter for lists + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Member activation + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/fa/tl_nc_queue.xlf b/languages/fa/tl_nc_queue.xlf new file mode 100644 index 00000000..70d7806b --- /dev/null +++ b/languages/fa/tl_nc_queue.xlf @@ -0,0 +1,70 @@ + + + + + + Source queue gateway + + + Target gateway + + + Source message + + + Date added to queue + + + Date sent from queue + + + Had an error during delivery process + + + Tokens + + + Language + + + Waiting in queue. + + + Error sending the message. Check the system log for more details. + + + Message sent. + + + Source + + + Add to queue again + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + + + Delete queued message (ID %s). + + + Show details + + + Shows details of the queued message ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/fa/tokens.xlf b/languages/fa/tokens.xlf new file mode 100644 index 00000000..2ed3fc49 --- /dev/null +++ b/languages/fa/tokens.xlf @@ -0,0 +1,40 @@ + + + + + + E-mail address of administrator of the current page. + + + All the form fields. + + + All the form fields and their raw values. + + + All the form field labels. + + + E-mail address of administrator of the current page. + + + E-mail address of the member. + + + The current domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + + + Output of template "%s" + + + + diff --git a/languages/fi/modules.xlf b/languages/fi/modules.xlf new file mode 100644 index 00000000..9474190e --- /dev/null +++ b/languages/fi/modules.xlf @@ -0,0 +1,52 @@ + + + + + + Notification Center + + + Notifications + + + Manage notifications. + + + Queue + + + View the message queue. + + + Gateways + + + Manage gateways + + + Lost password (Notification Center) + + + Generates a form to request a new password and sends the notification using the notification center. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/fi/tl_form.xlf b/languages/fi/tl_form.xlf new file mode 100644 index 00000000..91ecad4b --- /dev/null +++ b/languages/fi/tl_form.xlf @@ -0,0 +1,13 @@ + + + + + + Notification + + + Please select a notification. + + + + diff --git a/languages/fi/tl_module.xlf b/languages/fi/tl_module.xlf new file mode 100644 index 00000000..f331f572 --- /dev/null +++ b/languages/fi/tl_module.xlf @@ -0,0 +1,22 @@ + + + + + + Notification + + + Please select a notification. + + + Activation notification + + + Please select an activation notification. + + + Notification + + + + diff --git a/languages/fi/tl_nc_gateway.xlf b/languages/fi/tl_nc_gateway.xlf new file mode 100644 index 00000000..08685762 --- /dev/null +++ b/languages/fi/tl_nc_gateway.xlf @@ -0,0 +1,258 @@ + + + + + + Title + + + Please enter a title for this gateway. + + + Type + + + Please select a type for this gateway. + + + Target gateway + + + This gateway will queue all the messages and then send them over the gateway you define here. + + + Enable poor man's cronjob + + + This will register this queue gateway to the poor man's cronjob. + + + Interval + + + Choose the interval you would like to have this queue gateway be invoked. + + + Number of messages + + + Here you can enter the number of messages that should be sent per invocation. + + + Override SMTP settings + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + + + File type + + + Please choose the file type. + + + Connection type + + + Please choose the connection type. + + + Host name + + + Please enter the host name. + + + Port number + + + Here you can enter the port number. Leave empty to use the default. + + + Username + + + Please enter the username. + + + Password + + + Please enter the password. + + + Path + + + Here you can enter the path (e.g. <em>downloads</em>). + + + Postmark API key + + + Please enter your unique Postmark API key. + + + Enable test mode + + + Here you can enable the test mode. + + + Enable SSL + + + Here you can enable the SSL connection. + + + Send e-mails via SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + + + SMTP hostname + + + Please enter the host name of the SMTP server. + + + SMTP username + + + Here you can enter the SMTP username. + + + SMTP password + + + Here you can enter the SMTP password. + + + SMTP encryption + + + Here you can choose an encryption method (SSL or TLS). + + + SMTP port number + + + Please enter the port number of the SMTP server. + + + Queue + + + Standard email gateway + + + Write to file + + + Postmark (postmarkapp.com) + + + Every minute + + + Every hour + + + Every day + + + Every week + + + Every month + + + CSV + + + Plain Text / XML + + + Local + + + FTP + + + Connection successful + + + Could not connect to the FTP server! + + + New gateway + + + Create a new gateway. + + + Edit gateway + + + Edit gateway ID %s. + + + Copy gateway + + + Copy gateway ID %s. + + + Delete gateway + + + Delete gateway ID %s. + + + Gateway details + + + Show details for gateway ID %s. + + + Title & type + + + Gateway settings + + + Cronjob settings + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Could not login to the FTP server! + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/fi/tl_nc_language.xlf b/languages/fi/tl_nc_language.xlf new file mode 100644 index 00000000..2b8e0f5a --- /dev/null +++ b/languages/fi/tl_nc_language.xlf @@ -0,0 +1,184 @@ + + + + + + Language + + + Please select a language. + + + Fallback + + + Activate this checkbox if this language should be your fallback. + + + Recipients + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + + + Attachments via tokens + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + + + Attachments from file system + + + Please choose from the file picker if you would like to add static files. + + + Sender name + + + Please enter the sender name. + + + Sender address + + + Please enter the sender email address. + + + Send a CC to + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + + + Send a BCC to + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + + + Reply-to address + + + You can optionally set a reply-to address for this message. + + + Subject + + + Please enter the subject for the e-mail. + + + Mode + + + Choose the mode you would like to be used for this email. + + + Raw text + + + Please enter the text. + + + HTML + + + Please enter the HTML. + + + File name + + + Please enter the file name. + + + Storage mode + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + + + File content + + + Please enter the file content. + + + Text only + + + HTML and text + + + Create new file + + + Override existing file + + + Append to existing file + + + New language + + + Add a new language. + + + Edit language + + + Edit language ID %s. + + + Copy language + + + Copy language ID %s. + + + Delete language + + + Delete language ID %s. + + + Language details + + + Show details for language ID %s. + + + General language settings + + + Attachments + + + Meta information + + + Content + + + The following tokens you have used are not supported by this notification type: %s. + + + External images + + + Do not embed images in HTML emails. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/fi/tl_nc_message.xlf b/languages/fi/tl_nc_message.xlf new file mode 100644 index 00000000..c2c6b2fa --- /dev/null +++ b/languages/fi/tl_nc_message.xlf @@ -0,0 +1,130 @@ + + + + + + Title + + + Please enter a title for this message. + + + Gateway + + + Please select a gateway for this message. + + + Languages + + + Here you can manage the different languages. + + + Manage languages + + + Close + + + Priority + + + Please select a priority. + + + Template file + + + Please choose a template file. + + + Tag + + + Here you can enter the tag. + + + Enable open tracking + + + Here you can enable open tracking. + + + Publish message + + + Include this message when a notification is being sent. + + + New message + + + Create a new message. + + + Edit message + + + Edit message ID %s. + + + Duplicate message + + + Duplicate message ID %s. + + + Move message + + + Move message ID %s. + + + Delete message + + + Delete message ID %s. + + + Toggle visibility of message + + + Toggle visibility of message ID %s. + + + Gateway message + + + Show details for message ID %s. + + + Title & Gateway + + + Languages + + + Expert settings + + + Publish settings + + + very high + + + high + + + normal + + + low + + + very low + + + + diff --git a/languages/fi/tl_nc_notification.xlf b/languages/fi/tl_nc_notification.xlf new file mode 100644 index 00000000..63a537f9 --- /dev/null +++ b/languages/fi/tl_nc_notification.xlf @@ -0,0 +1,112 @@ + + + + + + Title + + + Please enter a title for this notification. + + + Type + + + Please select a type for this notification. + + + Standard eMail gateway + + + Write to file + + + New notification + + + Create a new notification. + + + Manage notifications + + + Manage messages for notification ID %s. + + + Edit notification + + + Edit notification ID %s. + + + Copy notification + + + Copy notification ID %s. + + + Delete notification + + + Delete notification ID %s. + + + Notification details + + + Show details for notification ID %s. + + + Title & type + + + Configuration + + + Contao + + + Form submission + + + This notification type can be sent when the form is submitted. + + + Member registration + + + Member personal data + + + Member lost password + + + Delimiter for lists + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Member activation + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/fi/tl_nc_queue.xlf b/languages/fi/tl_nc_queue.xlf new file mode 100644 index 00000000..b0228b9f --- /dev/null +++ b/languages/fi/tl_nc_queue.xlf @@ -0,0 +1,70 @@ + + + + + + Source queue gateway + + + Target gateway + + + Source message + + + Date added to queue + + + Date sent from queue + + + Had an error during delivery process + + + Tokens + + + Language + + + Waiting in queue. + + + Error sending the message. Check the system log for more details. + + + Message sent. + + + Source + + + Add to queue again + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + + + Delete queued message (ID %s). + + + Show details + + + Shows details of the queued message ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/fi/tokens.xlf b/languages/fi/tokens.xlf new file mode 100644 index 00000000..1382e54d --- /dev/null +++ b/languages/fi/tokens.xlf @@ -0,0 +1,40 @@ + + + + + + E-mail address of administrator of the current page. + + + All the form fields. + + + All the form fields and their raw values. + + + All the form field labels. + + + E-mail address of administrator of the current page. + + + E-mail address of the member. + + + The current domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + + + Output of template "%s" + + + + diff --git a/languages/fr/modules.php b/languages/fr/modules.php deleted file mode 100644 index 4619be03..00000000 --- a/languages/fr/modules.php +++ /dev/null @@ -1,21 +0,0 @@ - + + + + + Notification Center + Centre de notification + + + Notifications + Notifications + + + Manage notifications. + Gérer les notifications. + + + Queue + + + View the message queue. + + + Gateways + Passerelles + + + Manage gateways + Gérer les passerelles + + + Lost password (Notification Center) + Mot de passe perdu (Centre de notification) + + + Generates a form to request a new password and sends the notification using the notification center. + Génère un formulaire pour demander un nouveau mot de passe et envoie la notification à l'aide du centre de notification. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/fr/tl_form.php b/languages/fr/tl_form.php deleted file mode 100644 index 0ad37a5d..00000000 --- a/languages/fr/tl_form.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Notification + + + Please select a notification. + Sélectionner une notification. + + + + diff --git a/languages/fr/tl_module.php b/languages/fr/tl_module.php deleted file mode 100644 index c5e57edb..00000000 --- a/languages/fr/tl_module.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Notification + + + Please select a notification. + Sélectionner une notification. + + + Activation notification + + + Please select an activation notification. + + + Notification + + + + diff --git a/languages/fr/tl_nc_gateway.php b/languages/fr/tl_nc_gateway.php deleted file mode 100644 index ae2990c1..00000000 --- a/languages/fr/tl_nc_gateway.php +++ /dev/null @@ -1,62 +0,0 @@ -téléchargements).'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['0'] = 'Numéro de port'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['1'] = 'Saisir le numéro de port. Laisser vide pour utiliser la valeur par défaut.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['0'] = 'Type de fichier'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['1'] = 'Choisir un type de fichier.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['csv'] = 'CSV'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['xml'] = 'Texte brut / XML'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['0'] = 'Nom d\'utilisateur'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['1'] = 'Saisir le nom d\'utilisateur.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_confirm'] = 'Connexion réussie'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_class'] = 'Impossible de trouver la classe FTP !'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_connect'] = 'Impossible de se connecter au serveur : %s'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['gateway_legend'] = 'Paramètre de la passerelle'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['0'] = 'Nouvelle passerelle'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['1'] = 'Créer une nouvelle passerelle.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_key']['0'] = 'Clé d\'API Postmark'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_key']['1'] = 'Veuillez insérer votre clé unique d\'API Postmark'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_ssl']['0'] = 'Autoriser le SSL'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_ssl']['1'] = 'Ici vous pouvez autoriser la connection SSL'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_test']['0'] = 'Autoriser le mode de test'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_test']['1'] = 'Ici vous pouvez activer le mode de test'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['0'] = 'Détails de la passerelle'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['1'] = 'Afficher les détails de la passerelle ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['0'] = 'Titre'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['1'] = 'Saisir un titre pour cette passerelle.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title_legend'] = 'Titre & type'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['0'] = 'Type'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['1'] = 'Sélectionner le type de cette passerelle.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['email'] = 'Passerelle de messagerie standard'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['file'] = 'Écrire dans un fichier'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['postmark'] = 'Postmark (postmarkapp.com)'; - diff --git a/languages/fr/tl_nc_gateway.xlf b/languages/fr/tl_nc_gateway.xlf new file mode 100644 index 00000000..76c0c49c --- /dev/null +++ b/languages/fr/tl_nc_gateway.xlf @@ -0,0 +1,305 @@ + + + + + + Title + Titre + + + Please enter a title for this gateway. + Saisir un titre pour cette passerelle. + + + Type + Type + + + Please select a type for this gateway. + Sélectionner le type de cette passerelle. + + + Target gateway + + + This gateway will queue all the messages and then send them over the gateway you define here. + + + Enable poor man's cronjob + + + This will register this queue gateway to the poor man's cronjob. + + + Interval + + + Choose the interval you would like to have this queue gateway be invoked. + + + Number of messages + + + Here you can enter the number of messages that should be sent per invocation. + + + Override SMTP settings + Surcharger les paramètres SMTP + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + Cette passerelle utilisera les paramètres de courrier électronique par défaut de Contao. Cocher pour surcharger les paramètres SMTP de cette passerelle. + + + File type + Type de fichier + + + Please choose the file type. + Choisir un type de fichier. + + + Connection type + Type de connexion + + + Please choose the connection type. + Choisir le type de connexion. + + + Host name + Hôte + + + Please enter the host name. + Saisir le nom de l'hôte. + + + Port number + Numéro de port + + + Here you can enter the port number. Leave empty to use the default. + Saisir le numéro de port. Laisser vide pour utiliser la valeur par défaut. + + + Username + Nom d'utilisateur + + + Please enter the username. + Saisir le nom d'utilisateur. + + + Password + Mot de passe + + + Please enter the password. + Saisir le mot de passe. + + + Path + Chemin + + + Here you can enter the path (e.g. <em>downloads</em>). + Saisir le chemin (ex : <em>téléchargements</em>). + + + Postmark API key + Clé d'API Postmark + + + Please enter your unique Postmark API key. + Veuillez insérer votre clé unique d'API Postmark + + + Enable test mode + Autoriser le mode de test + + + Here you can enable the test mode. + Ici vous pouvez activer le mode de test + + + Enable SSL + Autoriser le SSL + + + Here you can enable the SSL connection. + Ici vous pouvez autoriser la connection SSL + + + Send e-mails via SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + + + SMTP hostname + + + Please enter the host name of the SMTP server. + + + SMTP username + + + Here you can enter the SMTP username. + + + SMTP password + + + Here you can enter the SMTP password. + + + SMTP encryption + + + Here you can choose an encryption method (SSL or TLS). + + + SMTP port number + + + Please enter the port number of the SMTP server. + + + Queue + + + Standard email gateway + Passerelle de messagerie standard + + + Write to file + Écrire dans un fichier + + + Postmark (postmarkapp.com) + Postmark (postmarkapp.com) + + + Every minute + + + Every hour + + + Every day + + + Every week + + + Every month + + + CSV + CSV + + + Plain Text / XML + Texte brut / XML + + + Local + Local + + + FTP + FTP + + + Connection successful + Connexion réussie + + + Could not connect to the FTP server! + Impossible de se connecter au serveur : %s + + + Could not login to the FTP server! + + + New gateway + Nouvelle passerelle + + + Create a new gateway. + Créer une nouvelle passerelle. + + + Edit gateway + Éditer la passerelle + + + Edit gateway ID %s. + Éditer la passerelle ID %s. + + + Copy gateway + Copier la passerelle + + + Copy gateway ID %s. + Copier la passerelle ID %s. + + + Delete gateway + Supprimer la passerelle + + + Delete gateway ID %s. + Supprimer la passerelle ID %s. + + + Gateway details + Détails de la passerelle + + + Show details for gateway ID %s. + Afficher les détails de la passerelle ID %s. + + + Title & type + Titre & type + + + Gateway settings + Paramètre de la passerelle + + + Cronjob settings + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/fr/tl_nc_language.php b/languages/fr/tl_nc_language.php deleted file mode 100644 index f830d062..00000000 --- a/languages/fr/tl_nc_language.php +++ /dev/null @@ -1,65 +0,0 @@ -séparée par des virgules des jetons joints à ce champ. Utilisez l\'autocompletion pour afficher les tokens valide'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['0'] = 'Fichiers joints à partir du gestionnaire de fichiers'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['1'] = 'Utiliser le sélecteur de fichier pour ajouter des fichiers statiques.'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments_legend'] = 'Fichiers joints'; -$GLOBALS['TL_LANG']['tl_nc_language']['content_legend'] = 'Contenu'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['0'] = 'Copier la langue'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['1'] = 'Copier la langue ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['0'] = 'Supprimer la langue'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['1'] = 'Supprimer la langue ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['0'] = 'Éditer la langue'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['1'] = 'Éditer la langue ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['0'] = 'HTML'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['1'] = 'Saisir le code HTML.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['0'] = 'Mode'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['1'] = 'Choisir le mode à utiliser pour ce message.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textAndHtml'] = 'HTML et texte'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textOnly'] = 'Texte seulement'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['0'] = 'Envoyer une BCC à'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['1'] = 'Les destinataires qui doivent recevoir une copie carbone cachée de l\'e-mail. Séparer les adresses par une virgule.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['0'] = 'Envoyer une CC à'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['1'] = 'Les destinataires qui doivent recevoir une copie carbone de l\'e-mail. Séparer les adresses par une virgule.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['0'] = 'Adresse de réponse'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['1'] = 'Définir une adresse de réponse pour ce message.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['0'] = 'Adresse de l\'expéditeur'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['1'] = 'Saisir l\'adresse email de l\'expéditeur.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['0'] = 'Nom de l\'expéditeur'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['1'] = 'Saisir le nom de l\'expéditeur.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['0'] = 'Sujet'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['1'] = 'Saisir un sujet pour cet email.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['0'] = 'Texte brut'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['1'] = 'Saisir le texte.'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['0'] = 'Langue de secours'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['1'] = 'Cocher pour utiliser cette langue en secours.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['0'] = 'Contenu du fichier'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['1'] = 'Saisir le contenu du fichier'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['0'] = 'Nom de fichier'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['1'] = 'Saisir le nom de fichier sans extension.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['0'] = 'Écraser le fichier existant'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['1'] = 'Écraser l\'ancien fichier s\'il est déjà existant.'; -$GLOBALS['TL_LANG']['tl_nc_language']['general_legend'] = 'Paramètres de langue'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['0'] = 'Langue'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['1'] = 'Sélectionner une langue.'; -$GLOBALS['TL_LANG']['tl_nc_language']['meta_legend'] = 'Informations méta'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['0'] = 'Nouvelle langue'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['1'] = 'Ajouter une nouvelle langue.'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['0'] = 'Destinataires'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['1'] = 'Veuillez insérer la lise séparée par des virgules des destinataires dans ce champs. Utilisez l\'auto-completion pour afficher les tokens valide'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['0'] = 'Détails de la langue'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['1'] = 'Afficher les détails de la langue ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['token_error'] = 'Les jetons suivants utilisés ne sont pas pris en charge par ce type de notification : %s.'; - diff --git a/languages/fr/tl_nc_language.xlf b/languages/fr/tl_nc_language.xlf new file mode 100644 index 00000000..9c5f8830 --- /dev/null +++ b/languages/fr/tl_nc_language.xlf @@ -0,0 +1,233 @@ + + + + + + Language + Langue + + + Please select a language. + Sélectionner une langue. + + + Fallback + Langue de secours + + + Activate this checkbox if this language should be your fallback. + Cocher pour utiliser cette langue en secours. + + + Recipients + Destinataires + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + Veuillez insérer la lise <strong>séparée par des virgules</strong> des destinataires dans ce champs. Utilisez l'auto-completion pour afficher les tokens valide + + + Attachments via tokens + Fichiers joints à partir de jetons + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + Veuillez insérer la liste <strong>séparée par des virgules</strong> des jetons joints à ce champ. Utilisez l'autocompletion pour afficher les tokens valide + + + Attachments from file system + Fichiers joints à partir du gestionnaire de fichiers + + + Please choose from the file picker if you would like to add static files. + Utiliser le sélecteur de fichier pour ajouter des fichiers statiques. + + + Sender name + Nom de l'expéditeur + + + Please enter the sender name. + Saisir le nom de l'expéditeur. + + + Sender address + Adresse de l'expéditeur + + + Please enter the sender email address. + Saisir l'adresse email de l'expéditeur. + + + Send a CC to + Envoyer une CC à + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + Les destinataires qui doivent recevoir une copie carbone de l'e-mail. Séparer les adresses par une virgule. + + + Send a BCC to + Envoyer une BCC à + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + Les destinataires qui doivent recevoir une copie carbone cachée de l'e-mail. Séparer les adresses par une virgule. + + + Reply-to address + Adresse de réponse + + + You can optionally set a reply-to address for this message. + Définir une adresse de réponse pour ce message. + + + Subject + Sujet + + + Please enter the subject for the e-mail. + Saisir un sujet pour cet email. + + + Mode + Mode + + + Choose the mode you would like to be used for this email. + Choisir le mode à utiliser pour ce message. + + + Raw text + Texte brut + + + Please enter the text. + Saisir le texte. + + + HTML + HTML + + + Please enter the HTML. + Saisir le code HTML. + + + External images + + + Do not embed images in HTML emails. + + + File name + Nom de fichier + + + Please enter the file name. + Saisir le nom de fichier sans extension. + + + Storage mode + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + + + File content + Contenu du fichier + + + Please enter the file content. + Saisir le contenu du fichier + + + Text only + Texte seulement + + + HTML and text + HTML et texte + + + Create new file + + + Override existing file + + + Append to existing file + + + New language + Nouvelle langue + + + Add a new language. + Ajouter une nouvelle langue. + + + Edit language + Éditer la langue + + + Edit language ID %s. + Éditer la langue ID %s. + + + Copy language + Copier la langue + + + Copy language ID %s. + Copier la langue ID %s. + + + Delete language + Supprimer la langue + + + Delete language ID %s. + Supprimer la langue ID %s. + + + Language details + Détails de la langue + + + Show details for language ID %s. + Afficher les détails de la langue ID %s. + + + General language settings + Paramètres de langue + + + Attachments + Fichiers joints + + + Meta information + Informations méta + + + Content + Contenu + + + The following tokens you have used are not supported by this notification type: %s. + Les jetons suivants utilisés ne sont pas pris en charge par ce type de notification : %s. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/fr/tl_nc_message.php b/languages/fr/tl_nc_message.php deleted file mode 100644 index ebd9a8fb..00000000 --- a/languages/fr/tl_nc_message.php +++ /dev/null @@ -1,55 +0,0 @@ - + + + + + Title + Titre + + + Please enter a title for this message. + Saisir un titre pour ce message. + + + Gateway + Passerelle + + + Please select a gateway for this message. + Sélectionner une passerelle pour ce message. + + + Languages + Langues + + + Here you can manage the different languages. + Gérer les différentes langues. + + + Manage languages + Gérer les langues + + + Close + Fermer + + + Priority + Priorité + + + Please select a priority. + Sélectionner une priorité. + + + Template file + Modèle + + + Please choose a template file. + Choisir un fichier modèle. + + + Tag + Balise + + + Here you can enter the tag. + Ici vous pouvez insérer la balise + + + Enable open tracking + Autoriser le suivi de l'ouverture + + + Here you can enable open tracking. + Ici vous pouvez autoriser le suivi de l'ouverture + + + Publish message + Publier le message + + + Include this message when a notification is being sent. + Inclure ce message quand une notification est envoyée. + + + New message + Nouveau message + + + Create a new message. + Créer un nouveau message. + + + Edit message + Éditer le message + + + Edit message ID %s. + Éditer le message ID %s. + + + Duplicate message + Dupliquer le message + + + Duplicate message ID %s. + Dupliquer le message d'ID %s + + + Move message + Déplacer le message + + + Move message ID %s. + Déplacer le message d'ID %s + + + Delete message + Supprimer le message + + + Delete message ID %s. + Supprimer le message ID %s. + + + Toggle visibility of message + Basculer la visibilité du message + + + Toggle visibility of message ID %s. + Basculer la visibilité du message ID %s. + + + Gateway message + Message de la passerelle + + + Show details for message ID %s. + Afficher les détails du message ID %s. + + + Title & Gateway + Titre & passerelle + + + Languages + Langues + + + Expert settings + Paramètre avancés + + + Publish settings + Paramètres de publication + + + very high + très haute + + + high + haute + + + normal + normale + + + low + basse + + + very low + très basse + + + + diff --git a/languages/fr/tl_nc_notification.php b/languages/fr/tl_nc_notification.php deleted file mode 100644 index 9adae355..00000000 --- a/languages/fr/tl_nc_notification.php +++ /dev/null @@ -1,41 +0,0 @@ - + + + + + Title + Titre + + + Please enter a title for this notification. + Saisir un titre pour cette notification. + + + Type + Type + + + Please select a type for this notification. + Sélectionner le type de cette notification. + + + Delimiter for lists + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Standard eMail gateway + Passerelle de messagerie standard + + + Write to file + Écrire dans un fichier + + + New notification + Nouvelle notification + + + Create a new notification. + Créer une notification. + + + Manage notifications + Gérer les notifications + + + Manage messages for notification ID %s. + Gérer les messages de la notification ID %s. + + + Edit notification + Éditer la notification + + + Edit notification ID %s. + Éditer la notification ID %s. + + + Copy notification + Copier la notification + + + Copy notification ID %s. + Copier la notification ID %s. + + + Delete notification + Supprimer la notification + + + Delete notification ID %s. + Supprimer la notification ID %s. + + + Notification details + Détails de la notification + + + Show details for notification ID %s. + Afficher les détails de la notification ID %s. + + + Title & type + Titre & type + + + Configuration + Configuration + + + Contao + Contao + + + Form submission + Soumission de formulaire + + + This notification type can be sent when the form is submitted. + Ce type de notification peut être envoyé lorsque le formulaire est soumis. + + + Member activation + + + Member registration + Inscription des membres + + + Member personal data + Données personnelles du membre + + + Member lost password + Mot de passe perdu + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/fr/tl_nc_queue.xlf b/languages/fr/tl_nc_queue.xlf new file mode 100644 index 00000000..d6c71650 --- /dev/null +++ b/languages/fr/tl_nc_queue.xlf @@ -0,0 +1,70 @@ + + + + + + Source queue gateway + + + Target gateway + + + Source message + + + Date added to queue + + + Date sent from queue + + + Had an error during delivery process + + + Tokens + + + Language + + + Waiting in queue. + + + Error sending the message. Check the system log for more details. + + + Message sent. + + + Source + + + Add to queue again + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + + + Delete queued message (ID %s). + + + Show details + + + Shows details of the queued message ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/fr/tokens.php b/languages/fr/tokens.php deleted file mode 100644 index 00451135..00000000 --- a/languages/fr/tokens.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + E-mail address of administrator of the current page. + Adresse e-mail de l'administrateur de la page en cours. + + + All the form fields. + Tous les champs du formulaire. + + + All the form field labels. + + + All the form fields and their raw values. + Tous les champs du formulaire et leur valeur non échappée + + + E-mail address of administrator of the current page. + + + E-mail address of the member. + + + The current domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + + + Output of template "%s" + + + + diff --git a/languages/it/modules.php b/languages/it/modules.php deleted file mode 100644 index e9763e93..00000000 --- a/languages/it/modules.php +++ /dev/null @@ -1,22 +0,0 @@ - + + + + + Notification Center + Centro notifiche + + + Notifications + Notifiche + + + Manage notifications. + Gestisci notifiche. + + + Queue + + + View the message queue. + + + Gateways + Porte + + + Manage gateways + Gestisci porte + + + Lost password (Notification Center) + Password persa (Centro notifiche) + + + Generates a form to request a new password and sends the notification using the notification center. + Genera un modulo per richiedere una nuova password e invia la notifica usando il centro notifiche. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/it/tl_form.php b/languages/it/tl_form.php deleted file mode 100644 index a5e12330..00000000 --- a/languages/it/tl_form.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Notifica + + + Please select a notification. + Seleziona una notifica. + + + + diff --git a/languages/it/tl_module.php b/languages/it/tl_module.php deleted file mode 100644 index c3d595ac..00000000 --- a/languages/it/tl_module.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Notification + + + Please select a notification. + Seleziona una notifica. + + + Activation notification + + + Please select an activation notification. + + + Notification + + + + diff --git a/languages/it/tl_nc_gateway.php b/languages/it/tl_nc_gateway.php deleted file mode 100644 index d445f6cb..00000000 --- a/languages/it/tl_nc_gateway.php +++ /dev/null @@ -1,32 +0,0 @@ - + + + + + Title + Titolo + + + Please enter a title for this gateway. + + + Type + Tipo + + + Please select a type for this gateway. + + + Target gateway + + + This gateway will queue all the messages and then send them over the gateway you define here. + + + Enable poor man's cronjob + + + This will register this queue gateway to the poor man's cronjob. + + + Interval + + + Choose the interval you would like to have this queue gateway be invoked. + + + Number of messages + + + Here you can enter the number of messages that should be sent per invocation. + + + Override SMTP settings + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + + + File type + Tipo file + + + Please choose the file type. + Seleziona un tipo di file + + + Connection type + Tipo connessione + + + Please choose the connection type. + + + Host name + Nome host + + + Please enter the host name. + + + Port number + Numero porta + + + Here you can enter the port number. Leave empty to use the default. + + + Username + Nome utente + + + Please enter the username. + Inserisci il nome utente + + + Password + Password + + + Please enter the password. + Inserisci la password + + + Path + Percorso + + + Here you can enter the path (e.g. <em>downloads</em>). + + + Postmark API key + + + Please enter your unique Postmark API key. + + + Enable test mode + + + Here you can enable the test mode. + + + Enable SSL + + + Here you can enable the SSL connection. + + + Send e-mails via SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + + + SMTP hostname + + + Please enter the host name of the SMTP server. + + + SMTP username + + + Here you can enter the SMTP username. + + + SMTP password + + + Here you can enter the SMTP password. + + + SMTP encryption + + + Here you can choose an encryption method (SSL or TLS). + + + SMTP port number + + + Please enter the port number of the SMTP server. + + + Queue + + + Standard email gateway + + + Write to file + Scrivi su file + + + Postmark (postmarkapp.com) + + + Every minute + + + Every hour + + + Every day + + + Every week + + + Every month + + + CSV + CSV + + + Plain Text / XML + Testo / XML + + + Local + Locale + + + FTP + FTP + + + Connection successful + + + Could not connect to the FTP server! + + + Could not login to the FTP server! + + + New gateway + + + Create a new gateway. + + + Edit gateway + + + Edit gateway ID %s. + + + Copy gateway + + + Copy gateway ID %s. + + + Delete gateway + + + Delete gateway ID %s. + + + Gateway details + + + Show details for gateway ID %s. + + + Title & type + + + Gateway settings + + + Cronjob settings + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/it/tl_nc_language.php b/languages/it/tl_nc_language.php deleted file mode 100644 index 00f47c8b..00000000 --- a/languages/it/tl_nc_language.php +++ /dev/null @@ -1,30 +0,0 @@ - + + + + + Language + Lingua + + + Please select a language. + Seleziona una lingua + + + Fallback + + + Activate this checkbox if this language should be your fallback. + + + Recipients + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + + + Attachments via tokens + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + + + Attachments from file system + + + Please choose from the file picker if you would like to add static files. + + + Sender name + + + Please enter the sender name. + + + Sender address + + + Please enter the sender email address. + + + Send a CC to + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + + + Send a BCC to + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + + + Reply-to address + + + You can optionally set a reply-to address for this message. + + + Subject + Oggetto + + + Please enter the subject for the e-mail. + + + Mode + + + Choose the mode you would like to be used for this email. + + + Raw text + + + Please enter the text. + + + HTML + HTML + + + Please enter the HTML. + + + External images + + + Do not embed images in HTML emails. + + + File name + Nome file + + + Please enter the file name. + Inserisci il nome del file senza estensione. + + + Storage mode + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + + + File content + Contenuto file + + + Please enter the file content. + + + Text only + Solo testo + + + HTML and text + HTML e testo + + + Create new file + + + Override existing file + + + Append to existing file + + + New language + Nuova lingua + + + Add a new language. + Aggiungi una nuova lingua. + + + Edit language + Modifica lingua + + + Edit language ID %s. + + + Copy language + Copia lingua + + + Copy language ID %s. + + + Delete language + + + Delete language ID %s. + + + Language details + + + Show details for language ID %s. + + + General language settings + + + Attachments + Allegati + + + Meta information + + + Content + Contenuto + + + The following tokens you have used are not supported by this notification type: %s. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/it/tl_nc_message.php b/languages/it/tl_nc_message.php deleted file mode 100644 index 196c3c31..00000000 --- a/languages/it/tl_nc_message.php +++ /dev/null @@ -1,32 +0,0 @@ - + + + + + Title + Titolo + + + Please enter a title for this message. + + + Gateway + + + Please select a gateway for this message. + + + Languages + Lingue + + + Here you can manage the different languages. + + + Manage languages + Gestisci lingue + + + Close + Chiudi + + + Priority + Priorità + + + Please select a priority. + Seleziona una priorità. + + + Template file + + + Please choose a template file. + + + Tag + + + Here you can enter the tag. + + + Enable open tracking + + + Here you can enable open tracking. + + + Publish message + + + Include this message when a notification is being sent. + + + New message + Nuovo messaggio + + + Create a new message. + Crea un nuovo messaggio. + + + Edit message + Modifica messaggio + + + Edit message ID %s. + + + Duplicate message + Copia messaggio + + + Duplicate message ID %s. + + + Move message + + + Move message ID %s. + + + Delete message + + + Delete message ID %s. + + + Toggle visibility of message + + + Toggle visibility of message ID %s. + + + Gateway message + + + Show details for message ID %s. + + + Title & Gateway + + + Languages + Lingue + + + Expert settings + Impostazioni esperto + + + Publish settings + + + very high + molto alto + + + high + alto + + + normal + normale + + + low + basso + + + very low + molto basso + + + + diff --git a/languages/it/tl_nc_notification.php b/languages/it/tl_nc_notification.php deleted file mode 100644 index 76e28354..00000000 --- a/languages/it/tl_nc_notification.php +++ /dev/null @@ -1,27 +0,0 @@ - + + + + + Title + Titolo + + + Please enter a title for this notification. + + + Type + Tipo + + + Please select a type for this notification. + + + Delimiter for lists + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Standard eMail gateway + + + Write to file + Scrivi su file + + + New notification + Nuova notifica + + + Create a new notification. + Crea una nuova notifica. + + + Manage notifications + Gestisci notifiche. + + + Manage messages for notification ID %s. + + + Edit notification + Modifica notifca + + + Edit notification ID %s. + + + Copy notification + Copia notifica + + + Copy notification ID %s. + + + Delete notification + + + Delete notification ID %s. + + + Notification details + Dettagli notifica + + + Show details for notification ID %s. + + + Title & type + + + Configuration + Configurazione + + + Contao + Contao + + + Form submission + + + This notification type can be sent when the form is submitted. + + + Member activation + + + Member registration + + + Member personal data + + + Member lost password + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/it/tl_nc_queue.xlf b/languages/it/tl_nc_queue.xlf new file mode 100644 index 00000000..17c0dd71 --- /dev/null +++ b/languages/it/tl_nc_queue.xlf @@ -0,0 +1,70 @@ + + + + + + Source queue gateway + + + Target gateway + + + Source message + + + Date added to queue + + + Date sent from queue + + + Had an error during delivery process + + + Tokens + + + Language + + + Waiting in queue. + + + Error sending the message. Check the system log for more details. + + + Message sent. + + + Source + + + Add to queue again + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + + + Delete queued message (ID %s). + + + Show details + + + Shows details of the queued message ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/it/tokens.xlf b/languages/it/tokens.xlf new file mode 100644 index 00000000..edfc1aa4 --- /dev/null +++ b/languages/it/tokens.xlf @@ -0,0 +1,40 @@ + + + + + + E-mail address of administrator of the current page. + + + All the form fields. + + + All the form field labels. + + + All the form fields and their raw values. + + + E-mail address of administrator of the current page. + + + E-mail address of the member. + + + The current domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + + + Output of template "%s" + + + + diff --git a/languages/pl/modules.php b/languages/pl/modules.php deleted file mode 100644 index 747f833a..00000000 --- a/languages/pl/modules.php +++ /dev/null @@ -1,21 +0,0 @@ - + + + + + Notification Center + Centrum powiadomień + + + Notifications + Powiadomienia + + + Manage notifications. + Zarządzaj powiadomieniami + + + Queue + + + View the message queue. + + + Gateways + Bramki + + + Manage gateways + Zarządzaj bramkami + + + Lost password (Notification Center) + Zapomniane hasło (Centrum powiadomień) + + + Generates a form to request a new password and sends the notification using the notification center. + Generuje formularz zapomnianego hasła i wysyła powiadomienie używając centrum powiadomień. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/pl/tl_form.php b/languages/pl/tl_form.php deleted file mode 100644 index 7734d3e6..00000000 --- a/languages/pl/tl_form.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Powiadomienie + + + Please select a notification. + Wybierz powiadomienie. + + + + diff --git a/languages/pl/tl_module.php b/languages/pl/tl_module.php deleted file mode 100644 index 932b5bfa..00000000 --- a/languages/pl/tl_module.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Powiadomienie + + + Please select a notification. + Wybierz powiadomienie. + + + Activation notification + + + Please select an activation notification. + + + Notification + + + + diff --git a/languages/pl/tl_nc_gateway.php b/languages/pl/tl_nc_gateway.php deleted file mode 100644 index 164ec072..00000000 --- a/languages/pl/tl_nc_gateway.php +++ /dev/null @@ -1,55 +0,0 @@ -downloads).'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['0'] = 'Numer portu'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['1'] = 'Tutaj możesz wprowadzić numer portu. Zostaw pole puste, aby użyć wartości domyślnej.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['0'] = 'Typ pliku'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['1'] = 'Proszę wybrać typ pliku.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['csv'] = 'CSV'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['xml'] = 'Czysty tekst / XML'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['0'] = 'Użytkownik'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['1'] = 'Proszę wprowadzić użytkownika.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_confirm'] = 'Połączenie udane'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_class'] = 'Nie znaleziono klasy FTP!'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_connect'] = 'Połączenie nieudane: %s'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['gateway_legend'] = 'Ustawienia bramki'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['0'] = 'Nowa bramka'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['1'] = 'Utwórz nową bramkę.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['0'] = 'Szczegóły bramki'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['1'] = 'Pokaż szczegóły bramki ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['0'] = 'Nazwa'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['1'] = 'Wprowadź nazwę dla tej bramki.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title_legend'] = 'Nazwa i typ'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['0'] = 'Typ'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['1'] = 'Wybierz typ dla tej bramki.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['email'] = 'Standardowa bramka e-mail'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['file'] = 'Zapisz do pliku'; - diff --git a/languages/pl/tl_nc_gateway.xlf b/languages/pl/tl_nc_gateway.xlf new file mode 100644 index 00000000..cc68aaa7 --- /dev/null +++ b/languages/pl/tl_nc_gateway.xlf @@ -0,0 +1,298 @@ + + + + + + Title + Nazwa + + + Please enter a title for this gateway. + Wprowadź nazwę dla tej bramki. + + + Type + Typ + + + Please select a type for this gateway. + Wybierz typ dla tej bramki. + + + Target gateway + + + This gateway will queue all the messages and then send them over the gateway you define here. + + + Enable poor man's cronjob + + + This will register this queue gateway to the poor man's cronjob. + + + Interval + + + Choose the interval you would like to have this queue gateway be invoked. + + + Number of messages + + + Here you can enter the number of messages that should be sent per invocation. + + + Override SMTP settings + Nadpisz ustawienia SMTP + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + Bramka będzie używać domyślnej konfiguracji e-mail Contao. Jeśli chcesz nadpisać ustawienia SMTP dla tej bramki, zaznacz ten checkbox. + + + File type + Typ pliku + + + Please choose the file type. + Proszę wybrać typ pliku. + + + Connection type + Typ połączenia + + + Please choose the connection type. + Proszę wybrać typ połączenia. + + + Host name + Nazwa hostu + + + Please enter the host name. + Proszę wprowadzić nazwę hostu. + + + Port number + Numer portu + + + Here you can enter the port number. Leave empty to use the default. + Tutaj możesz wprowadzić numer portu. Zostaw pole puste, aby użyć wartości domyślnej. + + + Username + Użytkownik + + + Please enter the username. + Proszę wprowadzić użytkownika. + + + Password + Hasło + + + Please enter the password. + Proszę wprowadzić hasło. + + + Path + Ścieżka + + + Here you can enter the path (e.g. <em>downloads</em>). + Tutaj możesz wprowadzić ścieżkę (np. <em>downloads</em>). + + + Postmark API key + + + Please enter your unique Postmark API key. + + + Enable test mode + + + Here you can enable the test mode. + + + Enable SSL + + + Here you can enable the SSL connection. + + + Send e-mails via SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + + + SMTP hostname + + + Please enter the host name of the SMTP server. + + + SMTP username + + + Here you can enter the SMTP username. + + + SMTP password + + + Here you can enter the SMTP password. + + + SMTP encryption + + + Here you can choose an encryption method (SSL or TLS). + + + SMTP port number + + + Please enter the port number of the SMTP server. + + + Queue + + + Standard email gateway + Standardowa bramka e-mail + + + Write to file + Zapisz do pliku + + + Postmark (postmarkapp.com) + + + Every minute + + + Every hour + + + Every day + + + Every week + + + Every month + + + CSV + CSV + + + Plain Text / XML + Czysty tekst / XML + + + Local + Lokalny + + + FTP + FTP + + + Connection successful + Połączenie udane + + + Could not connect to the FTP server! + Połączenie nieudane: %s + + + Could not login to the FTP server! + + + New gateway + Nowa bramka + + + Create a new gateway. + Utwórz nową bramkę. + + + Edit gateway + Edytuj bramkę + + + Edit gateway ID %s. + Edytuj bramkę ID %s. + + + Copy gateway + Kopiuj bramkę + + + Copy gateway ID %s. + Kopiuj bramkę ID %s. + + + Delete gateway + Usuń bramkę + + + Delete gateway ID %s. + Usuń bramkę ID %s. + + + Gateway details + Szczegóły bramki + + + Show details for gateway ID %s. + Pokaż szczegóły bramki ID %s. + + + Title & type + Nazwa i typ + + + Gateway settings + Ustawienia bramki + + + Cronjob settings + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/pl/tl_nc_language.php b/languages/pl/tl_nc_language.php deleted file mode 100644 index cdc11062..00000000 --- a/languages/pl/tl_nc_language.php +++ /dev/null @@ -1,65 +0,0 @@ -po przecinku. Użyj kreatora pomocy, aby zobaczyć dostępne tokeny.'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['0'] = 'Załączniki z systemu plików'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['1'] = 'Wybierz statyczne pliki, które chcesz załączyć.'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments_legend'] = 'Załączniki'; -$GLOBALS['TL_LANG']['tl_nc_language']['content_legend'] = 'Zawartość'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['0'] = 'Kopiuj język'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['1'] = 'Kopiuj język ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['0'] = 'Usuń język'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['1'] = 'Usuń język ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['0'] = 'Edytuj język'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['1'] = 'Edytuj język ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['0'] = 'HTML'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['1'] = 'Wprowadź zawartość HTML.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['0'] = 'Tryb'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['1'] = 'Wybierz tryb, który będzie użyty do wysłania e-mail.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textAndHtml'] = 'HTML i tekst'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textOnly'] = 'Tylko tekst'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['0'] = 'Wyślij BCC do'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['1'] = 'Odbiorcy, którzy powinni otrzymać ukrytą kopię wiadomości. Wprowadź kilka adresów po przecinku.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['0'] = 'Wyślij CC do'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['1'] = 'Odbiorcy, którzy powinni otrzymać kopię wiadomości. Wprowadź kilka adresów po przecinku.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['0'] = 'Adres "odpowiedz do"'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['1'] = 'Tutaj możesz ustawić adres "odpowiedz do" dla tej wiadomości.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['0'] = 'Adres nadawcy'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['1'] = 'Wprowadź adres e-mail nadawcy.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['0'] = 'Nazwa nadawcy'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['1'] = 'Wprowadź nazwę nadawcy.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['0'] = 'Temat'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['1'] = 'Wprowadź temat e-mail.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['0'] = 'Tekst'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['1'] = 'Wprowadź tekst.'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['0'] = 'Rezerwowy'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['1'] = 'Zaznacz to pole, jeśli język ma być rezerwowy.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['0'] = 'Zawartość pliku'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['1'] = 'Proszę wprowadzić zawartość pliku.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['0'] = 'Nazwa pliku'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['1'] = 'Proszę wprowadzić nazwę pliku bez rozszerzenia.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['0'] = 'Nadpisz istniejący plik'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['1'] = 'Nadpisz istniejący plik, jeśli już istnieje.'; -$GLOBALS['TL_LANG']['tl_nc_language']['general_legend'] = 'Ogólne ustawienia języka'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['0'] = 'Język'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['1'] = 'Wybierz język.'; -$GLOBALS['TL_LANG']['tl_nc_language']['meta_legend'] = 'Informacje meta'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['0'] = 'Nowy język'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['1'] = 'Dodaj nowy język.'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['0'] = 'Odbiorcy'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['1'] = 'Wprowadź listę odbiorców po przecinku. Użyj kreatora pomocy, aby zobaczyć dostępne tokeny.'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['0'] = 'Szczegóły języka'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['1'] = 'Pokaż szczegóły języka ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['token_error'] = 'Następujące tokeny nie są wspierane przez ten typ powiadomienia: %s.'; - diff --git a/languages/pl/tl_nc_language.xlf b/languages/pl/tl_nc_language.xlf new file mode 100644 index 00000000..b580f30e --- /dev/null +++ b/languages/pl/tl_nc_language.xlf @@ -0,0 +1,233 @@ + + + + + + Language + Język + + + Please select a language. + Wybierz język. + + + Fallback + Rezerwowy + + + Activate this checkbox if this language should be your fallback. + Zaznacz to pole, jeśli język ma być rezerwowy. + + + Recipients + Odbiorcy + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + Wprowadź listę odbiorców <strong>po przecinku</strong>. Użyj kreatora pomocy, aby zobaczyć dostępne tokeny. + + + Attachments via tokens + Załączniki z tokenów + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + Wprowadź listę załączników <strong>po przecinku</strong>. Użyj kreatora pomocy, aby zobaczyć dostępne tokeny. + + + Attachments from file system + Załączniki z systemu plików + + + Please choose from the file picker if you would like to add static files. + Wybierz statyczne pliki, które chcesz załączyć. + + + Sender name + Nazwa nadawcy + + + Please enter the sender name. + Wprowadź nazwę nadawcy. + + + Sender address + Adres nadawcy + + + Please enter the sender email address. + Wprowadź adres e-mail nadawcy. + + + Send a CC to + Wyślij CC do + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + Odbiorcy, którzy powinni otrzymać kopię wiadomości. Wprowadź kilka adresów po przecinku. + + + Send a BCC to + Wyślij BCC do + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + Odbiorcy, którzy powinni otrzymać ukrytą kopię wiadomości. Wprowadź kilka adresów po przecinku. + + + Reply-to address + Adres "odpowiedz do" + + + You can optionally set a reply-to address for this message. + Tutaj możesz ustawić adres "odpowiedz do" dla tej wiadomości. + + + Subject + Temat + + + Please enter the subject for the e-mail. + Wprowadź temat e-mail. + + + Mode + Tryb + + + Choose the mode you would like to be used for this email. + Wybierz tryb, który będzie użyty do wysłania e-mail. + + + Raw text + Tekst + + + Please enter the text. + Wprowadź tekst. + + + HTML + HTML + + + Please enter the HTML. + Wprowadź zawartość HTML. + + + External images + + + Do not embed images in HTML emails. + + + File name + Nazwa pliku + + + Please enter the file name. + Proszę wprowadzić nazwę pliku bez rozszerzenia. + + + Storage mode + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + + + File content + Zawartość pliku + + + Please enter the file content. + Proszę wprowadzić zawartość pliku. + + + Text only + Tylko tekst + + + HTML and text + HTML i tekst + + + Create new file + + + Override existing file + + + Append to existing file + + + New language + Nowy język + + + Add a new language. + Dodaj nowy język. + + + Edit language + Edytuj język + + + Edit language ID %s. + Edytuj język ID %s. + + + Copy language + Kopiuj język + + + Copy language ID %s. + Kopiuj język ID %s. + + + Delete language + Usuń język + + + Delete language ID %s. + Usuń język ID %s. + + + Language details + Szczegóły języka + + + Show details for language ID %s. + Pokaż szczegóły języka ID %s. + + + General language settings + Ogólne ustawienia języka + + + Attachments + Załączniki + + + Meta information + Informacje meta + + + Content + Zawartość + + + The following tokens you have used are not supported by this notification type: %s. + Następujące tokeny nie są wspierane przez ten typ powiadomienia: %s. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/pl/tl_nc_message.php b/languages/pl/tl_nc_message.php deleted file mode 100644 index 9428c8b8..00000000 --- a/languages/pl/tl_nc_message.php +++ /dev/null @@ -1,50 +0,0 @@ - + + + + + Title + Nazwa + + + Please enter a title for this message. + Wprowadź nazwę dla tej wiadomości. + + + Gateway + Bramka + + + Please select a gateway for this message. + Wybierz bramkę dla tej wiadomości. + + + Languages + Języki + + + Here you can manage the different languages. + Tutaj możesz zarządzać różnymi językami. + + + Manage languages + Zarządzaj językami + + + Close + Zamknij + + + Priority + Priorytet + + + Please select a priority. + Wybierz priorytet. + + + Template file + Szablon + + + Please choose a template file. + Wybierz pliks zablonu. + + + Tag + + + Here you can enter the tag. + + + Enable open tracking + + + Here you can enable open tracking. + + + Publish message + Publikuj wiadomość + + + Include this message when a notification is being sent. + Załącz tą wiadomość przy wysyłaniu powiadomienia. + + + New message + Nowa wiadomość + + + Create a new message. + Utwórz nową wiadomość. + + + Edit message + Edytuj wiadomość + + + Edit message ID %s. + Edytuj wiadomość ID %s. + + + Duplicate message + Kopiuj wiadomość + + + Duplicate message ID %s. + Kopiuj wiadomość ID %s. + + + Move message + + + Move message ID %s. + + + Delete message + Usuń wiadomość + + + Delete message ID %s. + Usuń wiadomość ID %s. + + + Toggle visibility of message + Zmień widoczność wiadomości + + + Toggle visibility of message ID %s. + Zmień widoczność wiadomości ID %s. + + + Gateway message + Bramka wiadomości + + + Show details for message ID %s. + Pokaż szczegóły wiadomości ID %s. + + + Title & Gateway + Nazwa i bramka + + + Languages + Języki + + + Expert settings + Ustawienia zaawansowane + + + Publish settings + Ustawienia publikacji + + + very high + bardzo wysoki + + + high + wysoki + + + normal + normalny + + + low + niski + + + very low + bardzo niski + + + + diff --git a/languages/pl/tl_nc_notification.php b/languages/pl/tl_nc_notification.php deleted file mode 100644 index 923954be..00000000 --- a/languages/pl/tl_nc_notification.php +++ /dev/null @@ -1,40 +0,0 @@ - + + + + + Title + Nazwa + + + Please enter a title for this notification. + Wprowadź nazwę dla tego powiadomienia. + + + Type + Typ + + + Please select a type for this notification. + Wybierz typ dla tego powiadomienia. + + + Delimiter for lists + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + + + Standard eMail gateway + Standardowa bramka e-mail + + + Write to file + Zapisz do pliku + + + New notification + Nowe powiadomienie + + + Create a new notification. + Utwórz nowe powiadomienie. + + + Manage notifications + Zarządzaj powiadomieniami + + + Manage messages for notification ID %s. + Zarządzaj wiadomościami dla powiadomienia ID %s. + + + Edit notification + Edytuj powiadomienie + + + Edit notification ID %s. + Edytuj powiadomienie ID %s. + + + Copy notification + Kopiuj powiadomienie + + + Copy notification ID %s. + Kopiuj powiadomienie ID %s. + + + Delete notification + Usuń powiadomienie + + + Delete notification ID %s. + Usuń powiadomienie ID %s. + + + Notification details + Szczegóły powiadomienia + + + Show details for notification ID %s. + Pokaż szczegóły powiadomienia ID %s. + + + Title & type + Nazwa i typ + + + Configuration + Konfiguracja + + + Contao + Contao + + + Form submission + Wysłanie formularza + + + This notification type can be sent when the form is submitted. + Ten typ powiadomienia może byś wysłany, gdy zostanie wysłany formularz. + + + Member activation + + + Member registration + Rejestracja użytkownika + + + Member personal data + + + Member lost password + Zaginione hasło użytkownika + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/pl/tl_nc_queue.xlf b/languages/pl/tl_nc_queue.xlf new file mode 100644 index 00000000..01aba32a --- /dev/null +++ b/languages/pl/tl_nc_queue.xlf @@ -0,0 +1,70 @@ + + + + + + Source queue gateway + + + Target gateway + + + Source message + + + Date added to queue + + + Date sent from queue + + + Had an error during delivery process + + + Tokens + + + Language + + + Waiting in queue. + + + Error sending the message. Check the system log for more details. + + + Message sent. + + + Source + + + Add to queue again + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + + + Delete queued message + + + Delete queued message (ID %s). + + + Show details + + + Shows details of the queued message ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/pl/tokens.php b/languages/pl/tokens.php deleted file mode 100644 index be038d93..00000000 --- a/languages/pl/tokens.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + E-mail address of administrator of the current page. + Adres e-mail administratora bieżącej strony. + + + All the form fields. + Wszystkie pola formularza. + + + All the form field labels. + + + All the form fields and their raw values. + + + E-mail address of administrator of the current page. + + + E-mail address of the member. + + + The current domain. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + + + Member fields as they were before the changes. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + + + Output of template "%s" + + + + diff --git a/languages/ru/modules.php b/languages/ru/modules.php deleted file mode 100644 index 581aacf2..00000000 --- a/languages/ru/modules.php +++ /dev/null @@ -1,23 +0,0 @@ - + + + + + Notification Center + Центр уведомлений + + + Notifications + Уведомления + + + Manage notifications. + Управление уведомлениями. + + + Queue + Очередь + + + View the message queue. + Посмотреть очередь сообщений. + + + Gateways + Шлюзы + + + Manage gateways + Управление шлюзами + + + Lost password (Notification Center) + Забытый пароль (Центр уведомлений) + + + Generates a form to request a new password and sends the notification using the notification center. + Создает форму запроса нового пароля и отправляет уведомление с помощью центра уведомлений. + + + Subscribe (Notification Center) + + + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + + + Activate (Notification Center) + + + Generates a form to activate subscription to one or more channels the notification using the notification center. + + + Unsubscribe (Notification Center) + + + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + + + + diff --git a/languages/ru/tl_form.php b/languages/ru/tl_form.php deleted file mode 100644 index 89ab6f5e..00000000 --- a/languages/ru/tl_form.php +++ /dev/null @@ -1,17 +0,0 @@ - + + + + + Notification + Уведомление + + + Please select a notification. + Выберите уведомление. + + + + diff --git a/languages/ru/tl_module.php b/languages/ru/tl_module.php deleted file mode 100644 index cadca140..00000000 --- a/languages/ru/tl_module.php +++ /dev/null @@ -1,18 +0,0 @@ - + + + + + Notification + Уведомление + + + Please select a notification. + Выберите уведомление. + + + Activation notification + Уведомление об активации + + + Please select an activation notification. + Выберите уведомление об активации. + + + Notification + + + + diff --git a/languages/ru/tl_nc_gateway.php b/languages/ru/tl_nc_gateway.php deleted file mode 100644 index b6eaedff..00000000 --- a/languages/ru/tl_nc_gateway.php +++ /dev/null @@ -1,87 +0,0 @@ -downloads).'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['0'] = 'Номер порта'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_port']['1'] = 'Вы можете ввести номер порта. Оставьте поле пустым для использования значения по умолчанию.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['0'] = 'Тип файла'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['1'] = 'Выберите тип файла.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['csv'] = 'CSV'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_type']['xml'] = 'Обычный текст / XML'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['0'] = 'Имя пользователя'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['file_username']['1'] = 'Введите имя пользователя.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_confirm'] = 'Успешное подключение'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_class'] = 'Не удалось найти класс FTP!'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_connect'] = 'Не удалось подключиться к FTP-серверу!'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['ftp_error_login'] = 'Не удалось войти на FTP-сервер!'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['gateway_legend'] = 'Параметры шлюза'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['0'] = 'Новый шлюз'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['new']['1'] = 'Создать новый шлюз.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_key']['0'] = 'Ключ Postmark API'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_key']['1'] = 'Введите уникальный ключ Postmark API.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_ssl']['0'] = 'Включить SSL'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_ssl']['1'] = 'Вы можете включить SSL-соединение.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_test']['0'] = 'Включить тестовый режим'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['postmark_test']['1'] = 'Вы можете включить тестовый режим.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['0'] = 'Интервал'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['1'] = 'Выберите интервал, который хотите использовать для вызова этого шлюза.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['daily'] = 'Каждый день'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['hourly'] = 'Каждый час'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['minutely'] = 'Каждую минуту'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['monthly'] = 'Каждый месяц'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronInterval']['weekly'] = 'Каждую неделю'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronMessages']['0'] = 'Количество сообщений'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_cronMessages']['1'] = 'Вы можете указать количество сообщений, которые должны быть отправлены на вызов.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_targetGateway']['0'] = 'Целевой шлюз'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['queue_targetGateway']['1'] = 'Этот шлюз будет ставить в очередь все сообщения, а затем отправлять их через шлюз, который вы определите.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['0'] = 'Детали шлюза'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['show']['1'] = 'Показать детали шлюза ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpEnc']['0'] = 'Шифрование SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpEnc']['1'] = 'Вы можете выбрать метод шифрования (SSL или TLS).'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpHost']['0'] = 'Имя SMTP-хоста'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpHost']['1'] = 'Введите имя SMTP-сервера.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPass']['0'] = 'Пароль SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPass']['1'] = 'Вы можете ввести пароль SMTP.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPort']['0'] = 'Порт SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpPort']['1'] = 'Введите номер порта SMTP-сервера.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpUser']['0'] = 'Имя пользователя SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['smtpUser']['1'] = 'Вы можете ввести имя пользователя SMTP.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['0'] = 'Название'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title']['1'] = 'Введите название этого шлюза.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['title_legend'] = 'Название и тип'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['0'] = 'Тип'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['1'] = 'Выберите тип этого шлюза.'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['email'] = 'Стандарт почтового шлюза'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['file'] = 'Запись в файл'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['postmark'] = 'Почтовые марки (postmarkapp.com)'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['type']['queue'] = 'Очередь'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['useSMTP']['0'] = 'Отправлять E-mail через SMTP'; -$GLOBALS['TL_LANG']['tl_nc_gateway']['useSMTP']['1'] = 'Использовать SMTP-сервер, а не функцию PHP mail() для отправки электронной почты.'; - diff --git a/languages/ru/tl_nc_gateway.xlf b/languages/ru/tl_nc_gateway.xlf new file mode 100644 index 00000000..839f66a4 --- /dev/null +++ b/languages/ru/tl_nc_gateway.xlf @@ -0,0 +1,330 @@ + + + + + + Title + Название + + + Please enter a title for this gateway. + Введите название этого шлюза. + + + Type + Тип + + + Please select a type for this gateway. + Выберите тип этого шлюза. + + + Target gateway + Целевой шлюз + + + This gateway will queue all the messages and then send them over the gateway you define here. + Этот шлюз будет ставить в очередь все сообщения, а затем отправлять их через шлюз, который вы определите. + + + Enable poor man's cronjob + + + This will register this queue gateway to the poor man's cronjob. + + + Interval + Интервал + + + Choose the interval you would like to have this queue gateway be invoked. + Выберите интервал, который хотите использовать для вызова этого шлюза. + + + Number of messages + Количество сообщений + + + Here you can enter the number of messages that should be sent per invocation. + Вы можете указать количество сообщений, которые должны быть отправлены на вызов. + + + Override SMTP settings + Переопределить параметры SMTP + + + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + Этот шлюз будет использовать параметры электронной почты Contao по умолчанию. Если вы хотите переопределить параметры SMTP для конкретного шлюза, активируйте этот чекбокс. + + + File type + Тип файла + + + Please choose the file type. + Выберите тип файла. + + + Connection type + Тип подключения + + + Please choose the connection type. + Выберите тип подключения. + + + Host name + Имя хоста + + + Please enter the host name. + Введите имя хоста. + + + Port number + Номер порта + + + Here you can enter the port number. Leave empty to use the default. + Вы можете ввести номер порта. Оставьте поле пустым для использования значения по умолчанию. + + + Username + Имя пользователя + + + Please enter the username. + Введите имя пользователя. + + + Password + Пароль + + + Please enter the password. + Введите пароль. + + + Path + Путь + + + Here you can enter the path (e.g. <em>downloads</em>). + Вы можете ввести путь (напр., <em>downloads</em>). + + + Postmark API key + Ключ Postmark API + + + Please enter your unique Postmark API key. + Введите уникальный ключ Postmark API. + + + Enable test mode + Включить тестовый режим + + + Here you can enable the test mode. + Вы можете включить тестовый режим. + + + Enable SSL + Включить SSL + + + Here you can enable the SSL connection. + Вы можете включить SSL-соединение. + + + Send e-mails via SMTP + Отправлять E-mail через SMTP + + + Use an SMTP server instead of the PHP mail() function to send e-mails. + Использовать SMTP-сервер, а не функцию PHP mail() для отправки электронной почты. + + + SMTP hostname + Имя SMTP-хоста + + + Please enter the host name of the SMTP server. + Введите имя SMTP-сервера. + + + SMTP username + Имя пользователя SMTP + + + Here you can enter the SMTP username. + Вы можете ввести имя пользователя SMTP. + + + SMTP password + Пароль SMTP + + + Here you can enter the SMTP password. + Вы можете ввести пароль SMTP. + + + SMTP encryption + Шифрование SMTP + + + Here you can choose an encryption method (SSL or TLS). + Вы можете выбрать метод шифрования (SSL или TLS). + + + SMTP port number + Порт SMTP + + + Please enter the port number of the SMTP server. + Введите номер порта SMTP-сервера. + + + Queue + Очередь + + + Standard email gateway + Стандарт почтового шлюза + + + Write to file + Запись в файл + + + Postmark (postmarkapp.com) + Почтовые марки (postmarkapp.com) + + + Every minute + Каждую минуту + + + Every hour + Каждый час + + + Every day + Каждый день + + + Every week + Каждую неделю + + + Every month + Каждый месяц + + + CSV + CSV + + + Plain Text / XML + Обычный текст / XML + + + Local + Локальный + + + FTP + FTP + + + Connection successful + Успешное подключение + + + Could not connect to the FTP server! + Не удалось подключиться к FTP-серверу! + + + Could not login to the FTP server! + Не удалось войти на FTP-сервер! + + + New gateway + Новый шлюз + + + Create a new gateway. + Создать новый шлюз. + + + Edit gateway + Редактировать шлюз + + + Edit gateway ID %s. + Редактировать шлюз ID %s. + + + Copy gateway + Копировать шлюз + + + Copy gateway ID %s. + Копировать шлюз ID %s. + + + Delete gateway + Удалить шлюз + + + Delete gateway ID %s. + Удалить шлюз ID %s. + + + Gateway details + Детали шлюза + + + Show details for gateway ID %s. + Показать детали шлюза ID %s. + + + Title & type + Название и тип + + + Gateway settings + Параметры шлюза + + + Cronjob settings + + + Queued messages will remain in the queue forever unless +you trigger the sending mechanism by either using a real cron job or +the Contao internal poor man's cronjob. The Notification Center is shipped +with a binary that can be executed using a real cronjob. To setup a real cronjob +that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, +you would need to setup the following crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same +flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by +PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. +<br><br> +<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + + + Delayed delivery + + + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + + + + diff --git a/languages/ru/tl_nc_language.php b/languages/ru/tl_nc_language.php deleted file mode 100644 index be533751..00000000 --- a/languages/ru/tl_nc_language.php +++ /dev/null @@ -1,73 +0,0 @@ -разделенный запятыми список маркеров в этой области. Используйте авто-завершение, чтобы увидеть доступные маркеры.'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['0'] = 'Вложения из файловой системы'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments']['1'] = 'Выберите при помощи файл-менеджера и добавьте статические файлы.'; -$GLOBALS['TL_LANG']['tl_nc_language']['attachments_legend'] = 'Вложения'; -$GLOBALS['TL_LANG']['tl_nc_language']['content_legend'] = 'Контент'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['0'] = 'Копировать язык'; -$GLOBALS['TL_LANG']['tl_nc_language']['copy']['1'] = 'Копировать язык ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['0'] = 'Удалить язык'; -$GLOBALS['TL_LANG']['tl_nc_language']['delete']['1'] = 'Удалить язык ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['0'] = 'Редактировать язык'; -$GLOBALS['TL_LANG']['tl_nc_language']['edit']['1'] = 'Редактировать язык ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_external_images']['0'] = 'Внешние изображения'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_external_images']['1'] = 'Не вставлять изображения в HTML-сообщения.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['0'] = 'HTML'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_html']['1'] = 'Введите HTML.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['0'] = 'Режим'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['1'] = 'Выберите используемый режим для этого письма.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textAndHtml'] = 'HTML и текст'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_mode']['textOnly'] = 'Только текст'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['0'] = 'Отправить СК'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_bcc']['1'] = 'Получатели, которые должны получить скрытую копию по электронной почте. Несколько адресов можно разделить запятой.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['0'] = 'Отправить CC'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_recipient_cc']['1'] = 'Получатели, которые должны получить копию по электронной почте. Несколько адресов можно разделить запятой.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['0'] = 'Адрес для ответа'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_replyTo']['1'] = 'При необходимости можно задать адрес для ответа на данное сообщение.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['0'] = 'Адрес отправителя'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_address']['1'] = 'Введите адрес электронной почты отправителя.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['0'] = 'Имя отправителя'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_sender_name']['1'] = 'Введите имя отправителя.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['0'] = 'Тема'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_subject']['1'] = 'Введите тему сообщения.'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['0'] = 'Неформатированный текст'; -$GLOBALS['TL_LANG']['tl_nc_language']['email_text']['1'] = 'Введите текст.'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['0'] = 'Резервный'; -$GLOBALS['TL_LANG']['tl_nc_language']['fallback']['1'] = 'Выберите чекбокс, если этот язык должен быть резервным.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['0'] = 'Содержимое файла'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_content']['1'] = 'Введите содержимое файла.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['0'] = 'Имя файла'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_name']['1'] = 'Введите имя файла.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['0'] = 'Переписать существующий файл'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_override']['1'] = 'Переписать старый файл, если он уже существует.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['0'] = 'Режим хранения'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['1'] = 'Вы можете выбрать, переопределить или добавить существующий файл, если он есть.'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['append'] = 'Добавить в существующий файл'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['create'] = 'Создать новый файл'; -$GLOBALS['TL_LANG']['tl_nc_language']['file_storage_mode']['override'] = 'Переопределить существующий файл'; -$GLOBALS['TL_LANG']['tl_nc_language']['general_legend'] = 'Общие параметры языка'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['0'] = 'Язык'; -$GLOBALS['TL_LANG']['tl_nc_language']['language']['1'] = 'Выберите язык.'; -$GLOBALS['TL_LANG']['tl_nc_language']['meta_legend'] = 'Мета информация'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['0'] = 'Новый язык'; -$GLOBALS['TL_LANG']['tl_nc_language']['new']['1'] = 'Добавить новый язык.'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['0'] = 'Получатели'; -$GLOBALS['TL_LANG']['tl_nc_language']['recipients']['1'] = 'Введите разделенный запятыми список получателей. Используйте авто-завершение, чтобы увидеть доступные маркеры.'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['0'] = 'Детали языка'; -$GLOBALS['TL_LANG']['tl_nc_language']['show']['1'] = 'Показать детали языка ID %s.'; -$GLOBALS['TL_LANG']['tl_nc_language']['token_character_error'] = 'В вашем содержании указаны недопустимые токены. Простые токены не могут содержать любой из этих символов: <>!=*. Они либо используются для сравнения в операторах "if", либо в виде подстановочных знаков.'; -$GLOBALS['TL_LANG']['tl_nc_language']['token_error'] = 'Используемые вами маркеры не поддерживают этот тип уведомлений: %s.'; - diff --git a/languages/ru/tl_nc_language.xlf b/languages/ru/tl_nc_language.xlf new file mode 100644 index 00000000..6c241324 --- /dev/null +++ b/languages/ru/tl_nc_language.xlf @@ -0,0 +1,241 @@ + + + + + + Language + Язык + + + Please select a language. + Выберите язык. + + + Fallback + Резервный + + + Activate this checkbox if this language should be your fallback. + Выберите чекбокс, если этот язык должен быть резервным. + + + Recipients + Получатели + + + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + Введите <strong>разделенный запятыми</strong> список получателей. Используйте авто-завершение, чтобы увидеть доступные маркеры. + + + Attachments via tokens + Вложения через маркеры + + + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + Введите <strong>разделенный запятыми</strong> список маркеров в этой области. Используйте авто-завершение, чтобы увидеть доступные маркеры. + + + Attachments from file system + Вложения из файловой системы + + + Please choose from the file picker if you would like to add static files. + Выберите при помощи файл-менеджера и добавьте статические файлы. + + + Sender name + Имя отправителя + + + Please enter the sender name. + Введите имя отправителя. + + + Sender address + Адрес отправителя + + + Please enter the sender email address. + Введите адрес электронной почты отправителя. + + + Send a CC to + Отправить CC + + + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + Получатели, которые должны получить копию по электронной почте. Несколько адресов можно разделить запятой. + + + Send a BCC to + Отправить СК + + + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + Получатели, которые должны получить скрытую копию по электронной почте. Несколько адресов можно разделить запятой. + + + Reply-to address + Адрес для ответа + + + You can optionally set a reply-to address for this message. + При необходимости можно задать адрес для ответа на данное сообщение. + + + Subject + Тема + + + Please enter the subject for the e-mail. + Введите тему сообщения. + + + Mode + Режим + + + Choose the mode you would like to be used for this email. + Выберите используемый режим для этого письма. + + + Raw text + Неформатированный текст + + + Please enter the text. + Введите текст. + + + HTML + HTML + + + Please enter the HTML. + Введите HTML. + + + External images + Внешние изображения + + + Do not embed images in HTML emails. + Не вставлять изображения в HTML-сообщения. + + + File name + Имя файла + + + Please enter the file name. + Введите имя файла. + + + Storage mode + Режим хранения + + + Here you can choose whether you want to override the existing file or append to an existing file if present. + Вы можете выбрать, переопределить или добавить существующий файл, если он есть. + + + File content + Содержимое файла + + + Please enter the file content. + Введите содержимое файла. + + + Text only + Только текст + + + HTML and text + HTML и текст + + + Create new file + Создать новый файл + + + Override existing file + Переопределить существующий файл + + + Append to existing file + Добавить в существующий файл + + + New language + Новый язык + + + Add a new language. + Добавить новый язык. + + + Edit language + Редактировать язык + + + Edit language ID %s. + Редактировать язык ID %s. + + + Copy language + Копировать язык + + + Copy language ID %s. + Копировать язык ID %s. + + + Delete language + Удалить язык + + + Delete language ID %s. + Удалить язык ID %s. + + + Language details + Детали языка + + + Show details for language ID %s. + Показать детали языка ID %s. + + + General language settings + Общие параметры языка + + + Attachments + Вложения + + + Meta information + Мета информация + + + Content + Контент + + + The following tokens you have used are not supported by this notification type: %s. + Используемые вами маркеры не поддерживают этот тип уведомлений: %s. + + + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + В вашем содержании указаны недопустимые токены. Простые токены не могут содержать любой из этих символов: <>!=*. Они либо используются для сравнения в операторах "if", либо в виде подстановочных знаков. + + + Attachments from templates + + + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + + + + diff --git a/languages/ru/tl_nc_message.php b/languages/ru/tl_nc_message.php deleted file mode 100644 index 7f6f7bbf..00000000 --- a/languages/ru/tl_nc_message.php +++ /dev/null @@ -1,55 +0,0 @@ - + + + + + Title + Название + + + Please enter a title for this message. + Введите название данного сообщения. + + + Gateway + Шлюз + + + Please select a gateway for this message. + Выберите шлюз для этого сообщения. + + + Languages + Языки + + + Here you can manage the different languages. + Вы можете управлять различными языками. + + + Manage languages + Управление языками + + + Close + Закрыть + + + Priority + Приоритет + + + Please select a priority. + Выберите приоритет. + + + Template file + Файл шаблона + + + Please choose a template file. + Выберите файл шаблона. + + + Tag + Тег + + + Here you can enter the tag. + Вы можете ввести тег. + + + Enable open tracking + Включить открытое отслеживание + + + Here you can enable open tracking. + Вы можете включить открытое отслеживание. + + + Publish message + Опубликовать сообщение + + + Include this message when a notification is being sent. + Включить это сообщение при отправке уведомления. + + + New message + Новое сообщение + + + Create a new message. + Создать новое сообщение. + + + Edit message + Редактировать сообщение + + + Edit message ID %s. + Редактировать сообщение ID %s. + + + Duplicate message + Дублировать сообщение + + + Duplicate message ID %s. + Дублировать сообщение ID %s. + + + Move message + Переместить сообщение + + + Move message ID %s. + Переместить сообщение ID %s. + + + Delete message + Удалить сообщение + + + Delete message ID %s. + Удалить сообщение ID %s. + + + Toggle visibility of message + Переключить видимость сообщения + + + Toggle visibility of message ID %s. + Переключить видимость сообщения ID %s. + + + Gateway message + Сообщение шлюза + + + Show details for message ID %s. + Показать детали для сообщения ID %s. + + + Title & Gateway + Название и шлюз + + + Languages + Языки + + + Expert settings + Экспертные настройки + + + Publish settings + Настройки публикации + + + very high + очень высокий + + + high + высокий + + + normal + нормальный + + + low + низкий + + + very low + очень низкий + + + + diff --git a/languages/ru/tl_nc_notification.php b/languages/ru/tl_nc_notification.php deleted file mode 100644 index a055a792..00000000 --- a/languages/ru/tl_nc_notification.php +++ /dev/null @@ -1,44 +0,0 @@ - + + + + + Title + Название + + + Please enter a title for this notification. + Введите название этого уведомления. + + + Type + Тип + + + Please select a type for this notification. + Выберите тип данного уведомления. + + + Delimiter for lists + Разделитель для списков + + + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + При отправке значений списка (значений массива), Центр уведомлений автоматически выравнивает их по умолчанию с помощью запятой (","). Измените это, если хотите. + + + Standard eMail gateway + Стандарт почтового шлюза + + + Write to file + Запись в файл + + + New notification + Новое уведомление + + + Create a new notification. + Создать новое уведомление. + + + Manage notifications + Управление уведомлениями + + + Manage messages for notification ID %s. + Управление сообщениями для уведомления ID %s. + + + Edit notification + Редактировать уведомление + + + Edit notification ID %s. + Редактировать уведомление ID %s. + + + Copy notification + Копировать уведомление + + + Copy notification ID %s. + Копировать уведомление ID %s. + + + Delete notification + Удалить уведомление + + + Delete notification ID %s. + Удалить уведомление ID %s. + + + Notification details + Детали уведомления + + + Show details for notification ID %s. + Показать детали уведомления ID %s. + + + Title & type + Название и тип + + + Configuration + Конфигурация + + + Contao + Contao + + + Form submission + Отправка формы + + + This notification type can be sent when the form is submitted. + Тип уведомления может быть отправлен при отправке формы. + + + Member activation + Активация участников + + + Member registration + Регистрация участника + + + Member personal data + Персональные данные участника + + + Member lost password + Забытый пароль участника + + + Token Templates + + + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + + + Templates + + + Newsletter subscribed + + + Newsletter activation + + + Newsletter unsubscribed + + + + diff --git a/languages/ru/tl_nc_queue.php b/languages/ru/tl_nc_queue.php deleted file mode 100644 index 8cbd2b71..00000000 --- a/languages/ru/tl_nc_queue.php +++ /dev/null @@ -1,34 +0,0 @@ - + + + + + Source queue gateway + Шлюз источника очереди + + + Target gateway + Целевой шлюз + + + Source message + Исходное сообщение + + + Date added to queue + Дата добавления в очередь + + + Date sent from queue + Дата отправки из очереди + + + Had an error during delivery process + Если в процессе доставки произошла ошибка + + + Tokens + Токены + + + Language + Язык + + + Waiting in queue. + Ожидание в очереди. + + + Error sending the message. Check the system log for more details. + Ошибка отправки сообщения. Проверьте системный журнал для получения более подробной информации. + + + Message sent. + Сообщение отправлено. + + + Source + Источник + + + Add to queue again + Добавить в очередь еще раз + + + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + Сообщение в очереди (ID %s) обнаружило ошибку, но вы можете повторно добавить его в очередь, нажав эту кнопку. + + + Delete queued message + Удалить сообщение в очереди + + + Delete queued message (ID %s). + Удалить сообщение в очереди (ID %s). + + + Show details + Показать детали + + + Shows details of the queued message ID %s. + Показать детали о сообщении в очереди ID %s. + + + Are you sure you want to re-add queued message ID %s to the queue? + Вы действительно хотите повторно добавить сообщение из очереди ID %s в очередь? + + + Date delayed in queue + + + Attachments + + + + diff --git a/languages/ru/tokens.php b/languages/ru/tokens.php deleted file mode 100644 index 069d5ca9..00000000 --- a/languages/ru/tokens.php +++ /dev/null @@ -1,24 +0,0 @@ - + + + + + E-mail address of administrator of the current page. + Адрес электронной почты администратора текущей страницы. + + + All the form fields. + Все поля формы. + + + All the form field labels. + Все метки полей формы. + + + All the form fields and their raw values. + Все поля формы и их начальные значения. + + + E-mail address of administrator of the current page. + Адрес электронной почты администратора текущей страницы. + + + E-mail address of the member. + Адрес электронной почты участника. + + + The current domain. + Текущий домен. + + + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + Текущие поля участника, представленные формой. Используйте вставку тега {{user::*}}, если вам нужны другие свойства. + + + Member fields as they were before the changes. + Поля пользователя, какими они были до изменений. + + + Flag (1 or 0) if a field has changed, to be used with if-conditions. + Флаг (1 или 0), если поле изменилось, для использования с условиями "if". + + + Output of template "%s" + + + + From 0996e2cb42aa83f3f9aae7e04ccc73a2aed3689e Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Mon, 22 Oct 2018 11:40:06 +0200 Subject: [PATCH 50/51] Dropped unmaintained languages --- languages/fa/modules.xlf | 52 ------ languages/fa/tl_form.xlf | 13 -- languages/fa/tl_module.xlf | 22 --- languages/fa/tl_nc_gateway.xlf | 258 ---------------------------- languages/fa/tl_nc_language.xlf | 184 -------------------- languages/fa/tl_nc_message.xlf | 130 -------------- languages/fa/tl_nc_notification.xlf | 112 ------------ languages/fa/tl_nc_queue.xlf | 70 -------- languages/fa/tokens.xlf | 40 ----- languages/fi/modules.xlf | 52 ------ languages/fi/tl_form.xlf | 13 -- languages/fi/tl_module.xlf | 22 --- languages/fi/tl_nc_gateway.xlf | 258 ---------------------------- languages/fi/tl_nc_language.xlf | 184 -------------------- languages/fi/tl_nc_message.xlf | 130 -------------- languages/fi/tl_nc_notification.xlf | 112 ------------ languages/fi/tl_nc_queue.xlf | 70 -------- languages/fi/tokens.xlf | 40 ----- 18 files changed, 1762 deletions(-) delete mode 100644 languages/fa/modules.xlf delete mode 100644 languages/fa/tl_form.xlf delete mode 100644 languages/fa/tl_module.xlf delete mode 100644 languages/fa/tl_nc_gateway.xlf delete mode 100644 languages/fa/tl_nc_language.xlf delete mode 100644 languages/fa/tl_nc_message.xlf delete mode 100644 languages/fa/tl_nc_notification.xlf delete mode 100644 languages/fa/tl_nc_queue.xlf delete mode 100644 languages/fa/tokens.xlf delete mode 100644 languages/fi/modules.xlf delete mode 100644 languages/fi/tl_form.xlf delete mode 100644 languages/fi/tl_module.xlf delete mode 100644 languages/fi/tl_nc_gateway.xlf delete mode 100644 languages/fi/tl_nc_language.xlf delete mode 100644 languages/fi/tl_nc_message.xlf delete mode 100644 languages/fi/tl_nc_notification.xlf delete mode 100644 languages/fi/tl_nc_queue.xlf delete mode 100644 languages/fi/tokens.xlf diff --git a/languages/fa/modules.xlf b/languages/fa/modules.xlf deleted file mode 100644 index 4766e121..00000000 --- a/languages/fa/modules.xlf +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - Notification Center - - - Notifications - - - Manage notifications. - - - Queue - - - View the message queue. - - - Gateways - - - Manage gateways - - - Lost password (Notification Center) - - - Generates a form to request a new password and sends the notification using the notification center. - - - Subscribe (Notification Center) - - - Generates a form to subscribe to one or more channels and sends the notification using the notification center. - - - Activate (Notification Center) - - - Generates a form to activate subscription to one or more channels the notification using the notification center. - - - Unsubscribe (Notification Center) - - - Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. - - - - diff --git a/languages/fa/tl_form.xlf b/languages/fa/tl_form.xlf deleted file mode 100644 index b5bcf668..00000000 --- a/languages/fa/tl_form.xlf +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Notification - - - Please select a notification. - - - - diff --git a/languages/fa/tl_module.xlf b/languages/fa/tl_module.xlf deleted file mode 100644 index d20ee1f9..00000000 --- a/languages/fa/tl_module.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Notification - - - Please select a notification. - - - Activation notification - - - Please select an activation notification. - - - Notification - - - - diff --git a/languages/fa/tl_nc_gateway.xlf b/languages/fa/tl_nc_gateway.xlf deleted file mode 100644 index 50150004..00000000 --- a/languages/fa/tl_nc_gateway.xlf +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - Title - - - Please enter a title for this gateway. - - - Type - - - Please select a type for this gateway. - - - Target gateway - - - This gateway will queue all the messages and then send them over the gateway you define here. - - - Enable poor man's cronjob - - - This will register this queue gateway to the poor man's cronjob. - - - Interval - - - Choose the interval you would like to have this queue gateway be invoked. - - - Number of messages - - - Here you can enter the number of messages that should be sent per invocation. - - - Override SMTP settings - - - This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. - - - File type - - - Please choose the file type. - - - Connection type - - - Please choose the connection type. - - - Host name - - - Please enter the host name. - - - Port number - - - Here you can enter the port number. Leave empty to use the default. - - - Username - - - Please enter the username. - - - Password - - - Please enter the password. - - - Path - - - Here you can enter the path (e.g. <em>downloads</em>). - - - Postmark API key - - - Please enter your unique Postmark API key. - - - Enable test mode - - - Here you can enable the test mode. - - - Enable SSL - - - Here you can enable the SSL connection. - - - Send e-mails via SMTP - - - Use an SMTP server instead of the PHP mail() function to send e-mails. - - - SMTP hostname - - - Please enter the host name of the SMTP server. - - - SMTP username - - - Here you can enter the SMTP username. - - - SMTP password - - - Here you can enter the SMTP password. - - - SMTP encryption - - - Here you can choose an encryption method (SSL or TLS). - - - SMTP port number - - - Please enter the port number of the SMTP server. - - - Queue - - - Standard email gateway - - - Write to file - - - Postmark (postmarkapp.com) - - - Every minute - - - Every hour - - - Every day - - - Every week - - - Every month - - - CSV - - - Plain Text / XML - - - Local - - - FTP - - - Connection successful - - - Could not connect to the FTP server! - - - New gateway - - - Create a new gateway. - - - Edit gateway - - - Edit gateway ID %s. - - - Copy gateway - - - Copy gateway ID %s. - - - Delete gateway - - - Delete gateway ID %s. - - - Gateway details - - - Show details for gateway ID %s. - - - Title & type - - - Gateway settings - - - Cronjob settings - - - Queued messages will remain in the queue forever unless -you trigger the sending mechanism by either using a real cron job or -the Contao internal poor man's cronjob. The Notification Center is shipped -with a binary that can be executed using a real cronjob. To setup a real cronjob -that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, -you would need to setup the following crontab: -<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> -or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: -<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> -If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same -flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by -PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. -<br><br> -<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: -<blockquote> -/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue -</blockquote> - - - - Could not login to the FTP server! - - - Delayed delivery - - - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). - - - - diff --git a/languages/fa/tl_nc_language.xlf b/languages/fa/tl_nc_language.xlf deleted file mode 100644 index 474d968c..00000000 --- a/languages/fa/tl_nc_language.xlf +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - Language - - - Please select a language. - - - Fallback - - - Activate this checkbox if this language should be your fallback. - - - Recipients - - - Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. - - - Attachments via tokens - - - Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. - - - Attachments from file system - - - Please choose from the file picker if you would like to add static files. - - - Sender name - - - Please enter the sender name. - - - Sender address - - - Please enter the sender email address. - - - Send a CC to - - - Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. - - - Send a BCC to - - - Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. - - - Reply-to address - - - You can optionally set a reply-to address for this message. - - - Subject - - - Please enter the subject for the e-mail. - - - Mode - - - Choose the mode you would like to be used for this email. - - - Raw text - - - Please enter the text. - - - HTML - - - Please enter the HTML. - - - File name - - - Please enter the file name. - - - Storage mode - - - Here you can choose whether you want to override the existing file or append to an existing file if present. - - - File content - - - Please enter the file content. - - - Text only - - - HTML and text - - - Create new file - - - Override existing file - - - Append to existing file - - - New language - - - Add a new language. - - - Edit language - - - Edit language ID %s. - - - Copy language - - - Copy language ID %s. - - - Delete language - - - Delete language ID %s. - - - Language details - - - Show details for language ID %s. - - - General language settings - - - Attachments - - - Meta information - - - Content - - - The following tokens you have used are not supported by this notification type: %s. - - - External images - - - Do not embed images in HTML emails. - - - Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. - - - Attachments from templates - - - These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. - - - - diff --git a/languages/fa/tl_nc_message.xlf b/languages/fa/tl_nc_message.xlf deleted file mode 100644 index f34fe3cb..00000000 --- a/languages/fa/tl_nc_message.xlf +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Title - - - Please enter a title for this message. - - - Gateway - - - Please select a gateway for this message. - - - Languages - - - Here you can manage the different languages. - - - Manage languages - - - Close - - - Priority - - - Please select a priority. - - - Template file - - - Please choose a template file. - - - Tag - - - Here you can enter the tag. - - - Enable open tracking - - - Here you can enable open tracking. - - - Publish message - - - Include this message when a notification is being sent. - - - New message - - - Create a new message. - - - Edit message - - - Edit message ID %s. - - - Duplicate message - - - Duplicate message ID %s. - - - Move message - - - Move message ID %s. - - - Delete message - - - Delete message ID %s. - - - Toggle visibility of message - - - Toggle visibility of message ID %s. - - - Gateway message - - - Show details for message ID %s. - - - Title & Gateway - - - Languages - - - Expert settings - - - Publish settings - - - very high - - - high - - - normal - - - low - - - very low - - - - diff --git a/languages/fa/tl_nc_notification.xlf b/languages/fa/tl_nc_notification.xlf deleted file mode 100644 index c620739b..00000000 --- a/languages/fa/tl_nc_notification.xlf +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Title - - - Please enter a title for this notification. - - - Type - - - Please select a type for this notification. - - - Standard eMail gateway - - - Write to file - - - New notification - - - Create a new notification. - - - Manage notifications - - - Manage messages for notification ID %s. - - - Edit notification - - - Edit notification ID %s. - - - Copy notification - - - Copy notification ID %s. - - - Delete notification - - - Delete notification ID %s. - - - Notification details - - - Show details for notification ID %s. - - - Title & type - - - Configuration - - - Contao - - - Form submission - - - This notification type can be sent when the form is submitted. - - - Member registration - - - Member personal data - - - Member lost password - - - Delimiter for lists - - - When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. - - - Member activation - - - Token Templates - - - Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. - - - Templates - - - Newsletter subscribed - - - Newsletter activation - - - Newsletter unsubscribed - - - - diff --git a/languages/fa/tl_nc_queue.xlf b/languages/fa/tl_nc_queue.xlf deleted file mode 100644 index 70d7806b..00000000 --- a/languages/fa/tl_nc_queue.xlf +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - Source queue gateway - - - Target gateway - - - Source message - - - Date added to queue - - - Date sent from queue - - - Had an error during delivery process - - - Tokens - - - Language - - - Waiting in queue. - - - Error sending the message. Check the system log for more details. - - - Message sent. - - - Source - - - Add to queue again - - - This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. - - - Delete queued message - - - Delete queued message (ID %s). - - - Show details - - - Shows details of the queued message ID %s. - - - Are you sure you want to re-add queued message ID %s to the queue? - - - Date delayed in queue - - - Attachments - - - - diff --git a/languages/fa/tokens.xlf b/languages/fa/tokens.xlf deleted file mode 100644 index 2ed3fc49..00000000 --- a/languages/fa/tokens.xlf +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - E-mail address of administrator of the current page. - - - All the form fields. - - - All the form fields and their raw values. - - - All the form field labels. - - - E-mail address of administrator of the current page. - - - E-mail address of the member. - - - The current domain. - - - Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. - - - Member fields as they were before the changes. - - - Flag (1 or 0) if a field has changed, to be used with if-conditions. - - - Output of template "%s" - - - - diff --git a/languages/fi/modules.xlf b/languages/fi/modules.xlf deleted file mode 100644 index 9474190e..00000000 --- a/languages/fi/modules.xlf +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - Notification Center - - - Notifications - - - Manage notifications. - - - Queue - - - View the message queue. - - - Gateways - - - Manage gateways - - - Lost password (Notification Center) - - - Generates a form to request a new password and sends the notification using the notification center. - - - Subscribe (Notification Center) - - - Generates a form to subscribe to one or more channels and sends the notification using the notification center. - - - Activate (Notification Center) - - - Generates a form to activate subscription to one or more channels the notification using the notification center. - - - Unsubscribe (Notification Center) - - - Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. - - - - diff --git a/languages/fi/tl_form.xlf b/languages/fi/tl_form.xlf deleted file mode 100644 index 91ecad4b..00000000 --- a/languages/fi/tl_form.xlf +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Notification - - - Please select a notification. - - - - diff --git a/languages/fi/tl_module.xlf b/languages/fi/tl_module.xlf deleted file mode 100644 index f331f572..00000000 --- a/languages/fi/tl_module.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Notification - - - Please select a notification. - - - Activation notification - - - Please select an activation notification. - - - Notification - - - - diff --git a/languages/fi/tl_nc_gateway.xlf b/languages/fi/tl_nc_gateway.xlf deleted file mode 100644 index 08685762..00000000 --- a/languages/fi/tl_nc_gateway.xlf +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - Title - - - Please enter a title for this gateway. - - - Type - - - Please select a type for this gateway. - - - Target gateway - - - This gateway will queue all the messages and then send them over the gateway you define here. - - - Enable poor man's cronjob - - - This will register this queue gateway to the poor man's cronjob. - - - Interval - - - Choose the interval you would like to have this queue gateway be invoked. - - - Number of messages - - - Here you can enter the number of messages that should be sent per invocation. - - - Override SMTP settings - - - This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. - - - File type - - - Please choose the file type. - - - Connection type - - - Please choose the connection type. - - - Host name - - - Please enter the host name. - - - Port number - - - Here you can enter the port number. Leave empty to use the default. - - - Username - - - Please enter the username. - - - Password - - - Please enter the password. - - - Path - - - Here you can enter the path (e.g. <em>downloads</em>). - - - Postmark API key - - - Please enter your unique Postmark API key. - - - Enable test mode - - - Here you can enable the test mode. - - - Enable SSL - - - Here you can enable the SSL connection. - - - Send e-mails via SMTP - - - Use an SMTP server instead of the PHP mail() function to send e-mails. - - - SMTP hostname - - - Please enter the host name of the SMTP server. - - - SMTP username - - - Here you can enter the SMTP username. - - - SMTP password - - - Here you can enter the SMTP password. - - - SMTP encryption - - - Here you can choose an encryption method (SSL or TLS). - - - SMTP port number - - - Please enter the port number of the SMTP server. - - - Queue - - - Standard email gateway - - - Write to file - - - Postmark (postmarkapp.com) - - - Every minute - - - Every hour - - - Every day - - - Every week - - - Every month - - - CSV - - - Plain Text / XML - - - Local - - - FTP - - - Connection successful - - - Could not connect to the FTP server! - - - New gateway - - - Create a new gateway. - - - Edit gateway - - - Edit gateway ID %s. - - - Copy gateway - - - Copy gateway ID %s. - - - Delete gateway - - - Delete gateway ID %s. - - - Gateway details - - - Show details for gateway ID %s. - - - Title & type - - - Gateway settings - - - Cronjob settings - - - Queued messages will remain in the queue forever unless -you trigger the sending mechanism by either using a real cron job or -the Contao internal poor man's cronjob. The Notification Center is shipped -with a binary that can be executed using a real cronjob. To setup a real cronjob -that invokes the queue of this queue gateway (ID: {gateway_id}) and send 15 messages every 10 minutes, -you would need to setup the following crontab: -<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> -or let's say you want to send 30 messages every 5 minutes after every hour, then you would set it up like this: -<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> -If you don't have access to real cronjobs then you can enable the poor man's cron. Note that it doesn't provide the same -flexibility in terms of interval settings and it is subject to the web execution context and thus certainly affected by -PHP configurations such as the maximum execution time. Thus, try to keep the number of messages sent per invocation as low as possible. -<br><br> -<strong>Note: </strong>When you installed the notification center using Composer, the path to the binary differs: -<blockquote> -/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue -</blockquote> - - - - Could not login to the FTP server! - - - Delayed delivery - - - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). - - - - diff --git a/languages/fi/tl_nc_language.xlf b/languages/fi/tl_nc_language.xlf deleted file mode 100644 index 2b8e0f5a..00000000 --- a/languages/fi/tl_nc_language.xlf +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - Language - - - Please select a language. - - - Fallback - - - Activate this checkbox if this language should be your fallback. - - - Recipients - - - Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. - - - Attachments via tokens - - - Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. - - - Attachments from file system - - - Please choose from the file picker if you would like to add static files. - - - Sender name - - - Please enter the sender name. - - - Sender address - - - Please enter the sender email address. - - - Send a CC to - - - Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. - - - Send a BCC to - - - Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. - - - Reply-to address - - - You can optionally set a reply-to address for this message. - - - Subject - - - Please enter the subject for the e-mail. - - - Mode - - - Choose the mode you would like to be used for this email. - - - Raw text - - - Please enter the text. - - - HTML - - - Please enter the HTML. - - - File name - - - Please enter the file name. - - - Storage mode - - - Here you can choose whether you want to override the existing file or append to an existing file if present. - - - File content - - - Please enter the file content. - - - Text only - - - HTML and text - - - Create new file - - - Override existing file - - - Append to existing file - - - New language - - - Add a new language. - - - Edit language - - - Edit language ID %s. - - - Copy language - - - Copy language ID %s. - - - Delete language - - - Delete language ID %s. - - - Language details - - - Show details for language ID %s. - - - General language settings - - - Attachments - - - Meta information - - - Content - - - The following tokens you have used are not supported by this notification type: %s. - - - External images - - - Do not embed images in HTML emails. - - - Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. - - - Attachments from templates - - - These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. - - - - diff --git a/languages/fi/tl_nc_message.xlf b/languages/fi/tl_nc_message.xlf deleted file mode 100644 index c2c6b2fa..00000000 --- a/languages/fi/tl_nc_message.xlf +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Title - - - Please enter a title for this message. - - - Gateway - - - Please select a gateway for this message. - - - Languages - - - Here you can manage the different languages. - - - Manage languages - - - Close - - - Priority - - - Please select a priority. - - - Template file - - - Please choose a template file. - - - Tag - - - Here you can enter the tag. - - - Enable open tracking - - - Here you can enable open tracking. - - - Publish message - - - Include this message when a notification is being sent. - - - New message - - - Create a new message. - - - Edit message - - - Edit message ID %s. - - - Duplicate message - - - Duplicate message ID %s. - - - Move message - - - Move message ID %s. - - - Delete message - - - Delete message ID %s. - - - Toggle visibility of message - - - Toggle visibility of message ID %s. - - - Gateway message - - - Show details for message ID %s. - - - Title & Gateway - - - Languages - - - Expert settings - - - Publish settings - - - very high - - - high - - - normal - - - low - - - very low - - - - diff --git a/languages/fi/tl_nc_notification.xlf b/languages/fi/tl_nc_notification.xlf deleted file mode 100644 index 63a537f9..00000000 --- a/languages/fi/tl_nc_notification.xlf +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Title - - - Please enter a title for this notification. - - - Type - - - Please select a type for this notification. - - - Standard eMail gateway - - - Write to file - - - New notification - - - Create a new notification. - - - Manage notifications - - - Manage messages for notification ID %s. - - - Edit notification - - - Edit notification ID %s. - - - Copy notification - - - Copy notification ID %s. - - - Delete notification - - - Delete notification ID %s. - - - Notification details - - - Show details for notification ID %s. - - - Title & type - - - Configuration - - - Contao - - - Form submission - - - This notification type can be sent when the form is submitted. - - - Member registration - - - Member personal data - - - Member lost password - - - Delimiter for lists - - - When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. - - - Member activation - - - Token Templates - - - Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. - - - Templates - - - Newsletter subscribed - - - Newsletter activation - - - Newsletter unsubscribed - - - - diff --git a/languages/fi/tl_nc_queue.xlf b/languages/fi/tl_nc_queue.xlf deleted file mode 100644 index b0228b9f..00000000 --- a/languages/fi/tl_nc_queue.xlf +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - Source queue gateway - - - Target gateway - - - Source message - - - Date added to queue - - - Date sent from queue - - - Had an error during delivery process - - - Tokens - - - Language - - - Waiting in queue. - - - Error sending the message. Check the system log for more details. - - - Message sent. - - - Source - - - Add to queue again - - - This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. - - - Delete queued message - - - Delete queued message (ID %s). - - - Show details - - - Shows details of the queued message ID %s. - - - Are you sure you want to re-add queued message ID %s to the queue? - - - Date delayed in queue - - - Attachments - - - - diff --git a/languages/fi/tokens.xlf b/languages/fi/tokens.xlf deleted file mode 100644 index 1382e54d..00000000 --- a/languages/fi/tokens.xlf +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - E-mail address of administrator of the current page. - - - All the form fields. - - - All the form fields and their raw values. - - - All the form field labels. - - - E-mail address of administrator of the current page. - - - E-mail address of the member. - - - The current domain. - - - Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. - - - Member fields as they were before the changes. - - - Flag (1 or 0) if a field has changed, to be used with if-conditions. - - - Output of template "%s" - - - - From 94428fabac7bbe2bf23adea5f2cf1fe88dd333a4 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Mon, 22 Oct 2018 12:28:56 +0200 Subject: [PATCH 51/51] Transifex Sync --- languages/cs/tl_form.xlf | 9 +-- languages/cs/tl_module.xlf | 12 ++-- languages/cs/tl_nc_gateway.xlf | 95 +++++++++++++++++++++++--- languages/cs/tl_nc_language.xlf | 78 +++++++++++++++++++--- languages/de/modules.xlf | 28 ++++++-- languages/de/tl_form.xlf | 7 +- languages/de/tl_module.xlf | 13 ++-- languages/de/tl_nc_gateway.xlf | 100 ++++++++++++++++++++++++++-- languages/de/tl_nc_language.xlf | 76 ++++++++++++++++++--- languages/de/tl_nc_message.xlf | 48 +++++++++++-- languages/de/tl_nc_notification.xlf | 51 ++++++++++++-- languages/de/tl_nc_queue.xlf | 37 ++++++++-- languages/de/tokens.xlf | 23 +++++-- languages/fr/tl_form.xlf | 7 +- languages/fr/tl_module.xlf | 12 ++-- languages/fr/tl_nc_gateway.xlf | 87 ++++++++++++++++++++++-- languages/fr/tl_nc_language.xlf | 66 ++++++++++++++++-- languages/fr/tl_nc_message.xlf | 48 +++++++++++-- languages/fr/tl_nc_notification.xlf | 44 ++++++++++-- languages/fr/tokens.xlf | 20 ++++-- languages/it/tl_form.xlf | 7 +- languages/it/tl_module.xlf | 12 ++-- languages/it/tl_nc_gateway.xlf | 87 ++++++++++++++++++++++-- languages/it/tl_nc_language.xlf | 66 ++++++++++++++++-- languages/it/tl_nc_message.xlf | 46 ++++++++++++- languages/it/tl_nc_notification.xlf | 44 ++++++++++-- languages/pl/tl_form.xlf | 7 +- languages/pl/tl_module.xlf | 12 ++-- languages/pl/tl_nc_gateway.xlf | 87 ++++++++++++++++++++++-- languages/pl/tl_nc_language.xlf | 70 +++++++++++++++++-- languages/pl/tl_nc_message.xlf | 46 ++++++++++++- languages/pl/tl_nc_notification.xlf | 44 ++++++++++-- languages/pl/tokens.xlf | 20 ++++-- languages/ru/tl_form.xlf | 7 +- languages/ru/tl_module.xlf | 12 ++-- languages/ru/tl_nc_gateway.xlf | 87 ++++++++++++++++++++++-- languages/ru/tl_nc_language.xlf | 68 +++++++++++++++++-- languages/ru/tl_nc_message.xlf | 46 ++++++++++++- languages/ru/tl_nc_notification.xlf | 46 +++++++++++-- languages/ru/tl_nc_queue.xlf | 28 ++++++-- languages/ru/tokens.xlf | 22 ++++-- 41 files changed, 1535 insertions(+), 190 deletions(-) diff --git a/languages/cs/tl_form.xlf b/languages/cs/tl_form.xlf index c26d3b6c..f1363157 100644 --- a/languages/cs/tl_form.xlf +++ b/languages/cs/tl_form.xlf @@ -1,15 +1,16 @@ - - - + + Notification Oznámení + Please select a notification. Vyberte prosím oznámení. + - + \ No newline at end of file diff --git a/languages/cs/tl_module.xlf b/languages/cs/tl_module.xlf index a34c27ce..00ddd037 100644 --- a/languages/cs/tl_module.xlf +++ b/languages/cs/tl_module.xlf @@ -1,26 +1,30 @@ - - - + + Notification Oznámení + Please select a notification. Vyberte prosím oznámení. + Activation notification Aktivovat oznámení + Please select an activation notification. Vyberte prosím aktivní oznámení. + Notification + - + \ No newline at end of file diff --git a/languages/cs/tl_nc_gateway.xlf b/languages/cs/tl_nc_gateway.xlf index 65b968ed..a1f60136 100644 --- a/languages/cs/tl_nc_gateway.xlf +++ b/languages/cs/tl_nc_gateway.xlf @@ -1,302 +1,380 @@ - - - + + Title Název + Please enter a title for this gateway. Zadejte prosím název pro tento druh rozesílání. + Type Druh + Please select a type for this gateway. Vyberte prosím druh rozesílání. + Target gateway Rozdělené rozesílání + This gateway will queue all the messages and then send them over the gateway you define here. Tento typ umístí všechny zprávy do fronty a pak je rozešle přes druh rozesílání, který si tu zvolíte. + Enable poor man's cronjob Aktivovat intervalové zasílání + This will register this queue gateway to the poor man's cronjob. Tím budou zprávy rozesílané ve vybraném intervalu. + Interval Četnost, interval + Choose the interval you would like to have this queue gateway be invoked. Vyberte četnost, s níž byste rádi obdrželi zprávy. + Number of messages Počet zpráv + Here you can enter the number of messages that should be sent per invocation. Zde můžete zadat počet zpráv, které mají být odeslané v rámci jednoho intervalu. + Override SMTP settings Přepsat nastavení SMTP + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. Tento druh rozesílání převezme výchozí nastavení rozesílání mailů. Pokud si přejete použít jiná nastavení SMTP pro tento druh, zaškrtněte toto políčko. + File type Druh souboru + Please choose the file type. Vyberte prosím druh souboru. + Connection type Druh připojení + Please choose the connection type. Vyberte prosím druh připojení. + Host name Název poskytovatele (host) + Please enter the host name. Zadejte prosím jméno poskytovatele. + Port number Číslo portu + Here you can enter the port number. Leave empty to use the default. Sem můžete zadat číslo portu. Ponechte pole prázdné pro použití výchozích hodnot. + Username Užívatelské jméno + Please enter the username. Zadejte prosím uživatelské jméno. + Password Heslo + Please enter the password. Zadejte prosím heslo. + Path Cesta + Here you can enter the path (e.g. <em>downloads</em>). Zde můžete zadat cestu k souboru (např. <em>dowloads</em>). + Postmark API key Klíč API Postmarku + Please enter your unique Postmark API key. Zadejte prosím klíč API Postmarku. + Enable test mode Spustit testovací modus + Here you can enable the test mode. Zde můžete povolit testovací modus. + Enable SSL Povolit SSL + Here you can enable the SSL connection. Zde můžete povolit zabezpečené připojení SSL. + Send e-mails via SMTP Zaslat maily přes SMTP + Use an SMTP server instead of the PHP mail() function to send e-mails. Použít pro odesílání mailů server SMTP místo funkce PHP mail(). + SMTP hostname Název serveru SMTP + Please enter the host name of the SMTP server. Zadejte prosím jméno poskytovatele serveru SMTP. + SMTP username Uživatelské jméno SMTP + Here you can enter the SMTP username. Zde můžete zadat uživatelské jméno SMTP. + SMTP password Heslo SMTP + Here you can enter the SMTP password. Zde můžete zadat heslo pro SMTP. + SMTP encryption Šifrování SMTP + Here you can choose an encryption method (SSL or TLS). Zde můžete zvolit šifrovací metodu (SSL nebo TLS). + SMTP port number Číslo portu SMTP + Please enter the port number of the SMTP server. Zadejte prosím číslo portu serveru SMTP. + Queue Fronta + Standard email gateway Standardní rozesílání mailů + Write to file Zápis do souboru + Postmark (postmarkapp.com) Postmark (postmarkapp.com) + Every minute Každou minutu + Every hour Každou hodinu + Every day Každý den + Every week Každý týden + Every month Každý měsíc + CSV CSV + Plain Text / XML Prostý text / XML + Local Lokální + FTP FTP + Connection successful Připojení navázáno + Could not connect to the FTP server! Nelze se připojit k serveru FTP! + + + + Could not login to the FTP server! + Nepodařilo se přihlásit k serveru FTP! + New gateway Nový druh rozesílání + Create a new gateway. Vytvořit nový způsob rozesílání. + Edit gateway Upravit tento způsob rozesílání + Edit gateway ID %s. Upravit způsob rozesílání %s + Copy gateway Zkopírovat tento způsob rozesílání + Copy gateway ID %s. Zkopírovat způsob rozesílání %s. + Delete gateway Smazat tento způsob rozesílání + Delete gateway ID %s. Smazat způsob rozesílání %s. + Gateway details Podrobnosti k tomuto způsobu rozesílání + Show details for gateway ID %s. Zobrazit podrobnosti ke způsobu rozesílání %s. + Title & type Název a druh + Gateway settings Nastavení tohoto způsobu rozesílání + Cronjob settings Nastavení cronu + Queued messages will remain in the queue forever unless @@ -317,17 +395,16 @@ PHP configurations such as the maximum execution time. Thus, try to keep the num /path/to/contao/composer/vendor/terminal42/notification_center/bin/queue </blockquote> - - - Could not login to the FTP server! - Nepodařilo se přihlásit k serveru FTP! + Delayed delivery + - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + - + \ No newline at end of file diff --git a/languages/cs/tl_nc_language.xlf b/languages/cs/tl_nc_language.xlf index be93b12f..6db487fe 100644 --- a/languages/cs/tl_nc_language.xlf +++ b/languages/cs/tl_nc_language.xlf @@ -1,191 +1,249 @@ - - - + + Language Jazyk + Please select a language. Vyberte prosím jazyk. + Fallback Výchozí jazyk + Activate this checkbox if this language should be your fallback. Zaškrtněte tuto možnost, pokud si přejete použít tento jazyk jako výchozí + Recipients Příjemci + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. Zadejte prosím <strong>čárkou</strong> oddělené příjemce. Použijte automatické vyplňování, abyste viděli spuštěné jednoduché tokeny. + Attachments via tokens Přílohy pomocí tokenu + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + Attachments from file system + Please choose from the file picker if you would like to add static files. + Sender name + Please enter the sender name. + Sender address + Please enter the sender email address. + Send a CC to + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + Send a BCC to + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + Reply-to address + You can optionally set a reply-to address for this message. + Subject + Please enter the subject for the e-mail. + Mode + Choose the mode you would like to be used for this email. + Raw text + Please enter the text. + HTML + Please enter the HTML. + + + + External images + + + + Do not embed images in HTML emails. + File name + Please enter the file name. + Storage mode + Here you can choose whether you want to override the existing file or append to an existing file if present. + File content + Please enter the file content. + Text only + HTML and text + Create new file + Override existing file + Append to existing file + New language + Add a new language. + Edit language + Edit language ID %s. + Copy language + Copy language ID %s. + Delete language + Delete language ID %s. + Language details + Show details for language ID %s. + General language settings + Attachments + Meta information + Content + The following tokens you have used are not supported by this notification type: %s. - - - External images - - - Do not embed images in HTML emails. + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + Attachments from templates + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + - + \ No newline at end of file diff --git a/languages/de/modules.xlf b/languages/de/modules.xlf index de57e72a..839ff157 100644 --- a/languages/de/modules.xlf +++ b/languages/de/modules.xlf @@ -1,61 +1,81 @@ - - - + + Notification Center Notification Center + Notifications Benachrichtigungen + Manage notifications. Benachrichtigungen verwalten. + Queue Warteschlange + View the message queue. Anzeigen der Nachrichtenwarteschlange. + Gateways Gateways + Manage gateways Gateways verwalten + Lost password (Notification Center) Passwort vergessen (Notification Center) + Generates a form to request a new password and sends the notification using the notification center. Generiert ein Formular um ein neues Passwort anzufordern und versendet anschließend die Benachrichtigung über das Notification Center. + Subscribe (Notification Center) + Abonnieren (Notification Center) + Generates a form to subscribe to one or more channels and sends the notification using the notification center. + Erzeugt ein Formular zum Abonnieren von Verteilern welches eine Benachrichtigung senden kann. + Activate (Notification Center) + Aktivieren (Notification Center) + Generates a form to activate subscription to one or more channels the notification using the notification center. + Erzeugt ein Formular zur Aktivierung eines Abonnements welches eine Benachrichtigung versenden kann. + Unsubscribe (Notification Center) + Kündigen (Notification Center) + Generates a form to unsubscribe from one or more channels and sends the notification using the notification center. + Erzeugt ein Formular zum Kündigen von Abonnements welches eine Benachrichtigung senden kann. + - + \ No newline at end of file diff --git a/languages/de/tl_form.xlf b/languages/de/tl_form.xlf index ead84224..b859de64 100644 --- a/languages/de/tl_form.xlf +++ b/languages/de/tl_form.xlf @@ -1,15 +1,16 @@ - - + Notification Benachrichtigung + Please select a notification. Bitte wählen Sie eine Benachrichtigung aus. + - + \ No newline at end of file diff --git a/languages/de/tl_module.xlf b/languages/de/tl_module.xlf index cbc827a7..90a4adc4 100644 --- a/languages/de/tl_module.xlf +++ b/languages/de/tl_module.xlf @@ -1,26 +1,31 @@ - - - + + Notification Benachrichtigung + Please select a notification. Bitte wählen Sie eine Benachrichtigung. + Activation notification Aktivierungsbenachrichtigung + Please select an activation notification. Bitte wählen Sie eine Aktivierungsbenachrichtigung. + Notification + Benachrichtigung + - + \ No newline at end of file diff --git a/languages/de/tl_nc_gateway.xlf b/languages/de/tl_nc_gateway.xlf index 6b04701c..34609ba0 100644 --- a/languages/de/tl_nc_gateway.xlf +++ b/languages/de/tl_nc_gateway.xlf @@ -1,306 +1,380 @@ - - - + + Title Titel + Please enter a title for this gateway. Bitte geben Sie einen Titel für dieses Gateway ein. + Type Typ + Please select a type for this gateway. Bitte wählen Sie einen Typen für dieses Gateway. + Target gateway Ziel-Gateway + This gateway will queue all the messages and then send them over the gateway you define here. Dieses Gateway wird alle Nachrichten zuerst in die Warteschlange übertragen. Danach werden sie über das hier gewählte Ziel-Gateway übermittelt. + Enable poor man's cronjob Poor-Man-Cron aktivieren + This will register this queue gateway to the poor man's cronjob. Gateway in Poor-Man-Cron registrieren. + Interval Intervall + Choose the interval you would like to have this queue gateway be invoked. Wählen Sie den Intervall für die Aufrufe der Warteschlange des Gateways. + Number of messages Anzahl Nachrichten + Here you can enter the number of messages that should be sent per invocation. Hier können Sie bestimmen wie viele Nachrichten pro Aurfruf gesendet werden. + Override SMTP settings SMTP-Einstellungen überschreiben + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. Aktivieren Sie diese Checkbox um die Contao SMTP-Einstellungen (Systemeinstellungen) zu überschreiben und sie anschließend zu individualisieren. + File type Dateiformat + Please choose the file type. Bitte wählen Sie ein Dateiformat aus. + Connection type Verbindungstyp + Please choose the connection type. Bitte wählen Sie einen Verbindungstyp aus. + Host name Server + Please enter the host name. Bitte geben Sie den Servernamen ein. + Port number Port + Here you can enter the port number. Leave empty to use the default. Bitte geben Sie die Portnummer ein. Wenn das Feld leer bleibt wird der Standard-Port verwendet. + Username Benutzername + Please enter the username. Bitte geben Sie den FTP-Benutzernamen ein. + Password Passwort + Please enter the password. Bitte geben Sie das zugehörige FTP-Passwort ein. + Path Pfad + Here you can enter the path (e.g. <em>downloads</em>). Hier können Sie den Zielordner bestimmen. (z.B. downloads) + Postmark API key Postmark API-Key + Please enter your unique Postmark API key. Bitte gebe deinen persönlichen Postmark API-Key ein. + Enable test mode Testmodus aktivieren + Here you can enable the test mode. Hier aktivieren Sie den Testmodus. + Enable SSL SSL-Verbindung aktivieren + Here you can enable the SSL connection. Hier können Sie die SSL-Verbindung aktivieren. + Send e-mails via SMTP SMTP-Einstellungen überschreiben + Use an SMTP server instead of the PHP mail() function to send e-mails. Aktivieren Sie diese Checkbox um die Contao SMTP-Einstellungen (Systemeinstellungen) zu überschreiben und sie anschließend zu individualisieren. + SMTP hostname SMTP-Hostname + Please enter the host name of the SMTP server. Bitte geben Sie den Hostnamen des SMTP-Servers ein. + SMTP username SMTP-Benutzername + Here you can enter the SMTP username. Hier können Sie den SMTP-Benutzernamen eingeben. + SMTP password SMTP-Passwort + Here you can enter the SMTP password. Hier können Sie das SMTP-Passwort eingeben. + SMTP encryption SMTP-Verschlüsselung + Here you can choose an encryption method (SSL or TLS). Hier können Sie eine Verschlüsselungsmethode auswählen (SSL oder TLS). + SMTP port number SMTP-Portnummer + Please enter the port number of the SMTP server. Bitte geben Sie die Portnummer des SMTP-Servers ein. + Queue Warteschlange + Standard email gateway Standard E-Mail-Gateway + Write to file In Datei schreiben + Postmark (postmarkapp.com) Postmark (postmarkapp.com) + Every minute Jede Minute + Every hour Jede Stunde + Every day Jeder Tag + Every week Jede Woche + Every month Jeder Monat + CSV CSV + Plain Text / XML Plain Text / XML + Local Lokal + FTP FTP + Connection successful Verbindung erfolgreich! + Could not connect to the FTP server! Verbindung zum FTP-Server konnte nicht hergestellt werden. + Could not login to the FTP server! Login auf FTP-Server fehlgeschlagen. + New gateway Neues Gateway + Create a new gateway. Neues Gateway anlegen. + Edit gateway Gateway editieren + Edit gateway ID %s. Editieren Sie das Gateway ID %s + Copy gateway Gateway duplizieren + Copy gateway ID %s. Editieren Sie das Gateway ID %s + Delete gateway Gateway löschen + Delete gateway ID %s. Löschen Sie das Gateway ID %s + Gateway details Gateway-Details + Show details for gateway ID %s. Details des Gateways ID %s anzeigen. + Title & type Titel & Typ + Gateway settings Gateway Einstellungen + Cronjob settings Cronjob-Einstellungen + Queued messages will remain in the queue forever unless @@ -321,13 +395,29 @@ PHP configurations such as the maximum execution time. Thus, try to keep the num /path/to/contao/composer/vendor/terminal42/notification_center/bin/queue </blockquote> + Verzögerte Nachrichten bleiben endlos in der Warteschleifen wenn Sie den Versand nicht entweder durch einen echten CronJob oder den Contao-internen Poor Man's CronJob ausführen. Das Benachrichtigungszentrum liefert ein Programm mit, welches für echte CronJobs verwendet werden kann. Um beispielsweise einen echten CronJob zu konfigurieren welcher aus der Warteschlange dieses Gateways (ID: {gateway_id}) jeweils 15 Nachrichten alle 10 Minuten verwendet, benötigen Sie folgendes Crontab: +<br><blockquote>*/10 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 15</blockquote><br> +oder falls Sie 30 Nachrichten immer am 5 nach jede Stunde senden wollen, sieht die Konfiguration so aus: +<br><blockquote>5 * * * * /path/to/contao/system/modules/notification_center/bin/queue -s {gateway_id} -n 30</blockquote><br> +Sollten Sie keinen Zugang zu echten CronJobs haben, kann der Poor Man's CronJob verwendet werden. Beachten Sie dass dieser nicht dieselbe Flexibilität im Bezug auf Intervall-Einstellungen bietet und von der Weboberflächte beeinfluss ist, beispielsweise von der PHP-Konfiguration und -Laufzeit. Versuchen Sie daher die Anzahl Nachrichten pro Versand eher niedrig einzustellen. +<br><br> +<strong>Anmerkung: </strong>Wurde das Benachrichtigungszentrum per Composer installiert lautet der Pfad zum Programm wie folgt: +<blockquote> +/path/to/contao/composer/vendor/terminal42/notification_center/bin/queue +</blockquote> + + Delayed delivery + Auslieferung verzögern + - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Geben Sie einen englischen <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> Intervall für die Verzögerung der Nachricht ein (z.B. <em>+1 day</em>). + - + \ No newline at end of file diff --git a/languages/de/tl_nc_language.xlf b/languages/de/tl_nc_language.xlf index 820e41fd..cd0cb8fe 100644 --- a/languages/de/tl_nc_language.xlf +++ b/languages/de/tl_nc_language.xlf @@ -1,241 +1,301 @@ - - - + + Language Sprache + Please select a language. Bitte wählen Sie eine Sprache. + Fallback Fallback-Sprache + Activate this checkbox if this language should be your fallback. Markieren Sie die Checkbox falls dies die Fallback-Sprache ist. + Recipients Empfänger + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. - Bitte geben Sie eine <strong>Komma-separierte</strong> Liste der Empfänger in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##) + Bitte geben Sie eine <strong>Komma-separierte</strong> Liste der Empfänger in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##) + Attachments via tokens Dateianhänge via Tokens + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. - Bitte geben Sie eine <strong>Komma-separierte</strong> Liste von Attachment-Tokens in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##) + Bitte geben Sie eine <strong>Komma-separierte</strong> Liste von Attachment-Tokens in dieses Feld ein. Nutzen Sie die Autovervollständigung um die verfügbaren "Platzhalter" zu sehen. (Beginnen Sie mit ##) + Attachments from file system Dateianhänge vom Dateisystem + Please choose from the file picker if you would like to add static files. Bitte wählen Sie mit dem Dateiwähler die statischen Dateien aus, die zur Mail hinzugefügt werden sollen. + Sender name Absendername + Please enter the sender name. Bitte geben Sie den Absender ein. + Sender address Absender-E-Mail + Please enter the sender email address. Bitte geben Sie die Absender-Adresse ein. + Send a CC to CC-Empfänger + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. Empfänger die eine Kopie der E-Mail erhalten. Mehrere Adressen per Komma separieren. + Send a BCC to BCC-Empfänger + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. Empfänger die eine Kopie der E-Mail erhalten. Mehrere Adressen per Komma separieren. + Reply-to address Antwort an (Reply-To) + You can optionally set a reply-to address for this message. - Optionale "Antwort an" E-Mail-Adresse. + Optionale "Antwort an" E-Mail-Adresse. + Subject Subject + Please enter the subject for the e-mail. Bitte geben Sie den Betreff der E-Mail ein. + Mode Modus + Choose the mode you would like to be used for this email. Bitte den gewünschten Modus für diese E-Mail wählen. + Raw text Rohtext + Please enter the text. Bitte den Text eingeben. + HTML HTML + Please enter the HTML. Bitte HTML eingeben. + External images Externe Bilder + Do not embed images in HTML emails. Bilder in HTML-E-Mails nicht einbetten. + File name Dateiname + Please enter the file name. Bitte geben Sie den Dateinamen ein. + Storage mode Speichermodus + Here you can choose whether you want to override the existing file or append to an existing file if present. Hier können Sie wählen, ob Sie die bestehende Datei überschreiben, oder an sie anhängen wollen. + File content Datei Inhalt + Please enter the file content. Dateiinhalt eingeben. + Text only Nur Text + HTML and text HTML und Text + Create new file Neue Datei erstellen + Override existing file Eine existierende Datei überschreiben + Append to existing file Zu einer existierenden Datei hinzufügen + New language Neue Sprache + Add a new language. Füge eine neue Sprache hinzu. + Edit language Sprache editieren + Edit language ID %s. Sprache ID %s editieren. + Copy language Sprache kopieren + Copy language ID %s. Kopiere Sprache ID %s. + Delete language Sprache löschen + Delete language ID %s. Sprache mit ID %s löschen. + Language details Sprach-Details + Show details for language ID %s. Details für ID %s anzeigen. + General language settings Generelle Spracheinstellungen + Attachments Attachments + Meta information Meta-Informationen + Content Inhalt + The following tokens you have used are not supported by this notification type: %s. Die folgenden eingesetzten Tokens werden vom Notification-Typ nicht unterstützt: %s. + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. - Der Inhalt enthält invalide Tokens. Simple Tokens können keines der folgenden Zeichen enthalten: "<>!=*". Sie werden entweder für if-Bedingungen oder als Platzhalter verwendet. + Der Inhalt enthält invalide Tokens. Simple Tokens können keines der folgenden Zeichen enthalten: "<>!=*". Sie werden entweder für if-Bedingungen oder als Platzhalter verwendet. + Attachments from templates + Anhänge aus Vorlagen + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + Diese Dateien werden als Vorlage für Anhänge verwendet. Simple Tokens innerhalb der Datei werden ersetzt und die Datei danach der Nachricht angehängt. + - + \ No newline at end of file diff --git a/languages/de/tl_nc_message.xlf b/languages/de/tl_nc_message.xlf index 46807e81..521827d1 100644 --- a/languages/de/tl_nc_message.xlf +++ b/languages/de/tl_nc_message.xlf @@ -1,171 +1,211 @@ - - + Title Titel + Please enter a title for this message. Bitte geben Sie einen Namen für diese Nachricht ein. + Gateway Gateway + Please select a gateway for this message. Bitte wählen Sie einen Gateway für diese Nachricht. + Languages Sprachen + Here you can manage the different languages. Hier können Sie die verschiedenen Sprachen verwalten. + Manage languages Sprachen verwalten + Close Schliessen + Priority Priorität + Please select a priority. Bitte wählen Sie die Priorität aus. + Template file Template-Datei + Please choose a template file. Bitte wählen Sie eine Template-Datei aus. + Tag Schlagwort + Here you can enter the tag. Hier können Sie ein Schlagwort definieren. + Enable open tracking Open-Tracking aktivieren + Here you can enable open tracking. - Hier können Sie das "Open-Tracking" aktivieren. + Hier können Sie das "Open-Tracking" aktivieren. + Publish message Nachricht veröffentlichen + Include this message when a notification is being sent. Diese Nachricht einfügen beim Versenden der Notification. + New message Neue Nachricht + Create a new message. Eine neue Nachricht hinzufügen. + Edit message Nachricht editieren + Edit message ID %s. Nachricht ID %s editieren. + Duplicate message Nachricht kopieren + Duplicate message ID %s. Nachricht mit ID %s kopieren. + Move message Nachricht verschieben + Move message ID %s. Nachricht mit ID %s verschieben. + Delete message Nachricht löschen + Delete message ID %s. Nachricht mit ID %s löschen. + Toggle visibility of message Nachricht ein-/ausblenden + Toggle visibility of message ID %s. Blende die Nachricht ID %s ein/aus. + Gateway message Nachrichtendetails + Show details for message ID %s. Details für Nachricht ID %s anzeigen. + Title & Gateway Titel & Gateway + Languages Sprachen + Expert settings Experteneinstellungen + Publish settings Einstellungen veröffentlichen + very high sehr hoch + high hoch + normal normal + low tief + very low sehr tief + - + \ No newline at end of file diff --git a/languages/de/tl_nc_notification.xlf b/languages/de/tl_nc_notification.xlf index 7beafb72..e7666e94 100644 --- a/languages/de/tl_nc_notification.xlf +++ b/languages/de/tl_nc_notification.xlf @@ -1,140 +1,181 @@ - - - + + Title Titel + Please enter a title for this notification. Bitte geben Sie einen Namen für diese Benachrichtigung ein. + Type Benachrichtigungstyp + Please select a type for this notification. Bitte wählen Sie einen Benachrichtigungstyp aus. + Delimiter for lists Trennzeichen für Listen + - When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + Wenn mehrere Werte (Arrays) übermittelt werden, generiert das Benachrichtigungszentrum daraus automatisch eine kommaseparierte Liste (","). Wählen Sie hier ein anderes Trennzeichen falls nötig. + Standard eMail gateway Standard eMail Gateway + Write to file In Datei schreiben + New notification Neue Benachrichtigung + Create a new notification. Neue Benachrichtigung erstellen. + Manage notifications Benachrichtigung editieren + Manage messages for notification ID %s. Benachrichtigung ID %s editieren. + Edit notification Benachrichtigung bearbeiten + Edit notification ID %s. Benachrichtigung ID %s editieren. + Copy notification Benachrichtigung kopieren + Copy notification ID %s. Benachrichtigung ID %s kopieren. + Delete notification Benachrichtigung löschen + Delete notification ID %s. Benachrichtigung ID %s löschen. + Notification details Benachrichtigungsdetails + Show details for notification ID %s. Details für Benachrichtigung ID %s anzeigen. + Title & type Titel & Benachrichtigungstyp + Configuration Konfiguration + Contao Contao + Form submission Formularübertragung + This notification type can be sent when the form is submitted. Dieser Benachrichtigungstyp wird nach erfolgreicher Formularübertragung versendet. + Member activation Mitglied: Aktivierung + Member registration Mitglieds Registration + Member personal data Mitglied: Persönliche Daten + Member lost password Mitglied: Passwort vergessen + Token Templates + Platzhalter Templates + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + Wählen Sie Templates um daraus ein Token zu generieren. Der Name des Templates muss mit notification_xxx beginnen und wird zum Token ##template_xxx## konvertiert. + Templates + Templates + Newsletter subscribed + Newsletter abonniert + Newsletter activation + Newsletter aktiviert + Newsletter unsubscribed + Newsletter gekündigt + - + \ No newline at end of file diff --git a/languages/de/tl_nc_queue.xlf b/languages/de/tl_nc_queue.xlf index ef9b6b69..9a09c129 100644 --- a/languages/de/tl_nc_queue.xlf +++ b/languages/de/tl_nc_queue.xlf @@ -1,82 +1,111 @@ - - - + + Source queue gateway + Quell-Gateway + Target gateway Ziel Gateway + Source message + Quell-Nachricht + Date added to queue + Datum hinzugefügt + Date sent from queue + Datum gesendet + Had an error during delivery process Fehler bei der Auslierfung + Tokens Tokens + Language Sprache + Waiting in queue. In der Warteschlange + Error sending the message. Check the system log for more details. + Fehler beim Senden der Nachricht. Prüfen Sie das System-Log für Details. + Message sent. Nachricht gesendet. + Source Quelle + Add to queue again Nochmals zur Warteschlange hinzufügen + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. + Diese Nachricht (ID %s) erzeugte einen Fehler, aber Sie können Sie nochmals zur Warteschlange hinzufügen. + Delete queued message Warteschlangennachricht löschen + Delete queued message (ID %s). Warteschlangennachricht löschen (ID %s). + Show details Details anzeigen + Shows details of the queued message ID %s. Zeige + Are you sure you want to re-add queued message ID %s to the queue? + Soll die Nachricht ID %s wirklich wieder zur Warteschlange hinzugefügt werden? + Date delayed in queue + Datum verzögert + Attachments + Anhänge + - + \ No newline at end of file diff --git a/languages/de/tokens.xlf b/languages/de/tokens.xlf index d2f9b219..84479386 100644 --- a/languages/de/tokens.xlf +++ b/languages/de/tokens.xlf @@ -1,48 +1,61 @@ - - - + + E-mail address of administrator of the current page. E-Mail-Adresse des aktuellen Seitenadministrator. + All the form fields. Alle Formular-Felder. + All the form field labels. Alle Formularfelder und ihre Labels + All the form fields and their raw values. Alle Formular Felder und ihr Rohinhalt. + E-mail address of administrator of the current page. E-Mail-Adresse des Administrators der aktuellen Seite. + E-mail address of the member. E-Mail-Adresse des Mitglieds. + The current domain. Die aktuelle Domain. + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + Mitglieder-Felder wie im Formular übermittelt. Nutzen Sie den {{user::*}} Insert-Tag für andere Felder. + Member fields as they were before the changes. + Mitglied-Felder wie vor der Änderung + Flag (1 or 0) if a field has changed, to be used with if-conditions. Flag (0 oder 1). das anzeigt, ob sich ein Feld geändert hat. Zur Verwendung in if-Bedingungen. + - Output of template "%s" + Output of template "%s" + Ausgabe des Templates "%s" + - + \ No newline at end of file diff --git a/languages/fr/tl_form.xlf b/languages/fr/tl_form.xlf index 7f4c7c09..6169aff2 100644 --- a/languages/fr/tl_form.xlf +++ b/languages/fr/tl_form.xlf @@ -1,15 +1,16 @@ - - + Notification Notification + Please select a notification. Sélectionner une notification. + - + \ No newline at end of file diff --git a/languages/fr/tl_module.xlf b/languages/fr/tl_module.xlf index 083feb72..777c784f 100644 --- a/languages/fr/tl_module.xlf +++ b/languages/fr/tl_module.xlf @@ -1,24 +1,28 @@ - - - + + Notification Notification + Please select a notification. Sélectionner une notification. + Activation notification + Please select an activation notification. + Notification + - + \ No newline at end of file diff --git a/languages/fr/tl_nc_gateway.xlf b/languages/fr/tl_nc_gateway.xlf index 76c0c49c..55010435 100644 --- a/languages/fr/tl_nc_gateway.xlf +++ b/languages/fr/tl_nc_gateway.xlf @@ -1,278 +1,352 @@ - - - + + Title Titre + Please enter a title for this gateway. Saisir un titre pour cette passerelle. + Type Type + Please select a type for this gateway. Sélectionner le type de cette passerelle. + Target gateway + This gateway will queue all the messages and then send them over the gateway you define here. + Enable poor man's cronjob + This will register this queue gateway to the poor man's cronjob. + Interval + Choose the interval you would like to have this queue gateway be invoked. + Number of messages + Here you can enter the number of messages that should be sent per invocation. + Override SMTP settings Surcharger les paramètres SMTP + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. Cette passerelle utilisera les paramètres de courrier électronique par défaut de Contao. Cocher pour surcharger les paramètres SMTP de cette passerelle. + File type Type de fichier + Please choose the file type. Choisir un type de fichier. + Connection type Type de connexion + Please choose the connection type. Choisir le type de connexion. + Host name Hôte + Please enter the host name. Saisir le nom de l'hôte. + Port number Numéro de port + Here you can enter the port number. Leave empty to use the default. Saisir le numéro de port. Laisser vide pour utiliser la valeur par défaut. + Username Nom d'utilisateur + Please enter the username. Saisir le nom d'utilisateur. + Password Mot de passe + Please enter the password. Saisir le mot de passe. + Path Chemin + Here you can enter the path (e.g. <em>downloads</em>). Saisir le chemin (ex : <em>téléchargements</em>). + Postmark API key Clé d'API Postmark + Please enter your unique Postmark API key. Veuillez insérer votre clé unique d'API Postmark + Enable test mode Autoriser le mode de test + Here you can enable the test mode. Ici vous pouvez activer le mode de test + Enable SSL Autoriser le SSL + Here you can enable the SSL connection. Ici vous pouvez autoriser la connection SSL + Send e-mails via SMTP + Use an SMTP server instead of the PHP mail() function to send e-mails. + SMTP hostname + Please enter the host name of the SMTP server. + SMTP username + Here you can enter the SMTP username. + SMTP password + Here you can enter the SMTP password. + SMTP encryption + Here you can choose an encryption method (SSL or TLS). + SMTP port number + Please enter the port number of the SMTP server. + Queue + Standard email gateway Passerelle de messagerie standard + Write to file Écrire dans un fichier + Postmark (postmarkapp.com) Postmark (postmarkapp.com) + Every minute + Every hour + Every day + Every week + Every month + CSV CSV + Plain Text / XML Texte brut / XML + Local Local + FTP FTP + Connection successful Connexion réussie + Could not connect to the FTP server! Impossible de se connecter au serveur : %s + Could not login to the FTP server! + New gateway Nouvelle passerelle + Create a new gateway. Créer une nouvelle passerelle. + Edit gateway Éditer la passerelle + Edit gateway ID %s. Éditer la passerelle ID %s. + Copy gateway Copier la passerelle + Copy gateway ID %s. Copier la passerelle ID %s. + Delete gateway Supprimer la passerelle + Delete gateway ID %s. Supprimer la passerelle ID %s. + Gateway details Détails de la passerelle + Show details for gateway ID %s. Afficher les détails de la passerelle ID %s. + Title & type Titre & type + Gateway settings Paramètre de la passerelle + Cronjob settings + Queued messages will remain in the queue forever unless @@ -293,13 +367,16 @@ PHP configurations such as the maximum execution time. Thus, try to keep the num /path/to/contao/composer/vendor/terminal42/notification_center/bin/queue </blockquote> + Delayed delivery + - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + - + \ No newline at end of file diff --git a/languages/fr/tl_nc_language.xlf b/languages/fr/tl_nc_language.xlf index 9c5f8830..1b3d165d 100644 --- a/languages/fr/tl_nc_language.xlf +++ b/languages/fr/tl_nc_language.xlf @@ -1,233 +1,291 @@ - - - + + Language Langue + Please select a language. Sélectionner une langue. + Fallback Langue de secours + Activate this checkbox if this language should be your fallback. Cocher pour utiliser cette langue en secours. + Recipients Destinataires + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. Veuillez insérer la lise <strong>séparée par des virgules</strong> des destinataires dans ce champs. Utilisez l'auto-completion pour afficher les tokens valide + Attachments via tokens Fichiers joints à partir de jetons + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. Veuillez insérer la liste <strong>séparée par des virgules</strong> des jetons joints à ce champ. Utilisez l'autocompletion pour afficher les tokens valide + Attachments from file system Fichiers joints à partir du gestionnaire de fichiers + Please choose from the file picker if you would like to add static files. Utiliser le sélecteur de fichier pour ajouter des fichiers statiques. + Sender name Nom de l'expéditeur + Please enter the sender name. Saisir le nom de l'expéditeur. + Sender address Adresse de l'expéditeur + Please enter the sender email address. Saisir l'adresse email de l'expéditeur. + Send a CC to Envoyer une CC à + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. Les destinataires qui doivent recevoir une copie carbone de l'e-mail. Séparer les adresses par une virgule. + Send a BCC to Envoyer une BCC à + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. Les destinataires qui doivent recevoir une copie carbone cachée de l'e-mail. Séparer les adresses par une virgule. + Reply-to address Adresse de réponse + You can optionally set a reply-to address for this message. Définir une adresse de réponse pour ce message. + Subject Sujet + Please enter the subject for the e-mail. Saisir un sujet pour cet email. + Mode Mode + Choose the mode you would like to be used for this email. Choisir le mode à utiliser pour ce message. + Raw text Texte brut + Please enter the text. Saisir le texte. + HTML HTML + Please enter the HTML. Saisir le code HTML. + External images + Do not embed images in HTML emails. + File name Nom de fichier + Please enter the file name. Saisir le nom de fichier sans extension. + Storage mode + Here you can choose whether you want to override the existing file or append to an existing file if present. + File content Contenu du fichier + Please enter the file content. Saisir le contenu du fichier + Text only Texte seulement + HTML and text HTML et texte + Create new file + Override existing file + Append to existing file + New language Nouvelle langue + Add a new language. Ajouter une nouvelle langue. + Edit language Éditer la langue + Edit language ID %s. Éditer la langue ID %s. + Copy language Copier la langue + Copy language ID %s. Copier la langue ID %s. + Delete language Supprimer la langue + Delete language ID %s. Supprimer la langue ID %s. + Language details Détails de la langue + Show details for language ID %s. Afficher les détails de la langue ID %s. + General language settings Paramètres de langue + Attachments Fichiers joints + Meta information Informations méta + Content Contenu + The following tokens you have used are not supported by this notification type: %s. Les jetons suivants utilisés ne sont pas pris en charge par ce type de notification : %s. + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + Attachments from templates + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + - + \ No newline at end of file diff --git a/languages/fr/tl_nc_message.xlf b/languages/fr/tl_nc_message.xlf index 07379022..7bf5a556 100644 --- a/languages/fr/tl_nc_message.xlf +++ b/languages/fr/tl_nc_message.xlf @@ -1,171 +1,211 @@ - - - + + Title Titre + Please enter a title for this message. Saisir un titre pour ce message. + Gateway Passerelle + Please select a gateway for this message. Sélectionner une passerelle pour ce message. + Languages Langues + Here you can manage the different languages. Gérer les différentes langues. + Manage languages Gérer les langues + Close Fermer + Priority Priorité + Please select a priority. Sélectionner une priorité. + Template file Modèle + Please choose a template file. Choisir un fichier modèle. + Tag Balise + Here you can enter the tag. Ici vous pouvez insérer la balise + Enable open tracking Autoriser le suivi de l'ouverture + Here you can enable open tracking. Ici vous pouvez autoriser le suivi de l'ouverture + Publish message Publier le message + Include this message when a notification is being sent. Inclure ce message quand une notification est envoyée. + New message Nouveau message + Create a new message. Créer un nouveau message. + Edit message Éditer le message + Edit message ID %s. Éditer le message ID %s. + Duplicate message Dupliquer le message + Duplicate message ID %s. Dupliquer le message d'ID %s + Move message Déplacer le message + Move message ID %s. Déplacer le message d'ID %s + Delete message Supprimer le message + Delete message ID %s. Supprimer le message ID %s. + Toggle visibility of message Basculer la visibilité du message + Toggle visibility of message ID %s. Basculer la visibilité du message ID %s. + Gateway message Message de la passerelle + Show details for message ID %s. Afficher les détails du message ID %s. + Title & Gateway Titre & passerelle + Languages Langues + Expert settings Paramètre avancés + Publish settings Paramètres de publication + very high très haute + high haute + normal normale + low basse + very low très basse + - + \ No newline at end of file diff --git a/languages/fr/tl_nc_notification.xlf b/languages/fr/tl_nc_notification.xlf index c0f04894..e1a2decd 100644 --- a/languages/fr/tl_nc_notification.xlf +++ b/languages/fr/tl_nc_notification.xlf @@ -1,138 +1,172 @@ - - - + + Title Titre + Please enter a title for this notification. Saisir un titre pour cette notification. + Type Type + Please select a type for this notification. Sélectionner le type de cette notification. + Delimiter for lists + - When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + Standard eMail gateway Passerelle de messagerie standard + Write to file Écrire dans un fichier + New notification Nouvelle notification + Create a new notification. Créer une notification. + Manage notifications Gérer les notifications + Manage messages for notification ID %s. Gérer les messages de la notification ID %s. + Edit notification Éditer la notification + Edit notification ID %s. Éditer la notification ID %s. + Copy notification Copier la notification + Copy notification ID %s. Copier la notification ID %s. + Delete notification Supprimer la notification + Delete notification ID %s. Supprimer la notification ID %s. + Notification details Détails de la notification + Show details for notification ID %s. Afficher les détails de la notification ID %s. + Title & type Titre & type + Configuration Configuration + Contao Contao + Form submission Soumission de formulaire + This notification type can be sent when the form is submitted. Ce type de notification peut être envoyé lorsque le formulaire est soumis. + Member activation + Member registration Inscription des membres + Member personal data Données personnelles du membre + Member lost password Mot de passe perdu + Token Templates + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + Templates + Newsletter subscribed + Newsletter activation + Newsletter unsubscribed + - + \ No newline at end of file diff --git a/languages/fr/tokens.xlf b/languages/fr/tokens.xlf index 2c807fc8..3c05608d 100644 --- a/languages/fr/tokens.xlf +++ b/languages/fr/tokens.xlf @@ -1,43 +1,53 @@ - - - + + E-mail address of administrator of the current page. Adresse e-mail de l'administrateur de la page en cours. + All the form fields. Tous les champs du formulaire. + All the form field labels. + All the form fields and their raw values. Tous les champs du formulaire et leur valeur non échappée + E-mail address of administrator of the current page. + E-mail address of the member. + The current domain. + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + Member fields as they were before the changes. + Flag (1 or 0) if a field has changed, to be used with if-conditions. + - Output of template "%s" + Output of template "%s" + - + \ No newline at end of file diff --git a/languages/it/tl_form.xlf b/languages/it/tl_form.xlf index ffa2cdb9..493684de 100644 --- a/languages/it/tl_form.xlf +++ b/languages/it/tl_form.xlf @@ -1,15 +1,16 @@ - - + Notification Notifica + Please select a notification. Seleziona una notifica. + - + \ No newline at end of file diff --git a/languages/it/tl_module.xlf b/languages/it/tl_module.xlf index df93bf22..0bea3773 100644 --- a/languages/it/tl_module.xlf +++ b/languages/it/tl_module.xlf @@ -1,24 +1,28 @@ - - - + + Notification Notification + Please select a notification. Seleziona una notifica. + Activation notification + Please select an activation notification. + Notification + - + \ No newline at end of file diff --git a/languages/it/tl_nc_gateway.xlf b/languages/it/tl_nc_gateway.xlf index a9fe6fef..f584878b 100644 --- a/languages/it/tl_nc_gateway.xlf +++ b/languages/it/tl_nc_gateway.xlf @@ -1,248 +1,322 @@ - - - + + Title Titolo + Please enter a title for this gateway. + Type Tipo + Please select a type for this gateway. + Target gateway + This gateway will queue all the messages and then send them over the gateway you define here. + Enable poor man's cronjob + This will register this queue gateway to the poor man's cronjob. + Interval + Choose the interval you would like to have this queue gateway be invoked. + Number of messages + Here you can enter the number of messages that should be sent per invocation. + Override SMTP settings + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. + File type Tipo file + Please choose the file type. Seleziona un tipo di file + Connection type Tipo connessione + Please choose the connection type. + Host name Nome host + Please enter the host name. + Port number Numero porta + Here you can enter the port number. Leave empty to use the default. + Username Nome utente + Please enter the username. Inserisci il nome utente + Password Password + Please enter the password. Inserisci la password + Path Percorso + Here you can enter the path (e.g. <em>downloads</em>). + Postmark API key + Please enter your unique Postmark API key. + Enable test mode + Here you can enable the test mode. + Enable SSL + Here you can enable the SSL connection. + Send e-mails via SMTP + Use an SMTP server instead of the PHP mail() function to send e-mails. + SMTP hostname + Please enter the host name of the SMTP server. + SMTP username + Here you can enter the SMTP username. + SMTP password + Here you can enter the SMTP password. + SMTP encryption + Here you can choose an encryption method (SSL or TLS). + SMTP port number + Please enter the port number of the SMTP server. + Queue + Standard email gateway + Write to file Scrivi su file + Postmark (postmarkapp.com) + Every minute + Every hour + Every day + Every week + Every month + CSV CSV + Plain Text / XML Testo / XML + Local Locale + FTP FTP + Connection successful + Could not connect to the FTP server! + Could not login to the FTP server! + New gateway + Create a new gateway. + Edit gateway + Edit gateway ID %s. + Copy gateway + Copy gateway ID %s. + Delete gateway + Delete gateway ID %s. + Gateway details + Show details for gateway ID %s. + Title & type + Gateway settings + Cronjob settings + Queued messages will remain in the queue forever unless @@ -263,13 +337,16 @@ PHP configurations such as the maximum execution time. Thus, try to keep the num /path/to/contao/composer/vendor/terminal42/notification_center/bin/queue </blockquote> + Delayed delivery + - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + - + \ No newline at end of file diff --git a/languages/it/tl_nc_language.xlf b/languages/it/tl_nc_language.xlf index d9e027bc..003edd5c 100644 --- a/languages/it/tl_nc_language.xlf +++ b/languages/it/tl_nc_language.xlf @@ -1,199 +1,257 @@ - - - + + Language Lingua + Please select a language. Seleziona una lingua + Fallback + Activate this checkbox if this language should be your fallback. + Recipients + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. + Attachments via tokens + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. + Attachments from file system + Please choose from the file picker if you would like to add static files. + Sender name + Please enter the sender name. + Sender address + Please enter the sender email address. + Send a CC to + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. + Send a BCC to + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. + Reply-to address + You can optionally set a reply-to address for this message. + Subject Oggetto + Please enter the subject for the e-mail. + Mode + Choose the mode you would like to be used for this email. + Raw text + Please enter the text. + HTML HTML + Please enter the HTML. + External images + Do not embed images in HTML emails. + File name Nome file + Please enter the file name. Inserisci il nome del file senza estensione. + Storage mode + Here you can choose whether you want to override the existing file or append to an existing file if present. + File content Contenuto file + Please enter the file content. + Text only Solo testo + HTML and text HTML e testo + Create new file + Override existing file + Append to existing file + New language Nuova lingua + Add a new language. Aggiungi una nuova lingua. + Edit language Modifica lingua + Edit language ID %s. + Copy language Copia lingua + Copy language ID %s. + Delete language + Delete language ID %s. + Language details + Show details for language ID %s. + General language settings + Attachments Allegati + Meta information + Content Contenuto + The following tokens you have used are not supported by this notification type: %s. + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + Attachments from templates + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + - + \ No newline at end of file diff --git a/languages/it/tl_nc_message.xlf b/languages/it/tl_nc_message.xlf index 44fe5f53..fc4cec96 100644 --- a/languages/it/tl_nc_message.xlf +++ b/languages/it/tl_nc_message.xlf @@ -1,147 +1,187 @@ - - + Title Titolo + Please enter a title for this message. + Gateway + Please select a gateway for this message. + Languages Lingue + Here you can manage the different languages. + Manage languages Gestisci lingue + Close Chiudi + Priority Priorità + Please select a priority. Seleziona una priorità. + Template file + Please choose a template file. + Tag + Here you can enter the tag. + Enable open tracking + Here you can enable open tracking. + Publish message + Include this message when a notification is being sent. + New message Nuovo messaggio + Create a new message. Crea un nuovo messaggio. + Edit message Modifica messaggio + Edit message ID %s. + Duplicate message Copia messaggio + Duplicate message ID %s. + Move message + Move message ID %s. + Delete message + Delete message ID %s. + Toggle visibility of message + Toggle visibility of message ID %s. + Gateway message + Show details for message ID %s. + Title & Gateway + Languages Lingue + Expert settings Impostazioni esperto + Publish settings + very high molto alto + high alto + normal normale + low basso + very low molto basso + - + \ No newline at end of file diff --git a/languages/it/tl_nc_notification.xlf b/languages/it/tl_nc_notification.xlf index 5b062a65..085aac8b 100644 --- a/languages/it/tl_nc_notification.xlf +++ b/languages/it/tl_nc_notification.xlf @@ -1,123 +1,157 @@ - - - + + Title Titolo + Please enter a title for this notification. + Type Tipo + Please select a type for this notification. + Delimiter for lists + - When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + Standard eMail gateway + Write to file Scrivi su file + New notification Nuova notifica + Create a new notification. Crea una nuova notifica. + Manage notifications Gestisci notifiche. + Manage messages for notification ID %s. + Edit notification Modifica notifca + Edit notification ID %s. + Copy notification Copia notifica + Copy notification ID %s. + Delete notification + Delete notification ID %s. + Notification details Dettagli notifica + Show details for notification ID %s. + Title & type + Configuration Configurazione + Contao Contao + Form submission + This notification type can be sent when the form is submitted. + Member activation + Member registration + Member personal data + Member lost password + Token Templates + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + Templates + Newsletter subscribed + Newsletter activation + Newsletter unsubscribed + - + \ No newline at end of file diff --git a/languages/pl/tl_form.xlf b/languages/pl/tl_form.xlf index b1e12a64..052ae819 100644 --- a/languages/pl/tl_form.xlf +++ b/languages/pl/tl_form.xlf @@ -1,15 +1,16 @@ - - + Notification Powiadomienie + Please select a notification. Wybierz powiadomienie. + - + \ No newline at end of file diff --git a/languages/pl/tl_module.xlf b/languages/pl/tl_module.xlf index 66109979..9b290d50 100644 --- a/languages/pl/tl_module.xlf +++ b/languages/pl/tl_module.xlf @@ -1,24 +1,28 @@ - - - + + Notification Powiadomienie + Please select a notification. Wybierz powiadomienie. + Activation notification + Please select an activation notification. + Notification + - + \ No newline at end of file diff --git a/languages/pl/tl_nc_gateway.xlf b/languages/pl/tl_nc_gateway.xlf index cc68aaa7..3ba585cf 100644 --- a/languages/pl/tl_nc_gateway.xlf +++ b/languages/pl/tl_nc_gateway.xlf @@ -1,271 +1,345 @@ - - - + + Title Nazwa + Please enter a title for this gateway. Wprowadź nazwę dla tej bramki. + Type Typ + Please select a type for this gateway. Wybierz typ dla tej bramki. + Target gateway + This gateway will queue all the messages and then send them over the gateway you define here. + Enable poor man's cronjob + This will register this queue gateway to the poor man's cronjob. + Interval + Choose the interval you would like to have this queue gateway be invoked. + Number of messages + Here you can enter the number of messages that should be sent per invocation. + Override SMTP settings Nadpisz ustawienia SMTP + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. Bramka będzie używać domyślnej konfiguracji e-mail Contao. Jeśli chcesz nadpisać ustawienia SMTP dla tej bramki, zaznacz ten checkbox. + File type Typ pliku + Please choose the file type. Proszę wybrać typ pliku. + Connection type Typ połączenia + Please choose the connection type. Proszę wybrać typ połączenia. + Host name Nazwa hostu + Please enter the host name. Proszę wprowadzić nazwę hostu. + Port number Numer portu + Here you can enter the port number. Leave empty to use the default. Tutaj możesz wprowadzić numer portu. Zostaw pole puste, aby użyć wartości domyślnej. + Username Użytkownik + Please enter the username. Proszę wprowadzić użytkownika. + Password Hasło + Please enter the password. Proszę wprowadzić hasło. + Path Ścieżka + Here you can enter the path (e.g. <em>downloads</em>). Tutaj możesz wprowadzić ścieżkę (np. <em>downloads</em>). + Postmark API key + Please enter your unique Postmark API key. + Enable test mode + Here you can enable the test mode. + Enable SSL + Here you can enable the SSL connection. + Send e-mails via SMTP + Use an SMTP server instead of the PHP mail() function to send e-mails. + SMTP hostname + Please enter the host name of the SMTP server. + SMTP username + Here you can enter the SMTP username. + SMTP password + Here you can enter the SMTP password. + SMTP encryption + Here you can choose an encryption method (SSL or TLS). + SMTP port number + Please enter the port number of the SMTP server. + Queue + Standard email gateway Standardowa bramka e-mail + Write to file Zapisz do pliku + Postmark (postmarkapp.com) + Every minute + Every hour + Every day + Every week + Every month + CSV CSV + Plain Text / XML Czysty tekst / XML + Local Lokalny + FTP FTP + Connection successful Połączenie udane + Could not connect to the FTP server! Połączenie nieudane: %s + Could not login to the FTP server! + New gateway Nowa bramka + Create a new gateway. Utwórz nową bramkę. + Edit gateway Edytuj bramkę + Edit gateway ID %s. Edytuj bramkę ID %s. + Copy gateway Kopiuj bramkę + Copy gateway ID %s. Kopiuj bramkę ID %s. + Delete gateway Usuń bramkę + Delete gateway ID %s. Usuń bramkę ID %s. + Gateway details Szczegóły bramki + Show details for gateway ID %s. Pokaż szczegóły bramki ID %s. + Title & type Nazwa i typ + Gateway settings Ustawienia bramki + Cronjob settings + Queued messages will remain in the queue forever unless @@ -286,13 +360,16 @@ PHP configurations such as the maximum execution time. Thus, try to keep the num /path/to/contao/composer/vendor/terminal42/notification_center/bin/queue </blockquote> + Delayed delivery + - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + - + \ No newline at end of file diff --git a/languages/pl/tl_nc_language.xlf b/languages/pl/tl_nc_language.xlf index b580f30e..f12bd894 100644 --- a/languages/pl/tl_nc_language.xlf +++ b/languages/pl/tl_nc_language.xlf @@ -1,233 +1,291 @@ - - - + + Language Język + Please select a language. Wybierz język. + Fallback Rezerwowy + Activate this checkbox if this language should be your fallback. Zaznacz to pole, jeśli język ma być rezerwowy. + Recipients Odbiorcy + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. Wprowadź listę odbiorców <strong>po przecinku</strong>. Użyj kreatora pomocy, aby zobaczyć dostępne tokeny. + Attachments via tokens Załączniki z tokenów + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. Wprowadź listę załączników <strong>po przecinku</strong>. Użyj kreatora pomocy, aby zobaczyć dostępne tokeny. + Attachments from file system Załączniki z systemu plików + Please choose from the file picker if you would like to add static files. Wybierz statyczne pliki, które chcesz załączyć. + Sender name Nazwa nadawcy + Please enter the sender name. Wprowadź nazwę nadawcy. + Sender address Adres nadawcy + Please enter the sender email address. Wprowadź adres e-mail nadawcy. + Send a CC to Wyślij CC do + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. Odbiorcy, którzy powinni otrzymać kopię wiadomości. Wprowadź kilka adresów po przecinku. + Send a BCC to Wyślij BCC do + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. Odbiorcy, którzy powinni otrzymać ukrytą kopię wiadomości. Wprowadź kilka adresów po przecinku. + Reply-to address - Adres "odpowiedz do" + Adres "odpowiedz do" + You can optionally set a reply-to address for this message. - Tutaj możesz ustawić adres "odpowiedz do" dla tej wiadomości. + Tutaj możesz ustawić adres "odpowiedz do" dla tej wiadomości. + Subject Temat + Please enter the subject for the e-mail. Wprowadź temat e-mail. + Mode Tryb + Choose the mode you would like to be used for this email. Wybierz tryb, który będzie użyty do wysłania e-mail. + Raw text Tekst + Please enter the text. Wprowadź tekst. + HTML HTML + Please enter the HTML. Wprowadź zawartość HTML. + External images + Do not embed images in HTML emails. + File name Nazwa pliku + Please enter the file name. Proszę wprowadzić nazwę pliku bez rozszerzenia. + Storage mode + Here you can choose whether you want to override the existing file or append to an existing file if present. + File content Zawartość pliku + Please enter the file content. Proszę wprowadzić zawartość pliku. + Text only Tylko tekst + HTML and text HTML i tekst + Create new file + Override existing file + Append to existing file + New language Nowy język + Add a new language. Dodaj nowy język. + Edit language Edytuj język + Edit language ID %s. Edytuj język ID %s. + Copy language Kopiuj język + Copy language ID %s. Kopiuj język ID %s. + Delete language Usuń język + Delete language ID %s. Usuń język ID %s. + Language details Szczegóły języka + Show details for language ID %s. Pokaż szczegóły języka ID %s. + General language settings Ogólne ustawienia języka + Attachments Załączniki + Meta information Informacje meta + Content Zawartość + The following tokens you have used are not supported by this notification type: %s. Następujące tokeny nie są wspierane przez ten typ powiadomienia: %s. + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. + Attachments from templates + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + - + \ No newline at end of file diff --git a/languages/pl/tl_nc_message.xlf b/languages/pl/tl_nc_message.xlf index 3afcea72..d648b51d 100644 --- a/languages/pl/tl_nc_message.xlf +++ b/languages/pl/tl_nc_message.xlf @@ -1,165 +1,205 @@ - - + Title Nazwa + Please enter a title for this message. Wprowadź nazwę dla tej wiadomości. + Gateway Bramka + Please select a gateway for this message. Wybierz bramkę dla tej wiadomości. + Languages Języki + Here you can manage the different languages. Tutaj możesz zarządzać różnymi językami. + Manage languages Zarządzaj językami + Close Zamknij + Priority Priorytet + Please select a priority. Wybierz priorytet. + Template file Szablon + Please choose a template file. Wybierz pliks zablonu. + Tag + Here you can enter the tag. + Enable open tracking + Here you can enable open tracking. + Publish message Publikuj wiadomość + Include this message when a notification is being sent. Załącz tą wiadomość przy wysyłaniu powiadomienia. + New message Nowa wiadomość + Create a new message. Utwórz nową wiadomość. + Edit message Edytuj wiadomość + Edit message ID %s. Edytuj wiadomość ID %s. + Duplicate message Kopiuj wiadomość + Duplicate message ID %s. Kopiuj wiadomość ID %s. + Move message + Move message ID %s. + Delete message Usuń wiadomość + Delete message ID %s. Usuń wiadomość ID %s. + Toggle visibility of message Zmień widoczność wiadomości + Toggle visibility of message ID %s. Zmień widoczność wiadomości ID %s. + Gateway message Bramka wiadomości + Show details for message ID %s. Pokaż szczegóły wiadomości ID %s. + Title & Gateway Nazwa i bramka + Languages Języki + Expert settings Ustawienia zaawansowane + Publish settings Ustawienia publikacji + very high bardzo wysoki + high wysoki + normal normalny + low niski + very low bardzo niski + - + \ No newline at end of file diff --git a/languages/pl/tl_nc_notification.xlf b/languages/pl/tl_nc_notification.xlf index 0d3a7071..d9b2f210 100644 --- a/languages/pl/tl_nc_notification.xlf +++ b/languages/pl/tl_nc_notification.xlf @@ -1,137 +1,171 @@ - - - + + Title Nazwa + Please enter a title for this notification. Wprowadź nazwę dla tego powiadomienia. + Type Typ + Please select a type for this notification. Wybierz typ dla tego powiadomienia. + Delimiter for lists + - When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + Standard eMail gateway Standardowa bramka e-mail + Write to file Zapisz do pliku + New notification Nowe powiadomienie + Create a new notification. Utwórz nowe powiadomienie. + Manage notifications Zarządzaj powiadomieniami + Manage messages for notification ID %s. Zarządzaj wiadomościami dla powiadomienia ID %s. + Edit notification Edytuj powiadomienie + Edit notification ID %s. Edytuj powiadomienie ID %s. + Copy notification Kopiuj powiadomienie + Copy notification ID %s. Kopiuj powiadomienie ID %s. + Delete notification Usuń powiadomienie + Delete notification ID %s. Usuń powiadomienie ID %s. + Notification details Szczegóły powiadomienia + Show details for notification ID %s. Pokaż szczegóły powiadomienia ID %s. + Title & type Nazwa i typ + Configuration Konfiguracja + Contao Contao + Form submission Wysłanie formularza + This notification type can be sent when the form is submitted. Ten typ powiadomienia może byś wysłany, gdy zostanie wysłany formularz. + Member activation + Member registration Rejestracja użytkownika + Member personal data + Member lost password Zaginione hasło użytkownika + Token Templates + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + Templates + Newsletter subscribed + Newsletter activation + Newsletter unsubscribed + - + \ No newline at end of file diff --git a/languages/pl/tokens.xlf b/languages/pl/tokens.xlf index 41a19f07..209820ee 100644 --- a/languages/pl/tokens.xlf +++ b/languages/pl/tokens.xlf @@ -1,42 +1,52 @@ - - - + + E-mail address of administrator of the current page. Adres e-mail administratora bieżącej strony. + All the form fields. Wszystkie pola formularza. + All the form field labels. + All the form fields and their raw values. + E-mail address of administrator of the current page. + E-mail address of the member. + The current domain. + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. + Member fields as they were before the changes. + Flag (1 or 0) if a field has changed, to be used with if-conditions. + - Output of template "%s" + Output of template "%s" + - + \ No newline at end of file diff --git a/languages/ru/tl_form.xlf b/languages/ru/tl_form.xlf index 47345451..d3fe5835 100644 --- a/languages/ru/tl_form.xlf +++ b/languages/ru/tl_form.xlf @@ -1,15 +1,16 @@ - - + Notification Уведомление + Please select a notification. Выберите уведомление. + - + \ No newline at end of file diff --git a/languages/ru/tl_module.xlf b/languages/ru/tl_module.xlf index e993913d..66eea747 100644 --- a/languages/ru/tl_module.xlf +++ b/languages/ru/tl_module.xlf @@ -1,26 +1,30 @@ - - - + + Notification Уведомление + Please select a notification. Выберите уведомление. + Activation notification Уведомление об активации + Please select an activation notification. Выберите уведомление об активации. + Notification + - + \ No newline at end of file diff --git a/languages/ru/tl_nc_gateway.xlf b/languages/ru/tl_nc_gateway.xlf index 839f66a4..3ba27097 100644 --- a/languages/ru/tl_nc_gateway.xlf +++ b/languages/ru/tl_nc_gateway.xlf @@ -1,303 +1,377 @@ - - - + + Title Название + Please enter a title for this gateway. Введите название этого шлюза. + Type Тип + Please select a type for this gateway. Выберите тип этого шлюза. + Target gateway Целевой шлюз + This gateway will queue all the messages and then send them over the gateway you define here. Этот шлюз будет ставить в очередь все сообщения, а затем отправлять их через шлюз, который вы определите. + Enable poor man's cronjob + This will register this queue gateway to the poor man's cronjob. + Interval Интервал + Choose the interval you would like to have this queue gateway be invoked. Выберите интервал, который хотите использовать для вызова этого шлюза. + Number of messages Количество сообщений + Here you can enter the number of messages that should be sent per invocation. Вы можете указать количество сообщений, которые должны быть отправлены на вызов. + Override SMTP settings Переопределить параметры SMTP + This gateway will take the Contao e-mail settings by default. If you want to override the SMTP settings for this specific gateway, activate this checkbox. Этот шлюз будет использовать параметры электронной почты Contao по умолчанию. Если вы хотите переопределить параметры SMTP для конкретного шлюза, активируйте этот чекбокс. + File type Тип файла + Please choose the file type. Выберите тип файла. + Connection type Тип подключения + Please choose the connection type. Выберите тип подключения. + Host name Имя хоста + Please enter the host name. Введите имя хоста. + Port number Номер порта + Here you can enter the port number. Leave empty to use the default. Вы можете ввести номер порта. Оставьте поле пустым для использования значения по умолчанию. + Username Имя пользователя + Please enter the username. Введите имя пользователя. + Password Пароль + Please enter the password. Введите пароль. + Path Путь + Here you can enter the path (e.g. <em>downloads</em>). Вы можете ввести путь (напр., <em>downloads</em>). + Postmark API key Ключ Postmark API + Please enter your unique Postmark API key. Введите уникальный ключ Postmark API. + Enable test mode Включить тестовый режим + Here you can enable the test mode. Вы можете включить тестовый режим. + Enable SSL Включить SSL + Here you can enable the SSL connection. Вы можете включить SSL-соединение. + Send e-mails via SMTP Отправлять E-mail через SMTP + Use an SMTP server instead of the PHP mail() function to send e-mails. Использовать SMTP-сервер, а не функцию PHP mail() для отправки электронной почты. + SMTP hostname Имя SMTP-хоста + Please enter the host name of the SMTP server. Введите имя SMTP-сервера. + SMTP username Имя пользователя SMTP + Here you can enter the SMTP username. Вы можете ввести имя пользователя SMTP. + SMTP password Пароль SMTP + Here you can enter the SMTP password. Вы можете ввести пароль SMTP. + SMTP encryption Шифрование SMTP + Here you can choose an encryption method (SSL or TLS). Вы можете выбрать метод шифрования (SSL или TLS). + SMTP port number Порт SMTP + Please enter the port number of the SMTP server. Введите номер порта SMTP-сервера. + Queue Очередь + Standard email gateway Стандарт почтового шлюза + Write to file Запись в файл + Postmark (postmarkapp.com) Почтовые марки (postmarkapp.com) + Every minute Каждую минуту + Every hour Каждый час + Every day Каждый день + Every week Каждую неделю + Every month Каждый месяц + CSV CSV + Plain Text / XML Обычный текст / XML + Local Локальный + FTP FTP + Connection successful Успешное подключение + Could not connect to the FTP server! Не удалось подключиться к FTP-серверу! + Could not login to the FTP server! Не удалось войти на FTP-сервер! + New gateway Новый шлюз + Create a new gateway. Создать новый шлюз. + Edit gateway Редактировать шлюз + Edit gateway ID %s. Редактировать шлюз ID %s. + Copy gateway Копировать шлюз + Copy gateway ID %s. Копировать шлюз ID %s. + Delete gateway Удалить шлюз + Delete gateway ID %s. Удалить шлюз ID %s. + Gateway details Детали шлюза + Show details for gateway ID %s. Показать детали шлюза ID %s. + Title & type Название и тип + Gateway settings Параметры шлюза + Cronjob settings + Queued messages will remain in the queue forever unless @@ -318,13 +392,16 @@ PHP configurations such as the maximum execution time. Thus, try to keep the num /path/to/contao/composer/vendor/terminal42/notification_center/bin/queue </blockquote> + Delayed delivery + - Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + Enter a <a href="https://php.net/strtotime" target="_blank"><i>strtotime</i></a> time interval to delay message delivery (e.g. <em>+1 day</em>). + - + \ No newline at end of file diff --git a/languages/ru/tl_nc_language.xlf b/languages/ru/tl_nc_language.xlf index 6c241324..58bcd712 100644 --- a/languages/ru/tl_nc_language.xlf +++ b/languages/ru/tl_nc_language.xlf @@ -1,241 +1,299 @@ - - - + + Language Язык + Please select a language. Выберите язык. + Fallback Резервный + Activate this checkbox if this language should be your fallback. Выберите чекбокс, если этот язык должен быть резервным. + Recipients Получатели + Please enter a <strong>comma-separated</strong> list of recipients in this field. Use the autocompleter to see the available simple tokens. Введите <strong>разделенный запятыми</strong> список получателей. Используйте авто-завершение, чтобы увидеть доступные маркеры. + Attachments via tokens Вложения через маркеры + Please enter a <strong>comma-separated</strong> list of attachment tokens in this field. Use the autocompleter to see the available simple tokens. Введите <strong>разделенный запятыми</strong> список маркеров в этой области. Используйте авто-завершение, чтобы увидеть доступные маркеры. + Attachments from file system Вложения из файловой системы + Please choose from the file picker if you would like to add static files. Выберите при помощи файл-менеджера и добавьте статические файлы. + Sender name Имя отправителя + Please enter the sender name. Введите имя отправителя. + Sender address Адрес отправителя + Please enter the sender email address. Введите адрес электронной почты отправителя. + Send a CC to Отправить CC + Recipients that should receive a carbon copy of the mail. Separate multiple addresses with a comma. Получатели, которые должны получить копию по электронной почте. Несколько адресов можно разделить запятой. + Send a BCC to Отправить СК + Recipients that should receive a blind carbon copy of the mail. Separate multiple addresses with a comma. Получатели, которые должны получить скрытую копию по электронной почте. Несколько адресов можно разделить запятой. + Reply-to address Адрес для ответа + You can optionally set a reply-to address for this message. При необходимости можно задать адрес для ответа на данное сообщение. + Subject Тема + Please enter the subject for the e-mail. Введите тему сообщения. + Mode Режим + Choose the mode you would like to be used for this email. Выберите используемый режим для этого письма. + Raw text Неформатированный текст + Please enter the text. Введите текст. + HTML HTML + Please enter the HTML. Введите HTML. + External images Внешние изображения + Do not embed images in HTML emails. Не вставлять изображения в HTML-сообщения. + File name Имя файла + Please enter the file name. Введите имя файла. + Storage mode Режим хранения + Here you can choose whether you want to override the existing file or append to an existing file if present. Вы можете выбрать, переопределить или добавить существующий файл, если он есть. + File content Содержимое файла + Please enter the file content. Введите содержимое файла. + Text only Только текст + HTML and text HTML и текст + Create new file Создать новый файл + Override existing file Переопределить существующий файл + Append to existing file Добавить в существующий файл + New language Новый язык + Add a new language. Добавить новый язык. + Edit language Редактировать язык + Edit language ID %s. Редактировать язык ID %s. + Copy language Копировать язык + Copy language ID %s. Копировать язык ID %s. + Delete language Удалить язык + Delete language ID %s. Удалить язык ID %s. + Language details Детали языка + Show details for language ID %s. Показать детали языка ID %s. + General language settings Общие параметры языка + Attachments Вложения + Meta information Мета информация + Content Контент + The following tokens you have used are not supported by this notification type: %s. Используемые вами маркеры не поддерживают этот тип уведомлений: %s. + Your content contains invalid tokens. Simple Tokens cannot contain one of those characters: <>!=*. They are either used for comparisons in if statements or as wildcard. - В вашем содержании указаны недопустимые токены. Простые токены не могут содержать любой из этих символов: <>!=*. Они либо используются для сравнения в операторах "if", либо в виде подстановочных знаков. + В вашем содержании указаны недопустимые токены. Простые токены не могут содержать любой из этих символов: <>!=*. Они либо используются для сравнения в операторах "if", либо в виде подстановочных знаков. + Attachments from templates + These files are used as templates for an attachment. Simple tokens inside these files are replaced and attached to the message. + - + \ No newline at end of file diff --git a/languages/ru/tl_nc_message.xlf b/languages/ru/tl_nc_message.xlf index 877bb34b..cc84d95e 100644 --- a/languages/ru/tl_nc_message.xlf +++ b/languages/ru/tl_nc_message.xlf @@ -1,171 +1,211 @@ - - + Title Название + Please enter a title for this message. Введите название данного сообщения. + Gateway Шлюз + Please select a gateway for this message. Выберите шлюз для этого сообщения. + Languages Языки + Here you can manage the different languages. Вы можете управлять различными языками. + Manage languages Управление языками + Close Закрыть + Priority Приоритет + Please select a priority. Выберите приоритет. + Template file Файл шаблона + Please choose a template file. Выберите файл шаблона. + Tag Тег + Here you can enter the tag. Вы можете ввести тег. + Enable open tracking Включить открытое отслеживание + Here you can enable open tracking. Вы можете включить открытое отслеживание. + Publish message Опубликовать сообщение + Include this message when a notification is being sent. Включить это сообщение при отправке уведомления. + New message Новое сообщение + Create a new message. Создать новое сообщение. + Edit message Редактировать сообщение + Edit message ID %s. Редактировать сообщение ID %s. + Duplicate message Дублировать сообщение + Duplicate message ID %s. Дублировать сообщение ID %s. + Move message Переместить сообщение + Move message ID %s. Переместить сообщение ID %s. + Delete message Удалить сообщение + Delete message ID %s. Удалить сообщение ID %s. + Toggle visibility of message Переключить видимость сообщения + Toggle visibility of message ID %s. Переключить видимость сообщения ID %s. + Gateway message Сообщение шлюза + Show details for message ID %s. Показать детали для сообщения ID %s. + Title & Gateway Название и шлюз + Languages Языки + Expert settings Экспертные настройки + Publish settings Настройки публикации + very high очень высокий + high высокий + normal нормальный + low низкий + very low очень низкий + - + \ No newline at end of file diff --git a/languages/ru/tl_nc_notification.xlf b/languages/ru/tl_nc_notification.xlf index 4de2dc93..ddb31a60 100644 --- a/languages/ru/tl_nc_notification.xlf +++ b/languages/ru/tl_nc_notification.xlf @@ -1,141 +1,175 @@ - - - + + Title Название + Please enter a title for this notification. Введите название этого уведомления. + Type Тип + Please select a type for this notification. Выберите тип данного уведомления. + Delimiter for lists Разделитель для списков + - When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. - При отправке значений списка (значений массива), Центр уведомлений автоматически выравнивает их по умолчанию с помощью запятой (","). Измените это, если хотите. + When list values (array values) are submitted, the Notification Center flattens them automatically by using a comma (",") by default. Change this here if you like. + При отправке значений списка (значений массива), Центр уведомлений автоматически выравнивает их по умолчанию с помощью запятой (","). Измените это, если хотите. + Standard eMail gateway Стандарт почтового шлюза + Write to file Запись в файл + New notification Новое уведомление + Create a new notification. Создать новое уведомление. + Manage notifications Управление уведомлениями + Manage messages for notification ID %s. Управление сообщениями для уведомления ID %s. + Edit notification Редактировать уведомление + Edit notification ID %s. Редактировать уведомление ID %s. + Copy notification Копировать уведомление + Copy notification ID %s. Копировать уведомление ID %s. + Delete notification Удалить уведомление + Delete notification ID %s. Удалить уведомление ID %s. + Notification details Детали уведомления + Show details for notification ID %s. Показать детали уведомления ID %s. + Title & type Название и тип + Configuration Конфигурация + Contao Contao + Form submission Отправка формы + This notification type can be sent when the form is submitted. Тип уведомления может быть отправлен при отправке формы. + Member activation Активация участников + Member registration Регистрация участника + Member personal data Персональные данные участника + Member lost password Забытый пароль участника + Token Templates + Choose templates to generate tokens from their output. Each template name must start with notification_xxx and its token will be converted to a ##template_xxx## token. + Templates + Newsletter subscribed + Newsletter activation + Newsletter unsubscribed + - + \ No newline at end of file diff --git a/languages/ru/tl_nc_queue.xlf b/languages/ru/tl_nc_queue.xlf index 7683e546..a20d7f63 100644 --- a/languages/ru/tl_nc_queue.xlf +++ b/languages/ru/tl_nc_queue.xlf @@ -1,89 +1,109 @@ - - - + + Source queue gateway Шлюз источника очереди + Target gateway Целевой шлюз + Source message Исходное сообщение + Date added to queue Дата добавления в очередь + Date sent from queue Дата отправки из очереди + Had an error during delivery process Если в процессе доставки произошла ошибка + Tokens Токены + Language Язык + Waiting in queue. Ожидание в очереди. + Error sending the message. Check the system log for more details. Ошибка отправки сообщения. Проверьте системный журнал для получения более подробной информации. + Message sent. Сообщение отправлено. + Source Источник + Add to queue again Добавить в очередь еще раз + This queued message (ID %s) encountered an error but you can re-add it to the queue by clicking this button. Сообщение в очереди (ID %s) обнаружило ошибку, но вы можете повторно добавить его в очередь, нажав эту кнопку. + Delete queued message Удалить сообщение в очереди + Delete queued message (ID %s). Удалить сообщение в очереди (ID %s). + Show details Показать детали + Shows details of the queued message ID %s. Показать детали о сообщении в очереди ID %s. + Are you sure you want to re-add queued message ID %s to the queue? Вы действительно хотите повторно добавить сообщение из очереди ID %s в очередь? + Date delayed in queue + Attachments + - + \ No newline at end of file diff --git a/languages/ru/tokens.xlf b/languages/ru/tokens.xlf index c09327be..bcd2e886 100644 --- a/languages/ru/tokens.xlf +++ b/languages/ru/tokens.xlf @@ -1,50 +1,60 @@ - - - + + E-mail address of administrator of the current page. Адрес электронной почты администратора текущей страницы. + All the form fields. Все поля формы. + All the form field labels. Все метки полей формы. + All the form fields and their raw values. Все поля формы и их начальные значения. + E-mail address of administrator of the current page. Адрес электронной почты администратора текущей страницы. + E-mail address of the member. Адрес электронной почты участника. + The current domain. Текущий домен. + Current member fields as submitted by the form. Use {{user::*}} insert tags if you need other properties. Текущие поля участника, представленные формой. Используйте вставку тега {{user::*}}, если вам нужны другие свойства. + Member fields as they were before the changes. Поля пользователя, какими они были до изменений. + Flag (1 or 0) if a field has changed, to be used with if-conditions. - Флаг (1 или 0), если поле изменилось, для использования с условиями "if". + Флаг (1 или 0), если поле изменилось, для использования с условиями "if". + - Output of template "%s" + Output of template "%s" + - + \ No newline at end of file