diff options
author | Cyrill von Wattenwyl <cvw@adfinis.com> | 2014-09-02 11:20:52 +0200 |
---|---|---|
committer | Cyrill von Wattenwyl <cvw@adfinis.com> | 2014-09-02 11:20:52 +0200 |
commit | 11a40dd1fef6c5b78b054617caba4325f95ee386 (patch) | |
tree | de2e1d7efd6423ef4d1256dd5c90a972ad172719 /plugins/managesieve | |
parent | 187fd666aa2f32dedfe544d69b7cb213698197f2 (diff) | |
parent | ba084313bfc9c7a5a83e0611fe4376543cc1653d (diff) |
Merge branch 'master' of https://github.com/roundcube/roundcubemail
Conflicts:
plugins/password/config.inc.php.dist
Diffstat (limited to 'plugins/managesieve')
24 files changed, 1453 insertions, 286 deletions
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 29b359d7f..88526168e 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,6 +1,17 @@ +- Added simple API to manage vacation rule +- Fix missing css/js scripts in filter form in mail task +- Fix default vacation status (#1490019) +- Make possible to set vacation start/end date and time + +* version 8.0 [2014-07-16] +----------------------------------------------------------- +- Fix bug where non-existing (or unsubscribed) folder wasn't listed in folder selector (#1489956) - Added optional separate interface for out-of-office management (#1488266) - Fix disabled "create filter" action - Fix enotify/notify extension handling +- Improved UI accessibility +- Added option to specify connection socket parameters - managesieve_conn_options +- Support vacation date rules without date extension (#1489978) * version 7.2 [2014-02-14] ----------------------------------------------------------- diff --git a/plugins/managesieve/config.inc.php.dist b/plugins/managesieve/config.inc.php.dist index 14123c110..1f20b5ae4 100644 --- a/plugins/managesieve/config.inc.php.dist +++ b/plugins/managesieve/config.inc.php.dist @@ -28,6 +28,18 @@ $config['managesieve_auth_pw'] = null; // Note: tls:// prefix in managesieve_host is also supported $config['managesieve_usetls'] = false; +// Connection scket context options +// See http://php.net/manual/en/context.ssl.php +// The example below enables server certificate validation +//$config['imap_conn_options'] = array( +// 'ssl' => array( +// 'verify_peer' => true, +// 'verify_depth' => 3, +// 'cafile' => '/etc/openssl/certs/ca.crt', +// ), +// ); +$config['managesieve_conn_options'] = null; + // default contents of filters script (eg. default spam filter) $config['managesieve_default'] = '/etc/dovecot/sieve/global'; diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve.php b/plugins/managesieve/lib/Roundcube/rcube_sieve.php index 3bd2978da..389c85012 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve.php @@ -22,17 +22,6 @@ // Managesieve Protocol: RFC5804 -define('SIEVE_ERROR_CONNECTION', 1); -define('SIEVE_ERROR_LOGIN', 2); -define('SIEVE_ERROR_NOT_EXISTS', 3); // script not exists -define('SIEVE_ERROR_INSTALL', 4); // script installation -define('SIEVE_ERROR_ACTIVATE', 5); // script activation -define('SIEVE_ERROR_DELETE', 6); // script deletion -define('SIEVE_ERROR_INTERNAL', 7); // internal error -define('SIEVE_ERROR_DEACTIVATE', 8); // script activation -define('SIEVE_ERROR_OTHER', 255); // other/unknown error - - class rcube_sieve { private $sieve; // Net_Sieve object @@ -43,6 +32,16 @@ class rcube_sieve public $current; // name of currently loaded script private $exts; // array of supported extensions + const ERROR_CONNECTION = 1; + const ERROR_LOGIN = 2; + const ERROR_NOT_EXISTS = 3; // script not exists + const ERROR_INSTALL = 4; // script installation + const ERROR_ACTIVATE = 5; // script activation + const ERROR_DELETE = 6; // script deletion + const ERROR_INTERNAL = 7; // internal error + const ERROR_DEACTIVATE = 8; // script activation + const ERROR_OTHER = 255; // other/unknown error + /** * Object constructor @@ -57,10 +56,11 @@ class rcube_sieve * @param boolean Enable/disable debugging * @param string Proxy authentication identifier * @param string Proxy authentication password + * @param array List of options to pass to stream_context_create(). */ public function __construct($username, $password='', $host='localhost', $port=2000, $auth_type=null, $usetls=true, $disabled=array(), $debug=false, - $auth_cid=null, $auth_pw=null) + $auth_cid=null, $auth_pw=null, $options=array()) { $this->sieve = new Net_Sieve(); @@ -68,8 +68,8 @@ class rcube_sieve $this->sieve->setDebug(true, array($this, 'debug_handler')); } - if (PEAR::isError($this->sieve->connect($host, $port, null, $usetls))) { - return $this->_set_error(SIEVE_ERROR_CONNECTION); + if (PEAR::isError($this->sieve->connect($host, $port, $options, $usetls))) { + return $this->_set_error(self::ERROR_CONNECTION); } if (!empty($auth_cid)) { @@ -81,7 +81,7 @@ class rcube_sieve if (PEAR::isError($this->sieve->login($username, $password, $auth_type ? strtoupper($auth_type) : null, $authz)) ) { - return $this->_set_error(SIEVE_ERROR_LOGIN); + return $this->_set_error(self::ERROR_LOGIN); } $this->exts = $this->get_extensions(); @@ -116,10 +116,10 @@ class rcube_sieve public function save($name = null) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if (!$this->script) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if (!$name) $name = $this->current; @@ -130,7 +130,7 @@ class rcube_sieve $script = '/* empty script */'; if (PEAR::isError($this->sieve->installScript($name, $script))) - return $this->_set_error(SIEVE_ERROR_INSTALL); + return $this->_set_error(self::ERROR_INSTALL); return true; } @@ -141,13 +141,13 @@ class rcube_sieve public function save_script($name, $content = null) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if (!$content) $content = '/* empty script */'; if (PEAR::isError($this->sieve->installScript($name, $content))) - return $this->_set_error(SIEVE_ERROR_INSTALL); + return $this->_set_error(self::ERROR_INSTALL); return true; } @@ -158,13 +158,13 @@ class rcube_sieve public function activate($name = null) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if (!$name) $name = $this->current; if (PEAR::isError($this->sieve->setActive($name))) - return $this->_set_error(SIEVE_ERROR_ACTIVATE); + return $this->_set_error(self::ERROR_ACTIVATE); return true; } @@ -175,10 +175,10 @@ class rcube_sieve public function deactivate() { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if (PEAR::isError($this->sieve->setActive(''))) - return $this->_set_error(SIEVE_ERROR_DEACTIVATE); + return $this->_set_error(self::ERROR_DEACTIVATE); return true; } @@ -189,7 +189,7 @@ class rcube_sieve public function remove($name = null) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if (!$name) $name = $this->current; @@ -197,10 +197,10 @@ class rcube_sieve // script must be deactivated first if ($name == $this->sieve->getActive()) if (PEAR::isError($this->sieve->setActive(''))) - return $this->_set_error(SIEVE_ERROR_DELETE); + return $this->_set_error(self::ERROR_DELETE); if (PEAR::isError($this->sieve->removeScript($name))) - return $this->_set_error(SIEVE_ERROR_DELETE); + return $this->_set_error(self::ERROR_DELETE); if ($name == $this->current) $this->current = null; @@ -217,9 +217,14 @@ class rcube_sieve return $this->exts; if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); $ext = $this->sieve->getExtensions(); + + if (PEAR::isError($ext)) { + return array(); + } + // we're working on lower-cased names $ext = array_map('strtolower', (array) $ext); @@ -241,12 +246,12 @@ class rcube_sieve if (!$this->list) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); $list = $this->sieve->listScripts(); if (PEAR::isError($list)) - return $this->_set_error(SIEVE_ERROR_OTHER); + return $this->_set_error(self::ERROR_OTHER); $this->list = $list; } @@ -260,7 +265,7 @@ class rcube_sieve public function get_active() { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); return $this->sieve->getActive(); } @@ -271,7 +276,7 @@ class rcube_sieve public function load($name) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if ($this->current == $name) return true; @@ -279,7 +284,7 @@ class rcube_sieve $script = $this->sieve->getScript($name); if (PEAR::isError($script)) - return $this->_set_error(SIEVE_ERROR_OTHER); + return $this->_set_error(self::ERROR_OTHER); // try to parse from Roundcube format $this->script = $this->_parse($script); @@ -295,7 +300,7 @@ class rcube_sieve public function load_script($script) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); // try to parse from Roundcube format $this->script = $this->_parse($script); @@ -340,12 +345,12 @@ class rcube_sieve public function get_script($name) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); $content = $this->sieve->getScript($name); if (PEAR::isError($content)) - return $this->_set_error(SIEVE_ERROR_OTHER); + return $this->_set_error(self::ERROR_OTHER); return $content; } @@ -356,13 +361,13 @@ class rcube_sieve public function copy($name, $copy) { if (!$this->sieve) - return $this->_set_error(SIEVE_ERROR_INTERNAL); + return $this->_set_error(self::ERROR_INTERNAL); if ($copy) { $content = $this->sieve->getScript($copy); if (PEAR::isError($content)) - return $this->_set_error(SIEVE_ERROR_OTHER); + return $this->_set_error(self::ERROR_OTHER); } return $this->save_script($name, $content); diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index 9900f16b5..302c7c7a1 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -73,7 +73,7 @@ class rcube_sieve_engine */ function __construct($plugin) { - $this->rc = rcmail::get_instance(); + $this->rc = rcube::get_instance(); $this->plugin = $plugin; } @@ -91,6 +91,76 @@ class rcube_sieve_engine 'filtersetform' => array($this, 'filterset_form'), )); + // connect to managesieve server + $error = $this->connect($_SESSION['username'], $this->rc->decrypt($_SESSION['password'])); + + // load current/active script + if (!$error) { + // Get list of scripts + $list = $this->list_scripts(); + + // reset current script when entering filters UI (#1489412) + if ($this->rc->action == 'plugin.managesieve') { + $this->rc->session->remove('managesieve_current'); + } + + if ($mode != 'vacation') { + if (!empty($_GET['_set']) || !empty($_POST['_set'])) { + $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true); + } + else if (!empty($_SESSION['managesieve_current'])) { + $script_name = $_SESSION['managesieve_current']; + } + } + + $error = $this->load_script($script_name); + } + + // finally set script objects + if ($error) { + switch ($error) { + case rcube_sieve::ERROR_CONNECTION: + case rcube_sieve::ERROR_LOGIN: + $this->rc->output->show_message('managesieve.filterconnerror', 'error'); + rcube::raise_error(array('code' => 403, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Unable to connect to managesieve on $host:$port"), true, false); + break; + + default: + $this->rc->output->show_message('managesieve.filterunknownerror', 'error'); + break; + } + + // reload interface in case of possible error when specified script wasn't found (#1489412) + if ($script_name !== null && !empty($list) && !in_array($script_name, $list)) { + $this->rc->output->command('reload', 500); + } + + // to disable 'Add filter' button set env variable + $this->rc->output->set_env('filterconnerror', true); + $this->script = array(); + } + else { + $this->exts = $this->sieve->get_extensions(); + $this->init_script(); + $this->rc->output->set_env('currentset', $this->sieve->current); + $_SESSION['managesieve_current'] = $this->sieve->current; + } + + return $error; + } + + /** + * Connect to configured managesieve server + * + * @param string $username User login + * @param string $password User password + * + * @return int Connection status: 0 on success, >0 on failure + */ + public function connect($username, $password) + { // Get connection parameters $host = $this->rc->config->get('managesieve_host', 'localhost'); $port = $this->rc->config->get('managesieve_port'); @@ -112,8 +182,8 @@ class rcube_sieve_engine } $plugin = $this->rc->plugins->exec_hook('managesieve_connect', array( - 'user' => $_SESSION['username'], - 'password' => $this->rc->decrypt($_SESSION['password']), + 'user' => $username, + 'password' => $password, 'host' => $host, 'port' => $port, 'usetls' => $tls, @@ -122,6 +192,7 @@ class rcube_sieve_engine 'debug' => $this->rc->config->get('managesieve_debug', false), 'auth_cid' => $this->rc->config->get('managesieve_auth_cid'), 'auth_pw' => $this->rc->config->get('managesieve_auth_pw'), + 'socket_options' => $this->rc->config->get('managesieve_conn_options'), )); // try to connect to managesieve server and to fetch the script @@ -135,97 +206,65 @@ class rcube_sieve_engine $plugin['disabled'], $plugin['debug'], $plugin['auth_cid'], - $plugin['auth_pw'] + $plugin['auth_pw'], + $plugin['socket_options'] ); - if (!($error = $this->sieve->error())) { - // Get list of scripts - $list = $this->list_scripts(); + return $this->sieve->error(); + } - // reset current script when entering filters UI (#1489412) - if ($this->rc->action == 'plugin.managesieve') { - $this->rc->session->remove('managesieve_current'); - } + /** + * Load specified (or active) script + * + * @param string $script_name Optional script name + * + * @return int Connection status: 0 on success, >0 on failure + */ + public function load_script($script_name = null) + { + // Get list of scripts + $list = $this->list_scripts(); - if ($mode != 'vacation') { - if (!empty($_GET['_set']) || !empty($_POST['_set'])) { - $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true); - } - else if (!empty($_SESSION['managesieve_current'])) { - $script_name = $_SESSION['managesieve_current']; - } + if ($script_name === null || $script_name === '') { + // get (first) active script + if (!empty($this->active[0])) { + $script_name = $this->active[0]; } + else if ($list) { + $script_name = $list[0]; + } + // create a new (initial) script + else { + // if script not exists build default script contents + $script_file = $this->rc->config->get('managesieve_default'); + $script_name = $this->rc->config->get('managesieve_script_name'); - if ($script_name === null || $script_name === '') { - // get (first) active script - if (!empty($this->active[0])) { - $script_name = $this->active[0]; + if (empty($script_name)) { + $script_name = 'roundcube'; } - else if ($list) { - $script_name = $list[0]; - } - // create a new (initial) script - else { - // if script not exists build default script contents - $script_file = $this->rc->config->get('managesieve_default'); - $script_name = $this->rc->config->get('managesieve_script_name'); - if (empty($script_name)) - $script_name = 'roundcube'; - - if ($script_file && is_readable($script_file)) - $content = file_get_contents($script_file); - - // add script and set it active - if ($this->sieve->save_script($script_name, $content)) { - $this->activate_script($script_name); - $this->list[] = $script_name; - } + if ($script_file && is_readable($script_file)) { + $content = file_get_contents($script_file); } - } - if ($script_name) { - $this->sieve->load($script_name); + // add script and set it active + if ($this->sieve->save_script($script_name, $content)) { + $this->activate_script($script_name); + $this->list[] = $script_name; + } } - - $error = $this->sieve->error(); } - // finally set script objects - if ($error) { - switch ($error) { - case SIEVE_ERROR_CONNECTION: - case SIEVE_ERROR_LOGIN: - $this->rc->output->show_message('managesieve.filterconnerror', 'error'); - rcube::raise_error(array('code' => 403, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Unable to connect to managesieve on $host:$port"), true, false); - break; - - default: - $this->rc->output->show_message('managesieve.filterunknownerror', 'error'); - break; - } - - // reload interface in case of possible error when specified script wasn't found (#1489412) - if ($script_name !== null && !empty($list) && !in_array($script_name, $list)) { - $this->rc->output->command('reload', 500); - } - - // to disable 'Add filter' button set env variable - $this->rc->output->set_env('filterconnerror', true); - $this->script = array(); - } - else { - $this->exts = $this->sieve->get_extensions(); - $this->init_script(); - $this->rc->output->set_env('currentset', $this->sieve->current); - $_SESSION['managesieve_current'] = $this->sieve->current; + if ($script_name) { + $this->sieve->load($script_name); } - return $error; + return $this->sieve->error(); } + /** + * User interface actions handler + */ function actions() { $error = $this->start(); @@ -1826,17 +1865,22 @@ class rcube_sieve_engine $out .= '</div>'; // mailbox select - if ($action['type'] == 'fileinto') + if ($action['type'] == 'fileinto') { $mailbox = $this->mod_mailbox($action['target'], 'out'); - else + // make sure non-existing (or unsubscribed) mailbox is listed (#1489956) + $additional = array($mailbox); + } + else { $mailbox = ''; + } $select = $this->rc->folder_selector(array( - 'realnames' => false, - 'maxlength' => 100, - 'id' => 'action_mailbox' . $id, - 'name' => "_action_mailbox[$id]", - 'style' => 'display:'.(empty($action['type']) || $action['type'] == 'fileinto' ? 'inline' : 'none') + 'realnames' => false, + 'maxlength' => 100, + 'id' => 'action_mailbox' . $id, + 'name' => "_action_mailbox[$id]", + 'style' => 'display:'.(empty($action['type']) || $action['type'] == 'fileinto' ? 'inline' : 'none'), + 'additional' => $additional, )); $out .= $select->show($mailbox); $out .= '</td>'; diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php index 636b5fcc1..10aaea0e9 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php @@ -23,6 +23,8 @@ class rcube_sieve_vacation extends rcube_sieve_engine { + protected $error; + function actions() { $error = $this->start('vacation'); @@ -32,7 +34,6 @@ class rcube_sieve_vacation extends rcube_sieve_engine $this->vacation_rule(); $this->vacation_post(); } - $this->plugin->add_label('vacation.saving'); $this->rc->output->add_handlers(array( 'vacationform' => array($this, 'vacation_form'), @@ -55,11 +56,23 @@ class rcube_sieve_vacation extends rcube_sieve_engine // find (first) vacation rule foreach ($this->script as $idx => $rule) { if (empty($this->vacation) && !empty($rule['actions']) && $rule['actions'][0]['type'] == 'vacation') { + foreach ($rule['actions'] as $act) { + if ($act['type'] == 'discard' || $act['type'] == 'keep') { + $action = $act['type']; + } + else if ($act['type'] == 'redirect') { + $action = $act['copy'] ? 'copy' : 'redirect'; + $target = $act['target']; + } + } + $this->vacation = array_merge($rule['actions'][0], array( 'idx' => $idx, 'disabled' => $rule['disabled'], 'name' => $rule['name'], 'tests' => $rule['tests'], + 'action' => $action ?: 'keep', + 'target' => $target, )); } else { @@ -76,6 +89,17 @@ class rcube_sieve_vacation extends rcube_sieve_engine return; } + $date_extension = in_array('date', $this->exts); + $regex_extension = in_array('regex', $this->exts); + + // set user's timezone + try { + $timezone = new DateTimeZone($this->rc->config->get('timezone', 'GMT')); + } + catch (Exception $e) { + $timezone = new DateTimeZone('GMT'); + } + $status = rcube_utils::get_input_value('vacation_status', rcube_utils::INPUT_POST); $subject = rcube_utils::get_input_value('vacation_subject', rcube_utils::INPUT_POST, true); $reason = rcube_utils::get_input_value('vacation_reason', rcube_utils::INPUT_POST, true); @@ -84,7 +108,12 @@ class rcube_sieve_vacation extends rcube_sieve_engine $interval_type = rcube_utils::get_input_value('vacation_interval_type', rcube_utils::INPUT_POST); $date_from = rcube_utils::get_input_value('vacation_datefrom', rcube_utils::INPUT_POST); $date_to = rcube_utils::get_input_value('vacation_dateto', rcube_utils::INPUT_POST); + $time_from = rcube_utils::get_input_value('vacation_timefrom', rcube_utils::INPUT_POST); + $time_to = rcube_utils::get_input_value('vacation_timeto', rcube_utils::INPUT_POST); $after = rcube_utils::get_input_value('vacation_after', rcube_utils::INPUT_POST); + $action = rcube_utils::get_input_value('vacation_action', rcube_utils::INPUT_POST); + $target = rcube_utils::get_input_value('action_target', rcube_utils::INPUT_POST, true); + $target_domain = rcube_utils::get_input_value('action_domain', rcube_utils::INPUT_POST); $interval_type = $interval_type == 'seconds' ? 'seconds' : 'days'; $vacation_action['type'] = 'vacation'; @@ -107,33 +136,65 @@ class rcube_sieve_vacation extends rcube_sieve_engine } if ($vacation_action['reason'] == '') { - $error = 'managesieve.cannotbeempty'; + $error = 'managesieve.emptyvacationbody'; } + if ($vacation_action[$interval_type] && !preg_match('/^[0-9]+$/', $vacation_action[$interval_type])) { $error = 'managesieve.forbiddenchars'; } - foreach (array('date_from', 'date_to') as $var) { - $date = $$var; - - if ($date && ($dt = rcube_utils::anytodatetime($date))) { - $type = 'value-' . ($var == 'date_from' ? 'ge' : 'le'); - $test = array( - 'test' => 'currentdate', - 'part' => 'date', - 'type' => $type, - 'arg' => $dt->format('Y-m-d'), - ); + // find and remove existing date/regex/true rules + foreach ((array) $vacation_tests as $idx => $t) { + if ($t['test'] == 'currentdate' || $t['test'] == 'true' + || ($t['test'] == 'header' && $t['type'] == 'regex' && $t['arg1'] == 'received') + ) { + unset($vacation_tests[$idx]); + } + } - // find existing date rule - foreach ((array) $vacation_tests as $idx => $t) { - if ($t['test'] == 'currentdate' && $t['part'] == 'date' && $t['type'] == $type) { - $vacation_tests[$idx] = $test; - continue 2; + if ($date_extension) { + foreach (array('date_from', 'date_to') as $var) { + $time = ${str_replace('date', 'time', $var)}; + $date = trim($$var . ' ' . $time); + + if ($date && ($dt = rcube_utils::anytodatetime($date, $timezone))) { + if ($time) { + $vacation_tests[] = array( + 'test' => 'currentdate', + 'part' => 'iso8601', + 'type' => 'value-' . ($var == 'date_from' ? 'ge' : 'le'), + 'zone' => $dt->format('O'), + 'arg' => str_replace('+00:00', 'Z', strtoupper($dt->format('c'))), + ); + } + else { + $vacation_tests[] = array( + 'test' => 'currentdate', + 'part' => 'date', + 'type' => 'value-' . ($var == 'date_from' ? 'ge' : 'le'), + 'zone' => $dt->format('O'), + 'arg' => $dt->format('Y-m-d'), + ); } } + } + } + else if ($regex_extension) { + // Add date range rules if range specified + if ($date_from && $date_to) { + if ($tests = self::build_regexp_tests($date_from, $date_to, $error)) { + $vacation_tests = array_merge($vacation_tests, $tests); + } + } + } - $vacation_tests[] = $test; + if ($action == 'redirect' || $action == 'copy') { + if ($target_domain) { + $target .= '@' . $target_domain; + } + + if (empty($target) || !rcube_utils::check_email($target)) { + $error = 'noemailwarning'; } } @@ -148,9 +209,17 @@ class rcube_sieve_vacation extends rcube_sieve_engine $rule['type'] = 'if'; $rule['name'] = $rule['name'] ?: $this->plugin->gettext('vacation'); $rule['disabled'] = $status == 'off'; - $rule['actions'][0] = $vacation_action; $rule['tests'] = $vacation_tests; - $rule['join'] = count($vacation_tests) > 1; + $rule['join'] = $date_extension ? count($vacation_tests) > 1 : false; + $rule['actions'] = array($vacation_action); + + if ($action && $action != 'keep') { + $rule['actions'][] = array( + 'type' => $action == 'discard' ? 'discard' : 'redirect', + 'copy' => $action == 'copy', + 'target' => $action != 'discard' ? $target : '', + ); + } // reset original vacation rule if (isset($this->vacation['idx'])) { @@ -202,6 +271,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine { // check supported extensions $date_extension = in_array('date', $this->exts); + $regex_extension = in_array('regex', $this->exts); $seconds_extension = in_array('vacation-seconds', $this->exts); // build FORM tag @@ -216,18 +286,26 @@ class rcube_sieve_vacation extends rcube_sieve_engine ) + $attrib); // form elements - $subject = new html_inputfield(array('name' => 'vacation_subject', 'size' => 50)); - $reason = new html_textarea(array('name' => 'vacation_reason', 'cols' => 60, 'rows' => 8)); - $interval = new html_inputfield(array('name' => 'vacation_interval', 'size' => 5)); - $addresses = '<textarea name="vacation_addresses" data-type="list" data-size="30" style="display: none">' + $subject = new html_inputfield(array('name' => 'vacation_subject', 'id' => 'vacation_subject', 'size' => 50)); + $reason = new html_textarea(array('name' => 'vacation_reason', 'id' => 'vacation_reason', 'cols' => 60, 'rows' => 8)); + $interval = new html_inputfield(array('name' => 'vacation_interval', 'id' => 'vacation_interval', 'size' => 5)); + $addresses = '<textarea name="vacation_addresses" id="vacation_addresses" data-type="list" data-size="30" style="display: none">' . rcube::Q(implode("\n", (array) $this->vacation['addresses']), 'strict', false) . '</textarea>'; - $status = new html_select(array('name' => 'vacation_status')); + $status = new html_select(array('name' => 'vacation_status', 'id' => 'vacation_status')); + $action = new html_select(array('name' => 'vacation_action', 'id' => 'vacation_action', 'onchange' => 'vacation_action_select()')); $status->add($this->plugin->gettext('vacation.on'), 'on'); $status->add($this->plugin->gettext('vacation.off'), 'off'); + $action->add($this->plugin->gettext('vacation.keep'), 'keep'); + $action->add($this->plugin->gettext('vacation.discard'), 'discard'); + $action->add($this->plugin->gettext('vacation.redirect'), 'redirect'); + if (in_array('copy', $this->exts)) { + $action->add($this->plugin->gettext('vacation.copy'), 'copy'); + } + if ($this->rc->config->get('managesieve_vacation') != 2 && count($this->vacation['list'])) { - $after = new html_select(array('name' => 'vacation_after')); + $after = new html_select(array('name' => 'vacation_after', 'id' => 'vacation_after')); $after->add('', ''); foreach ($this->vacation['list'] as $idx => $rule) { @@ -246,18 +324,74 @@ class rcube_sieve_vacation extends rcube_sieve_engine $interval_txt .= ' ' . $this->plugin->gettext('days'); } - if ($date_extension) { - $date_from = new html_inputfield(array('name' => 'vacation_datefrom', 'class' => 'datepicker', 'size' => 12)); - $date_to = new html_inputfield(array('name' => 'vacation_dateto', 'class' => 'datepicker', 'size' => 12)); + if ($date_extension || $regex_extension) { + $date_from = new html_inputfield(array('name' => 'vacation_datefrom', 'id' => 'vacation_datefrom', 'class' => 'datepicker', 'size' => 12)); + $date_to = new html_inputfield(array('name' => 'vacation_dateto', 'id' => 'vacation_dateto', 'class' => 'datepicker', 'size' => 12)); $date_format = $this->rc->config->get('date_format', 'Y-m-d'); + } + + if ($date_extension) { + $time_from = new html_inputfield(array('name' => 'vacation_timefrom', 'id' => 'vacation_timefrom', 'size' => 6)); + $time_to = new html_inputfield(array('name' => 'vacation_timeto', 'id' => 'vacation_timeto', 'size' => 6)); + $time_format = $this->rc->config->get('time_format', 'H:i'); + $date_value = array(); foreach ((array) $this->vacation['tests'] as $test) { - if ($test['test'] == 'currentdate' && $test['part'] == 'date') { - $date = $this->rc->format_date($test['arg'], $date_format, false); - $date_value[$test['type'] == 'value-ge' ? 'from' : 'to'] = $date; + if ($test['test'] == 'currentdate') { + $idx = $test['type'] == 'value-ge' ? 'from' : 'to'; + + if ($test['part'] == 'date') { + $date_value[$idx]['date'] = $test['arg']; + } + else if ($test['part'] == 'iso8601') { + $date_value[$idx]['datetime'] = $test['arg']; + } + } + } + + foreach ($date_value as $idx => $value) { + $date = $value['datetime'] ?: $value['date']; + $date_value[$idx] = $this->rc->format_date($date, $date_format, false); + + if (!empty($value['datetime'])) { + $date_value['time_' . $idx] = $this->rc->format_date($date, $time_format, true); } } } + else if ($regex_extension) { + // Sieve 'date' extension not available, read start/end from RegEx based rules instead + if ($date_tests = self::parse_regexp_tests($this->vacation['tests'])) { + $date_value['from'] = $this->rc->format_date($date_tests['from'], $date_format, false); + $date_value['to'] = $this->rc->format_date($date_tests['to'], $date_format, false); + } + } + + // force domain selection in redirect email input + $domains = (array) $this->rc->config->get('managesieve_domains'); + $redirect = $this->vacation['action'] == 'redirect' || $this->vacation['action'] == 'copy'; + + if (!empty($domains)) { + sort($domains); + + $domain_select = new html_select(array('name' => 'action_domain', 'id' => 'action_domain')); + $domain_select->add(array_combine($domains, $domains)); + + if ($redirect && $this->vacation['target']) { + $parts = explode('@', $this->vacation['target']); + if (!empty($parts)) { + $this->vacation['domain'] = array_pop($parts); + $this->vacation['target'] = implode('@', $parts); + } + } + } + + // redirect target + $action_target = ' <span id="action_target_span" style="display:' . ($redirect ? 'inline' : 'none') . '">' + . '<input type="text" name="action_target" id="action_target"' + . ' value="' .($redirect ? rcube::Q($this->vacation['target'], 'strict', false) : '') . '"' + . (!empty($domains) ? ' size="20"' : ' size="35"') . '/>' + . (!empty($domains) ? ' @ ' . $domain_select->show($this->vacation['domain']) : '') + . '</span>'; // Message tab $table = new html_table(array('cols' => 2)); @@ -267,37 +401,336 @@ class rcube_sieve_vacation extends rcube_sieve_engine $table->add('title', html::label('vacation_reason', $this->plugin->gettext('vacation.body'))); $table->add(null, $reason->show($this->vacation['reason'])); - if ($date_extension) { - $table->add('title', html::label('vacation_datefrom', $this->plugin->gettext('vacation.dates'))); - $table->add(null, - $this->plugin->gettext('vacation.from'). ' ' . $date_from->show($date_value['from']) - . ' ' . $this->plugin->gettext('vacation.to'). ' ' . $date_to->show($date_value['to']) - ); + if ($date_extension || $regex_extension) { + $table->add('title', html::label('vacation_datefrom', $this->plugin->gettext('vacation.start'))); + $table->add(null, $date_from->show($date_value['from']) . ($time_from ? ' ' . $time_from->show($date_value['time_from']) : '')); + $table->add('title', html::label('vacation_dateto', $this->plugin->gettext('vacation.end'))); + $table->add(null, $date_to->show($date_value['to']) . ($time_to ? ' ' . $time_to->show($date_value['time_to']) : '')); } $table->add('title', html::label('vacation_status', $this->plugin->gettext('vacation.status'))); - $table->add(null, $status->show($this->vacation['disabled'] ? 'off' : 'on')); + $table->add(null, $status->show(!isset($this->vacation['disabled']) || $this->vacation['disabled'] ? 'off' : 'on')); $out .= html::tag('fieldset', $class, html::tag('legend', null, $this->plugin->gettext('vacation.reply')) . $table->show($attrib)); // Advanced tab $table = new html_table(array('cols' => 2)); - $table->add('title', $this->plugin->gettext('vacation.addresses')); + $table->add('title', html::label('vacation_addresses', $this->plugin->gettext('vacation.addresses'))); $table->add(null, $addresses); - $table->add('title', $this->plugin->gettext('vacation.interval')); + $table->add('title', html::label('vacation_interval', $this->plugin->gettext('vacation.interval'))); $table->add(null, $interval_txt); + if ($after) { - $table->add('title', $this->plugin->gettext('vacation.after')); + $table->add('title', html::label('vacation_after', $this->plugin->gettext('vacation.after'))); $table->add(null, $after->show($this->vacation['idx'] - 1)); } + $table->add('title', html::label('vacation_action', $this->plugin->gettext('vacation.action'))); + $table->add('vacation', $action->show($this->vacation['action']) . $action_target); + $out .= html::tag('fieldset', $class, html::tag('legend', null, $this->plugin->gettext('vacation.advanced')) . $table->show($attrib)); $out .= '</form>'; $this->rc->output->add_gui_object('sieveform', $form_id); + if ($time_format) { + $this->rc->output->set_env('time_format', $time_format); + } + return $out; } + + public static function build_regexp_tests($date_from, $date_to, &$error) + { + $tests = array(); + $dt_from = rcube_utils::anytodatetime($date_from); + $dt_to = rcube_utils::anytodatetime($date_to); + $interval = $dt_from->diff($dt_to); + + if ($interval->invert || $interval->days > 365) { + $error = 'managesieve.invaliddateformat'; + return; + } + + $dt_i = $dt_from; + $interval = new DateInterval('P1D'); + $matchexp = ''; + + while (!$dt_i->diff($dt_to)->invert) { + $days = (int) $dt_i->format('d'); + $matchexp .= $days < 10 ? "[ 0]$days" : $days; + + if ($days == $dt_i->format('t') || $dt_i->diff($dt_to)->days == 0) { + $test = array( + 'test' => 'header', + 'type' => 'regex', + 'arg1' => 'received', + 'arg2' => '('.$matchexp.') '.$dt_i->format('M Y') + ); + + $tests[] = $test; + $matchexp = ''; + } + else { + $matchexp .= '|'; + } + + $dt_i->add($interval); + } + + return $tests; + } + + public static function parse_regexp_tests($tests) + { + $rx_from = '/^\(([0-9]{2}).*\)\s([A-Za-z]+)\s([0-9]{4})/'; + $rx_to = '/^\(.*([0-9]{2})\)\s([A-Za-z]+)\s([0-9]{4})/'; + $result = array(); + + foreach ((array) $tests as $test) { + if ($test['test'] == 'header' && $test['type'] == 'regex' && $test['arg1'] == 'received') { + $textexp = preg_replace('/\[ ([^\]]*)\]/', '0', $test['arg2']); + + if (!$result['from'] && preg_match($rx_from, $textexp, $matches)) { + $result['from'] = $matches[1]." ".$matches[2]." ".$matches[3]; + } + + if (preg_match($rx_to, $textexp, $matches)) { + $result['to'] = $matches[1]." ".$matches[2]." ".$matches[3]; + } + } + } + + return $result; + } + + /** + * API: get vacation rule + * + * @return array Vacation rule information + */ + public function get_vacation() + { + $this->exts = $this->sieve->get_extensions(); + $this->init_script(); + $this->vacation_rule(); + + // check supported extensions + $date_extension = in_array('date', $this->exts); + $regex_extension = in_array('regex', $this->exts); + $seconds_extension = in_array('vacation-seconds', $this->exts); + + // set user's timezone + try { + $timezone = new DateTimeZone($this->rc->config->get('timezone', 'GMT')); + } + catch (Exception $e) { + $timezone = new DateTimeZone('GMT'); + } + + if ($date_extension) { + $date_value = array(); + foreach ((array) $this->vacation['tests'] as $test) { + if ($test['test'] == 'currentdate') { + $idx = $test['type'] == 'value-ge' ? 'start' : 'end'; + + if ($test['part'] == 'date') { + $date_value[$idx]['date'] = $test['arg']; + } + else if ($test['part'] == 'iso8601') { + $date_value[$idx]['datetime'] = $test['arg']; + } + } + } + + foreach ($date_value as $idx => $value) { + $$idx = new DateTime($value['datetime'] ?: $value['date'], $timezone); + } + } + else if ($regex_extension) { + // Sieve 'date' extension not available, read start/end from RegEx based rules instead + if ($date_tests = self::parse_regexp_tests($this->vacation['tests'])) { + $from = new DateTime($date_tests['from'] . ' ' . '00:00:00', $timezone); + $to = new DateTime($date_tests['to'] . ' ' . '23:59:59', $timezone); + } + } + + if (isset($this->vacation['seconds'])) { + $interval = $this->vacation['seconds'] . 's'; + } + else if (isset($this->vacation['days'])) { + $interval = $this->vacation['days'] . 'd'; + } + + $vacation = array( + 'supported' => $this->exts, + 'interval' => $interval, + 'start' => $start, + 'end' => $end, + 'enabled' => $this->vacation['reason'] && empty($this->vacation['disabled']), + 'message' => $this->vacation['reason'], + 'subject' => $this->vacation['subject'], + 'action' => $this->vacation['action'], + 'target' => $this->vacation['target'], + 'addresses' => $this->vacation['addresses'], + ); + + return $vacation; + } + + /** + * API: set vacation rule + * + * @param array $vacation Vacation rule information (see self::get_vacation()) + * + * @return bool True on success, False on failure + */ + public function set_vacation($data) + { + $this->exts = $this->sieve->get_extensions(); + $this->error = false; + + $this->init_script(); + $this->vacation_rule(); + + // check supported extensions + $date_extension = in_array('date', $this->exts); + $regex_extension = in_array('regex', $this->exts); + $seconds_extension = in_array('vacation-seconds', $this->exts); + + $vacation['type'] = 'vacation'; + $vacation['reason'] = $this->strip_value(str_replace("\r\n", "\n", $data['message'])); + $vacation['addresses'] = $data['addresses']; + $vacation['subject'] = $data['subject']; + $vacation_tests = (array) $this->vacation['tests']; + + foreach ((array) $vacation['addresses'] as $aidx => $address) { + $vacation['addresses'][$aidx] = $address = trim($address); + + if (empty($address)) { + unset($vacation['addresses'][$aidx]); + } + else if (!rcube_utils::check_email($address)) { + $this->error = "Invalid address in vacation addresses: $address"; + return false; + } + } + + if ($vacation['reason'] == '') { + $this->error = "No vacation message specified"; + return false; + } + + if ($data['interval']) { + if (!preg_match('/^([0-9]+)\s*([sd])$/', $data['interval'], $m)) { + $this->error = "Invalid vacation interval value: " . $data['interval']; + return false; + } + else if ($m[1]) { + $vacation[strtolower($m[2]) == 's' ? 'seconds' : 'days'] = $m[1]; + } + } + + // find and remove existing date/regex/true rules + foreach ((array) $vacation_tests as $idx => $t) { + if ($t['test'] == 'currentdate' || $t['test'] == 'true' + || ($t['test'] == 'header' && $t['type'] == 'regex' && $t['arg1'] == 'received') + ) { + unset($vacation_tests[$idx]); + } + } + + if ($date_extension) { + foreach (array('start', 'end') as $var) { + if ($dt = $data[$var]) { + $vacation_tests[] = array( + 'test' => 'currentdate', + 'part' => 'iso8601', + 'type' => 'value-' . ($var == 'start' ? 'ge' : 'le'), + 'zone' => $dt->format('O'), + 'arg' => str_replace('+00:00', 'Z', strtoupper($dt->format('c'))), + ); + } + } + } + else if ($regex_extension) { + // Add date range rules if range specified + if ($data['start'] && $data['end']) { + if ($tests = self::build_regexp_tests($data['start'], $data['end'], $error)) { + $vacation_tests = array_merge($vacation_tests, $tests); + } + + if ($error) { + $this->error = "Invalid dates specified or unsupported period length"; + return false; + } + } + } + + if ($data['action'] == 'redirect' || $data['action'] == 'copy') { + if (empty($data['target']) || !rcube_utils::check_email($data['target'])) { + $this->error = "Invalid address in action taget: " . $data['target']; + return false; + } + } + else if ($data['action'] && $data['action'] != 'keep' && $data['action'] != 'discard') { + $this->error = "Unsupported vacation action: " . $data['action']; + return false; + } + + if (empty($vacation_tests)) { + $vacation_tests = $this->rc->config->get('managesieve_vacation_test', array(array('test' => 'true'))); + } + + // @TODO: handle situation when there's no active script + + $rule = $this->vacation; + $rule['type'] = 'if'; + $rule['name'] = $rule['name'] ?: 'Out-of-Office'; + $rule['disabled'] = isset($data['enabled']) && !$data['enabled']; + $rule['tests'] = $vacation_tests; + $rule['join'] = $date_extension ? count($vacation_tests) > 1 : false; + $rule['actions'] = array($vacation); + + if ($data['action'] && $data['action'] != 'keep') { + $rule['actions'][] = array( + 'type' => $data['action'] == 'discard' ? 'discard' : 'redirect', + 'copy' => $data['action'] == 'copy', + 'target' => $data['action'] != 'discard' ? $data['target'] : '', + ); + } + + // reset original vacation rule + if (isset($this->vacation['idx'])) { + $this->script[$this->vacation['idx']] = null; + } + + array_unshift($this->script, $rule); + + $this->sieve->script->content = array_values(array_filter($this->script)); + + return $this->save_script(); + } + + /** + * API: connect to managesieve server + */ + public function connect($username, $password) + { + if (!parent::connect($username, $password)) { + return $this->load_script(); + } + } + + /** + * API: Returns last error + * + * @return string Error message + */ + public function get_error() + { + return $this->error; + } } diff --git a/plugins/managesieve/localization/ast.inc b/plugins/managesieve/localization/ast.inc new file mode 100644 index 000000000..e1c469b80 --- /dev/null +++ b/plugins/managesieve/localization/ast.inc @@ -0,0 +1,50 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/managesieve/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Managesieve plugin | + | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ +*/ +$labels['filters'] = 'Filtros'; +$labels['managefilters'] = 'Alministrar filtros de corréu entrante'; +$labels['filtername'] = 'Nome del filtru'; +$labels['newfilter'] = 'Filtru nuevu'; +$labels['filteradd'] = 'Amestar filtru'; +$labels['filterdel'] = 'Desaniciar filtru'; +$labels['moveup'] = 'Mover arriba'; +$labels['movedown'] = 'Mover abaxo'; +$labels['filterany'] = 'tolos mensaxes'; +$labels['filtercontains'] = 'contien'; +$labels['filternotcontains'] = 'nun contien'; +$labels['filteris'] = 'ye igual a'; +$labels['filterisnot'] = 'nun ye igual a'; +$labels['filterexists'] = 'esiste'; +$labels['filternotexists'] = 'nun esiste'; +$labels['filtermatches'] = 'espresiones que concasen'; +$labels['filternotmatches'] = 'espresiones que nun concasen'; +$labels['addrule'] = 'Amestar regla'; +$labels['delrule'] = 'Desaniciar regla'; +$labels['messagemoveto'] = 'Mover mensaxe a'; +$labels['messageredirect'] = 'Redireicionar mensaxe a'; +$labels['messagecopyto'] = 'Copiar mensaxe a'; +$labels['messagedelete'] = 'Desaniciar mensaxe'; +$labels['messagesrules'] = 'Pa corréu entrante:'; +$labels['messagesactions'] = '...executar les aiciones siguientes:'; +$labels['add'] = 'Amestar'; +$labels['del'] = 'Desaniciar'; +$labels['sender'] = 'Remitente'; +$labels['enable'] = 'Habilitar/Deshabilitar'; +$labels['flagread'] = 'Lleer'; +$labels['flagdeleted'] = 'Desaniciáu'; +$labels['flaganswered'] = 'Respondíu'; +?> diff --git a/plugins/managesieve/localization/br.inc b/plugins/managesieve/localization/br.inc new file mode 100644 index 000000000..c7d89f575 --- /dev/null +++ b/plugins/managesieve/localization/br.inc @@ -0,0 +1,30 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/managesieve/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Managesieve plugin | + | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ +*/ +$labels['filters'] = 'sil'; +$labels['newfilter'] = 'Sil nevez'; +$labels['filteradd'] = 'Ouzhpenan ur sil'; +$labels['filterdel'] = 'Dilemel ar sil'; +$labels['filterany'] = 'An holl postel'; +$labels['messagecopyto'] = 'eilan ar postel e'; +$labels['messagedelete'] = 'Dilemel ar postel'; +$labels['add'] = 'Ouzhpenan'; +$labels['del'] = 'Dilemel'; +$labels['sender'] = 'Kaser'; +$labels['recipient'] = 'Resever'; +$labels['vacationsubject'] = 'Sujed'; +?> diff --git a/plugins/managesieve/localization/bs_BA.inc b/plugins/managesieve/localization/bs_BA.inc index 0667db33c..bee1aba3c 100644 --- a/plugins/managesieve/localization/bs_BA.inc +++ b/plugins/managesieve/localization/bs_BA.inc @@ -57,10 +57,10 @@ $labels['recipient'] = 'Primaoc'; $labels['vacationaddr'] = 'Moje dodatne email adrese:'; $labels['vacationdays'] = 'Frekvencija slanja poruka (u danima):'; $labels['vacationinterval'] = 'Frekvencija slanja poruka:'; -$labels['days'] = 'dana'; -$labels['seconds'] = 'sekundi'; $labels['vacationreason'] = 'Tijelo poruke (razlog za odmor):'; $labels['vacationsubject'] = 'Naslov poruke:'; +$labels['days'] = 'dana'; +$labels['seconds'] = 'sekundi'; $labels['rulestop'] = 'Prestani procjenjivati pravila'; $labels['enable'] = 'Omogući/Onemogući'; $labels['filterset'] = 'Set filtera'; @@ -108,14 +108,17 @@ $labels['varupperfirst'] = 'prvi znak velikim slovom'; $labels['varquotewildcard'] = 'citiraj specijalne znakove'; $labels['varlength'] = 'dužina'; $labels['notify'] = 'Pošalji napomenu'; -$labels['notifyaddress'] = 'Na email adresu:'; -$labels['notifybody'] = 'Sadržaj napomene:'; -$labels['notifysubject'] = 'Naslov napomene:'; -$labels['notifyfrom'] = 'Pošiljalac napomene:'; +$labels['notifytarget'] = 'Odredište napomene:'; +$labels['notifymessage'] = 'Poruka napomene (neobavezno):'; +$labels['notifyoptions'] = 'Opcije napomene (neobavezno):'; +$labels['notifyfrom'] = 'Pošiljalac napomene (neobavezno):'; $labels['notifyimportance'] = 'Prioritet:'; $labels['notifyimportancelow'] = 'mali'; $labels['notifyimportancenormal'] = 'obični'; $labels['notifyimportancehigh'] = 'veliki'; +$labels['notifymethodmailto'] = 'Email'; +$labels['notifymethodtel'] = 'Telefon'; +$labels['notifymethodsms'] = 'SMS'; $labels['filtercreate'] = 'Kreiraj filter'; $labels['usedata'] = 'Koristite sljedeće podatke u filteru:'; $labels['nextstep'] = 'Sljedeći korak'; @@ -157,6 +160,33 @@ $labels['asciicasemap'] = 'osjetljivo na velika/mala slova (ascii-casemap)'; $labels['asciinumeric'] = 'numerički (ascii-numeric)'; $labels['index'] = 'indeks:'; $labels['indexlast'] = 'unazad'; +$labels['vacation'] = 'Odmor'; +$labels['vacation.reply'] = 'Poruka sa odgovorom'; +$labels['vacation.advanced'] = 'Napredmen postavke'; +$labels['vacation.subject'] = 'Naslov'; +$labels['vacation.body'] = 'Tijelo'; +$labels['vacation.dates'] = 'Vrijeme odmora'; +$labels['vacation.from'] = 'Od:'; +$labels['vacation.to'] = 'Do:'; +$labels['vacation.status'] = 'Status'; +$labels['vacation.on'] = 'Uključeno'; +$labels['vacation.off'] = 'Isključeno'; +$labels['vacation.addresses'] = 'Moje dodatne adrese'; +$labels['vacation.interval'] = 'Interval odgovora'; +$labels['vacation.after'] = 'Pravilo za odmor stavi nakon'; +$labels['vacation.saving'] = 'Snimam podatke...'; +$labels['vacation.action'] = 'Akcija za dolazne poruke'; +$labels['vacation.keep'] = 'Zadrži'; +$labels['vacation.discard'] = 'Odbaci'; +$labels['vacation.redirect'] = 'Preusmeri ka'; +$labels['vacation.copy'] = 'Pošalji kopiju na'; +$labels['arialabelfiltersetactions'] = 'Akcije za filterske setove'; +$labels['arialabelfilteractions'] = 'Filterske akcije'; +$labels['arialabelfilterform'] = 'Svojstva filtera'; +$labels['ariasummaryfilterslist'] = 'Lista filtera'; +$labels['ariasummaryfiltersetslist'] = 'Lista filterskih setova'; +$labels['filterstitle'] = 'Uredi filtere za dolazni email'; +$labels['vacationtitle'] = 'Uredi pravila kada nisam na poslu'; $messages['filterunknownerror'] = 'Nepoznata serverska greška.'; $messages['filterconnerror'] = 'Nije se moguće povezati na server.'; $messages['filterdeleteerror'] = 'Nije moguće obrisati filter. Desila se serverska greška.'; @@ -189,4 +219,7 @@ $messages['namereserved'] = 'Ime je rezervisano.'; $messages['setexist'] = 'Set već postoji.'; $messages['nodata'] = 'Morate označiti barem jednu poziciju!'; $messages['invaliddateformat'] = 'Netačan datum ili dio formata datuma'; +$messages['saveerror'] = 'Nije moguće snimiti podatke. Desila se serverska greška.'; +$messages['vacationsaved'] = 'Podaci o odmoru su uspješno snimljeni.'; +$messages['emptyvacationbody'] = 'Tijelo poruke za odmor je neophodno!'; ?> diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc index 1ea7d969e..f455d55f6 100644 --- a/plugins/managesieve/localization/en_US.inc +++ b/plugins/managesieve/localization/en_US.inc @@ -167,9 +167,8 @@ $labels['vacation.reply'] = 'Reply message'; $labels['vacation.advanced'] = 'Advanced settings'; $labels['vacation.subject'] = 'Subject'; $labels['vacation.body'] = 'Body'; -$labels['vacation.dates'] = 'Vacation time'; -$labels['vacation.from'] = 'From:'; -$labels['vacation.to'] = 'To:'; +$labels['vacation.start'] = 'Vacation start'; +$labels['vacation.end'] = 'Vacation end'; $labels['vacation.status'] = 'Status'; $labels['vacation.on'] = 'On'; $labels['vacation.off'] = 'Off'; @@ -177,6 +176,18 @@ $labels['vacation.addresses'] = 'My additional addresses'; $labels['vacation.interval'] = 'Reply interval'; $labels['vacation.after'] = 'Put vacation rule after'; $labels['vacation.saving'] = 'Saving data...'; +$labels['vacation.action'] = 'Incoming message action'; +$labels['vacation.keep'] = 'Keep'; +$labels['vacation.discard'] = 'Discard'; +$labels['vacation.redirect'] = 'Redirect to'; +$labels['vacation.copy'] = 'Send copy to'; +$labels['arialabelfiltersetactions'] = 'Filter set actions'; +$labels['arialabelfilteractions'] = 'Filter actions'; +$labels['arialabelfilterform'] = 'Filter properties'; +$labels['ariasummaryfilterslist'] = 'List of filters'; +$labels['ariasummaryfiltersetslist'] = 'List of filter sets'; +$labels['filterstitle'] = 'Edit incoming mail filters'; +$labels['vacationtitle'] = 'Edit out-of-office rule'; $messages = array(); $messages['filterunknownerror'] = 'Unknown server error.'; @@ -213,5 +224,6 @@ $messages['nodata'] = 'At least one position must be selected!'; $messages['invaliddateformat'] = 'Invalid date or date part format'; $messages['saveerror'] = 'Unable to save data. Server error occurred.'; $messages['vacationsaved'] = 'Vacation data saved successfully.'; +$messages['emptyvacationbody'] = 'Body of vacation message is required!'; ?> diff --git a/plugins/managesieve/localization/es_419.inc b/plugins/managesieve/localization/es_419.inc index f459bdb67..45b5dfb2e 100644 --- a/plugins/managesieve/localization/es_419.inc +++ b/plugins/managesieve/localization/es_419.inc @@ -54,17 +54,27 @@ $labels['add'] = 'Agregar'; $labels['del'] = 'Eliminar'; $labels['sender'] = 'Remitente'; $labels['recipient'] = 'Destinatario'; -$labels['vacationdays'] = '¿Cada cuánto enviar mensajes (en días)?'; -$labels['vacationinterval'] = '¿Con que frecuencia enviar mensajes?'; +$labels['vacationaddr'] = 'Mis direccion(es) adiconal(es):'; +$labels['vacationdays'] = 'Cuan a menudo enviar mensajes (en días):'; +$labels['vacationinterval'] = '¿Con qué frecuencia enviar mensajes?:'; +$labels['vacationreason'] = 'Cuerpo del mensaje (motivo de las vacaciones):'; +$labels['vacationsubject'] = 'Asunto del mensaje:'; $labels['days'] = 'días'; $labels['seconds'] = 'segundos'; -$labels['vacationreason'] = 'Cuerpo del mensaje (motivo de las vacaciones):'; -$labels['vacationsubject'] = 'Título del mensaje:'; $labels['rulestop'] = 'Detener la evaluación de reglas'; $labels['enable'] = 'Habilitar/Deshabilitar'; +$labels['filterset'] = 'Set de filtros'; +$labels['filtersets'] = 'Filtro acciona'; +$labels['filtersetadd'] = 'Agregar set de filtros'; +$labels['filtersetdel'] = 'Eliminar set de filtros actual'; +$labels['filtersetact'] = 'Activar set de filtros actual'; +$labels['filtersetdeact'] = 'Desactivar set de filtros actual'; $labels['filterdef'] = 'Definición del filtro'; +$labels['filtersetname'] = 'Nombre del set de filtros'; +$labels['newfilterset'] = 'Nuevo set de filtros'; $labels['active'] = 'activo'; $labels['none'] = 'ninguno'; +$labels['fromset'] = 'desde set'; $labels['fromfile'] = 'desde archivo'; $labels['filterdisabled'] = 'filtro deshabilitado'; $labels['countisgreaterthan'] = 'la cuenta es mayor a'; @@ -72,15 +82,22 @@ $labels['countisgreaterthanequal'] = 'la cuenta es mayor o igual a '; $labels['countislessthan'] = 'la cuenta es menor que'; $labels['countislessthanequal'] = 'la cuenta es menor o igual que'; $labels['countequals'] = 'la cuenta es igual a '; +$labels['countnotequals'] = 'la cuenta no es menor a'; $labels['valueisgreaterthan'] = 'el valor es mayor que'; $labels['valueisgreaterthanequal'] = 'el balor es mayor o igual que '; $labels['valueislessthan'] = 'el valor es menor que '; $labels['valueislessthanequal'] = 'el valor es menor o igual que '; $labels['valueequals'] = 'el valor es igual a '; +$labels['valuenotequals'] = 'el valor no es igual a'; +$labels['setflags'] = 'Colocar etiquetas al mensaje'; +$labels['addflags'] = 'Agrega etiquetas al mensaje'; +$labels['removeflags'] = 'Eliminar etiquetas al mensaje'; $labels['flagread'] = 'Leido'; $labels['flagdeleted'] = 'Eliminado'; $labels['flaganswered'] = 'Respondido'; +$labels['flagflagged'] = 'Etiquetado'; $labels['flagdraft'] = 'Borrador'; +$labels['setvariable'] = 'Establecer variable'; $labels['setvarname'] = 'Nombre de la variable:'; $labels['setvarvalue'] = 'Valor de la variable:'; $labels['setvarmodifiers'] = 'Modificadores:'; @@ -91,30 +108,36 @@ $labels['varupperfirst'] = 'primer carácter en mayúscula'; $labels['varquotewildcard'] = 'citar carácteres especiales'; $labels['varlength'] = 'largo'; $labels['notify'] = 'Enviar notificación'; -$labels['notifyaddress'] = 'A la direccion de correo:'; -$labels['notifybody'] = 'Cuerpo de la notificación:'; -$labels['notifysubject'] = 'Tema de la notificación:'; -$labels['notifyfrom'] = 'Remitente de la notificación: '; -$labels['notifyimportance'] = 'Importantcia:'; +$labels['notifytarget'] = 'Destinatario de la notificación:'; +$labels['notifymessage'] = 'Mensaje de notificación (opcional):'; +$labels['notifyoptions'] = 'Opciones de notificación (opcional):'; +$labels['notifyfrom'] = 'Remitente de la notificación (opcional):'; +$labels['notifyimportance'] = 'Importancia:'; $labels['notifyimportancelow'] = 'baja'; $labels['notifyimportancenormal'] = 'normal'; $labels['notifyimportancehigh'] = 'alta'; +$labels['notifymethodmailto'] = 'Correo electrónico'; +$labels['notifymethodtel'] = 'Teléfono'; +$labels['notifymethodsms'] = 'Mensaje de texto'; $labels['filtercreate'] = 'Crear filtro'; $labels['usedata'] = 'Usar los datos siguientes en el filtro:'; $labels['nextstep'] = 'Paso siguiente'; $labels['...'] = '...'; $labels['currdate'] = 'Fecha actual'; $labels['datetest'] = 'Fecha'; -$labels['year'] = 'Año'; +$labels['dateheader'] = 'encabezado:'; +$labels['year'] = 'año'; $labels['month'] = 'mes'; $labels['day'] = 'día'; $labels['date'] = 'fecha(aaaa-mm-dd)'; +$labels['julian'] = 'fecha (julian)'; $labels['hour'] = 'hora'; $labels['minute'] = 'minuto'; $labels['second'] = 'segundo'; $labels['time'] = 'hora (hh:mm:ss)'; $labels['iso8601'] = 'fecha (ISO8601)'; $labels['std11'] = 'fecha (RFC2822)'; +$labels['zone'] = 'zona horaria'; $labels['weekday'] = 'día de la semana (0-6)'; $labels['advancedopts'] = 'Opciones avanzadas'; $labels['body'] = 'Cuerpo'; @@ -132,22 +155,71 @@ $labels['user'] = 'usuario'; $labels['detail'] = 'detalle'; $labels['comparator'] = 'comparador:'; $labels['default'] = 'predeterminado'; -$labels['octet'] = 'estricto'; -$labels['asciinumeric'] = 'numérico (ascii-numeric)'; -$messages['filterunknownerror'] = 'Error del servidor desconocido.'; -$messages['filterconnerror'] = 'Incapaz de conectarse al servidor.'; +$labels['octet'] = 'estricto (octeto)'; +$labels['asciicasemap'] = 'no sensible a mayúsculas y minúsculas (mapero-ascii)'; +$labels['asciinumeric'] = 'numérico (ascii-numérico)'; +$labels['index'] = 'índice:'; +$labels['indexlast'] = 'hacia atrás'; +$labels['vacation'] = 'Vacaciones'; +$labels['vacation.reply'] = 'Responder mensaje'; +$labels['vacation.advanced'] = 'Opciones avanzadas'; +$labels['vacation.subject'] = 'Asunto'; +$labels['vacation.body'] = 'Cuerpo'; +$labels['vacation.dates'] = 'Horario de vacaciones'; +$labels['vacation.from'] = 'De:'; +$labels['vacation.to'] = 'Para:'; +$labels['vacation.status'] = 'Estado'; +$labels['vacation.on'] = 'Encendido'; +$labels['vacation.off'] = 'Apagado'; +$labels['vacation.addresses'] = 'Mis direcciones adicionales'; +$labels['vacation.interval'] = 'Intervalo de respuesta'; +$labels['vacation.after'] = 'Colocar regla de vacaciones luego'; +$labels['vacation.saving'] = 'Guardando información...'; +$labels['vacation.action'] = 'Acción para mensaje entrante'; +$labels['vacation.keep'] = 'Mantener'; +$labels['vacation.discard'] = 'Descartar'; +$labels['vacation.redirect'] = 'Redireccionar a'; +$labels['vacation.copy'] = 'Enviar una copia a'; +$labels['arialabelfiltersetactions'] = 'Acciones del set de filtros'; +$labels['arialabelfilteractions'] = 'Acciones de filtros'; +$labels['arialabelfilterform'] = 'Propiedades de filtros'; +$labels['ariasummaryfilterslist'] = 'Lista de filtros'; +$labels['ariasummaryfiltersetslist'] = 'Lista de set de filtros'; +$labels['filterstitle'] = 'Administrar filtros de correos entrantes'; +$labels['vacationtitle'] = 'Editar regla de fuera de oficina'; +$messages['filterunknownerror'] = 'Error de servidor desconocido.'; +$messages['filterconnerror'] = 'No se puede conectar al servidor.'; +$messages['filterdeleteerror'] = 'No se puede eliminar el filtro. Ocurrió un error de servidor.'; $messages['filterdeleted'] = 'Filtro eliminado exitosamente.'; $messages['filtersaved'] = 'Filtro guardado exitosamente.'; +$messages['filtersaveerror'] = 'No es posible guardar el filtro. Ha ocurrido un error de servidor.'; $messages['filterdeleteconfirm'] = '¿Estás seguro que quieres eliminar el filtro seleccionado?'; $messages['ruledeleteconfirm'] = '¿Estás seguro que quieres eliminar la regla seleccionada?'; $messages['actiondeleteconfirm'] = '¿Estás seguro que queires eliminar la acción seleccionada?'; $messages['forbiddenchars'] = 'Carácteres ilegales en el campo.'; $messages['cannotbeempty'] = 'El campo no puede estar vacio.'; $messages['ruleexist'] = 'Ya existe un filtro con el nombre especificado.'; +$messages['setactivateerror'] = 'No es posible activar el set de filtros seleccionado. Ha ocurrido un error de servidor.'; +$messages['setdeactivateerror'] = 'No es posible desactivar el set de filtros selecciona. Ha ocurrido un error de servidor.'; +$messages['setdeleteerror'] = 'No es posible eliminar el set de filtros seleccionado. Ha ocurrido un error de servidor.'; +$messages['setactivated'] = 'Set de filtros activado exitosamente.'; +$messages['setdeactivated'] = 'Set de filtros desactivado exitosamente.'; +$messages['setdeleted'] = 'Set de filtroseliminado exitosamente.'; +$messages['setdeleteconfirm'] = '¿Estas seguro que deseas eliminar el set de filtros seleccionado?'; +$messages['setcreateerror'] = 'No es posible crear el set de filtros. Ha ocurrido un error de servidor.'; +$messages['setcreated'] = 'Set de filtros creado exitosamente.'; +$messages['activateerror'] = 'No es posible habilitar los filtros seleccionados. Ha ocurrido un error de servidor.'; +$messages['deactivateerror'] = 'No es posible deshabilitar los filtros seleccionados. Ha ocurrido un error de servidor.'; $messages['deactivated'] = 'Filtro(s) deshabilitado(s) exitosamente.'; $messages['activated'] = 'Filtro(s) habilitado(s) exitosamente.'; $messages['moved'] = 'Filtro movido exitosamente.'; +$messages['moveerror'] = 'No es posible mover los filtros seleccionados. Ha ocurrido un error de servidor.'; $messages['nametoolong'] = 'Nombre demasiado largo.'; $messages['namereserved'] = 'Nombre reservado.'; +$messages['setexist'] = 'Set ya existe.'; $messages['nodata'] = 'Debes seleccionar al menos una posición.'; +$messages['invaliddateformat'] = 'Fecha o parte del formato no válido'; +$messages['saveerror'] = 'No es posible guardar la información. Ha ocurrido un error de servidor.'; +$messages['vacationsaved'] = 'Información de vacaciones guardada exitosamente.'; +$messages['emptyvacationbody'] = 'Cuerpo del mensaje de vacaciones es requerido!'; ?> diff --git a/plugins/managesieve/localization/es_AR.inc b/plugins/managesieve/localization/es_AR.inc index 7707a2b57..6b3749da6 100644 --- a/plugins/managesieve/localization/es_AR.inc +++ b/plugins/managesieve/localization/es_AR.inc @@ -32,6 +32,10 @@ $labels['filteris'] = 'es igual a'; $labels['filterisnot'] = 'no es igual a'; $labels['filterexists'] = 'existe'; $labels['filternotexists'] = 'no existe'; +$labels['filtermatches'] = 'coincide con la expresión'; +$labels['filternotmatches'] = 'no coindice con la expresión'; +$labels['filterregex'] = 'coincide con la expresión regular'; +$labels['filternotregex'] = 'no coincide con la expresión regular'; $labels['filterunder'] = 'bajo'; $labels['filterover'] = 'sobre'; $labels['addrule'] = 'Agregar regla'; @@ -43,16 +47,24 @@ $labels['messagesendcopy'] = 'Enviar copia del mensaje a'; $labels['messagereply'] = 'Responder con un mensaje'; $labels['messagedelete'] = 'Eliminar mensaje'; $labels['messagediscard'] = 'Descartar con un mensaje'; +$labels['messagekeep'] = 'Mantener mensajes en bandeja de entrada'; $labels['messagesrules'] = 'Para el correo entrante:'; $labels['messagesactions'] = '... ejecutar las siguientes acciones:'; $labels['add'] = 'Agregar'; $labels['del'] = 'Eliminar'; $labels['sender'] = 'Remitente'; $labels['recipient'] = 'Destinatario'; +$labels['vacationaddr'] = 'Mi(s) direccion(es) de e-mail adicional(es):'; $labels['vacationdays'] = 'Cada cuanto enviar mensajes (en días):'; +$labels['vacationinterval'] = 'Enviar mensajes cada:'; $labels['vacationreason'] = 'Cuerpo del mensaje (razón de vacaciones):'; +$labels['vacationsubject'] = 'Asunto del mensaje:'; +$labels['days'] = 'dias'; +$labels['seconds'] = 'segundos'; $labels['rulestop'] = 'Parar de evaluar reglas'; +$labels['enable'] = 'Habilitar/Deshabilitar'; $labels['filterset'] = 'Conjunto de filtros'; +$labels['filtersets'] = 'Filtro activa'; $labels['filtersetadd'] = 'Agregar conjunto de filtros'; $labels['filtersetdel'] = 'Eliminar conjunto de filtros'; $labels['filtersetact'] = 'Activar conjunto de filtros'; @@ -65,19 +77,149 @@ $labels['none'] = 'none'; $labels['fromset'] = 'desde conjunto'; $labels['fromfile'] = 'desde archivo'; $labels['filterdisabled'] = 'Filtro deshabilitado'; +$labels['countisgreaterthan'] = 'la cuenta es mayor a'; +$labels['countisgreaterthanequal'] = 'la cuenta es mayor o igual a'; +$labels['countislessthan'] = 'la cuenta es menor a'; +$labels['countislessthanequal'] = 'la cuenta es menor o igual a'; +$labels['countequals'] = 'la cuenta es igual a'; +$labels['countnotequals'] = 'la cuenta no es igual a'; +$labels['valueisgreaterthan'] = 'el valor es mayor a'; +$labels['valueisgreaterthanequal'] = 'el valor es mayor o igual a'; +$labels['valueislessthan'] = 'el valor es menor a'; +$labels['valueislessthanequal'] = 'el valor es menor o igual a'; +$labels['valueequals'] = 'el valor es igual a'; +$labels['valuenotequals'] = 'el valor no es igual a'; +$labels['setflags'] = 'Configurar marcas del mensaje'; +$labels['addflags'] = 'Agregar marcas al mensaje'; +$labels['removeflags'] = 'Eliminar marcas del mensaje'; +$labels['flagread'] = 'Leer'; +$labels['flagdeleted'] = 'Eliminado'; +$labels['flaganswered'] = 'Respondido'; +$labels['flagflagged'] = 'Marcado'; +$labels['flagdraft'] = 'Borrador'; +$labels['setvariable'] = 'Setear variable'; +$labels['setvarname'] = 'Nombre de variable:'; +$labels['setvarvalue'] = 'Valor de variable:'; +$labels['setvarmodifiers'] = 'Modificadores:'; +$labels['varlower'] = 'minúscula'; +$labels['varupper'] = 'mayúscula'; +$labels['varlowerfirst'] = 'primer caracter en minúscula'; +$labels['varupperfirst'] = 'primer caracter en mayúscula'; +$labels['varquotewildcard'] = 'citar caracteres especiales'; +$labels['varlength'] = 'longitud'; +$labels['notify'] = 'Enviar notificación'; +$labels['notifytarget'] = 'Objetivo de la notificación:'; +$labels['notifymessage'] = 'Mensaje de notificación (opcional):'; +$labels['notifyoptions'] = 'Opciones de notificación (opcional):'; +$labels['notifyfrom'] = 'Remitente de la notificación (opcional):'; +$labels['notifyimportance'] = 'Importancia:'; +$labels['notifyimportancelow'] = 'baja'; +$labels['notifyimportancenormal'] = 'normal'; +$labels['notifyimportancehigh'] = 'alta'; +$labels['notifymethodmailto'] = 'Email'; +$labels['notifymethodtel'] = 'Teléfono'; +$labels['notifymethodsms'] = 'SMS'; +$labels['filtercreate'] = 'Crear filtro'; +$labels['usedata'] = 'Usar la siguiente información en el filtro:'; +$labels['nextstep'] = 'Siguiente paso'; +$labels['...'] = '...'; +$labels['currdate'] = 'Fecha actual'; +$labels['datetest'] = 'Fecha'; +$labels['dateheader'] = 'encabezado:'; +$labels['year'] = 'año'; +$labels['month'] = 'mes'; +$labels['day'] = 'dia'; +$labels['date'] = 'fecha (yyyy-mm-dd)'; +$labels['julian'] = 'fecha (juliano)'; +$labels['hour'] = 'hora'; +$labels['minute'] = 'minuto'; +$labels['second'] = 'segundo'; +$labels['time'] = 'hora (hh:mm:ss)'; +$labels['iso8601'] = 'fecha (ISO8601)'; +$labels['std11'] = 'fecha (RFC2822)'; +$labels['zone'] = 'zona horaria'; +$labels['weekday'] = 'día de la semana (0-6)'; +$labels['advancedopts'] = 'Opciones avanzadas'; +$labels['body'] = 'Cuerpo'; +$labels['address'] = 'dirección'; +$labels['envelope'] = 'envoltura'; +$labels['modifier'] = 'modificador:'; +$labels['text'] = 'texto'; +$labels['undecoded'] = 'sin decodificar (crudo)'; +$labels['contenttype'] = 'tipo de contenido'; +$labels['modtype'] = 'tipo:'; +$labels['allparts'] = 'todo'; +$labels['domain'] = 'dominio'; +$labels['localpart'] = 'parte local'; +$labels['user'] = 'usuario'; +$labels['detail'] = 'detalle'; +$labels['comparator'] = 'comparador:'; +$labels['default'] = 'por defecto'; +$labels['octet'] = 'estricto (octeto)'; +$labels['asciicasemap'] = 'no sensible a minúsculas o mayúsculas (ascii-casemap)'; +$labels['asciinumeric'] = 'numérico (ascii-numeric)'; +$labels['index'] = 'índice:'; +$labels['indexlast'] = 'hacia atrás'; +$labels['vacation'] = 'Vacaciones'; +$labels['vacation.reply'] = 'Responder mensaje'; +$labels['vacation.advanced'] = 'Opciones avanzdas'; +$labels['vacation.subject'] = 'Asunto'; +$labels['vacation.body'] = 'Cuerpo'; +$labels['vacation.dates'] = 'Período de vacaciones'; +$labels['vacation.from'] = 'De:'; +$labels['vacation.to'] = 'Para:'; +$labels['vacation.status'] = 'Estado'; +$labels['vacation.on'] = 'On'; +$labels['vacation.off'] = 'Off'; +$labels['vacation.addresses'] = 'Mis direcciones adicionales'; +$labels['vacation.interval'] = 'Intervalo de respuesta'; +$labels['vacation.after'] = 'Colocar luego regla de vacaciones '; +$labels['vacation.saving'] = 'Guardando información...'; +$labels['vacation.action'] = 'Acción para mensaje entrante'; +$labels['vacation.keep'] = 'Mantener'; +$labels['vacation.discard'] = 'Descartar'; +$labels['vacation.redirect'] = 'Reenviar a'; +$labels['vacation.copy'] = 'Enviar copia a'; +$labels['arialabelfiltersetactions'] = 'Acciones de conjunto de filtros'; +$labels['arialabelfilteractions'] = 'Filtrar acciones'; +$labels['arialabelfilterform'] = 'Filtrar propiedades'; +$labels['ariasummaryfilterslist'] = 'Listado de filtros'; +$labels['ariasummaryfiltersetslist'] = 'Listado de conjunto de filtros'; +$labels['filterstitle'] = 'Editar filtros para mensajes entrantes'; +$labels['vacationtitle'] = 'Editar reglas "fuera de la oficina"'; $messages['filterunknownerror'] = 'Error desconocido de servidor'; $messages['filterconnerror'] = 'Imposible conectar con el servidor managesieve'; +$messages['filterdeleteerror'] = 'Imposible borrar filtro. Ha ocurrido un error en el servidor'; $messages['filterdeleted'] = 'Filtro borrado satisfactoriamente'; $messages['filtersaved'] = 'Filtro guardado satisfactoriamente'; +$messages['filtersaveerror'] = 'Imposible guardar ell filtro. Ha ocurrido un error en el servidor'; $messages['filterdeleteconfirm'] = '¿Realmente desea borrar el filtro seleccionado?'; $messages['ruledeleteconfirm'] = '¿Está seguro de que desea borrar la regla seleccionada?'; $messages['actiondeleteconfirm'] = '¿Está seguro de que desea borrar la acción seleccionada?'; $messages['forbiddenchars'] = 'Caracteres prohibidos en el campo'; $messages['cannotbeempty'] = 'El campo no puede estar vacío'; +$messages['ruleexist'] = 'El filtro con el nombre especificado ya existe.'; +$messages['setactivateerror'] = 'Imposible activar el conjunto de filtros. Error en el servidor.'; +$messages['setdeactivateerror'] = 'Imposible desactivar el conjunto de filtros. Error en el servidor.'; +$messages['setdeleteerror'] = 'Imposible eliminar el conjunto de filtros. Error en el servidor.'; $messages['setactivated'] = 'Conjunto de filtros activados correctamente'; $messages['setdeactivated'] = 'Conjunto de filtros desactivados correctamente'; $messages['setdeleted'] = 'Conjunto de filtros eliminados correctamente'; $messages['setdeleteconfirm'] = '¿Esta seguro, que quiere eliminar el conjunto de filtros seleccionado?'; +$messages['setcreateerror'] = 'Imposible crear el conjunto de filtros. Error en el servidor.'; $messages['setcreated'] = 'Conjunto de filtros creados correctamente'; -$messages['nametoolong'] = 'Imposible crear el conjunto de filtros. Nombre del conjunto de filtros muy largo'; +$messages['activateerror'] = 'Imposible activar el conjunto de filtros. Error en el servidor.'; +$messages['deactivateerror'] = 'Imposible desactivar el conjunto de filtros. Error en el servidor.'; +$messages['deactivated'] = 'Filtro deshabilitado satisfactoriamente'; +$messages['activated'] = 'Filtro habilitado satisfactoriamente'; +$messages['moved'] = 'Filtro movido satisfactoriamente'; +$messages['moveerror'] = 'Imposible mover el filtro seleccionado. Ha ocurrido un error en el servidor.'; +$messages['nametoolong'] = 'El nombre es demasiado largo.'; +$messages['namereserved'] = 'Nombre reservado.'; +$messages['setexist'] = 'Conjunto ya existe.'; +$messages['nodata'] = 'Al menos una posición debe ser seleccionada!'; +$messages['invaliddateformat'] = 'Fecha o formato de fecha inválido'; +$messages['saveerror'] = 'Imposible guardar la información. Ha ocurrido un error con el servidor.'; +$messages['vacationsaved'] = 'Información de vacaciones guardada satisfactoriamente.'; +$messages['emptyvacationbody'] = '¡Se requiere un cuerpo para el mensaje por vacaciones!'; ?> diff --git a/plugins/managesieve/localization/fi_FI.inc b/plugins/managesieve/localization/fi_FI.inc index afdca3d3e..1bec7a3df 100644 --- a/plugins/managesieve/localization/fi_FI.inc +++ b/plugins/managesieve/localization/fi_FI.inc @@ -32,13 +32,30 @@ $labels['filteris'] = 'on samanlainen kuin'; $labels['filterisnot'] = 'ei ole samanlainen kuin'; $labels['filterexists'] = 'on olemassa'; $labels['filternotexists'] = 'ei ole olemassa'; +$labels['filtermatches'] = 'vastaa lauseketta'; +$labels['filternotmatches'] = 'ei vastaa lauseketta'; +$labels['filterregex'] = 'vastaa säännöllistä lauseketta'; +$labels['filternotregex'] = 'ei vastaa säännöllistä lauseketta'; +$labels['filterunder'] = 'alle'; +$labels['filterover'] = 'yli'; $labels['addrule'] = 'Lisää sääntö'; $labels['delrule'] = 'Poista sääntö'; +$labels['messagemoveto'] = 'Siirrä viesti'; +$labels['messageredirect'] = 'Lähetä viesti edelleen'; +$labels['messagecopyto'] = 'Kopioi viesti'; +$labels['messagesendcopy'] = 'Lähetä kopio viestistä'; +$labels['messagereply'] = 'Vastaa viestillä'; +$labels['messagedelete'] = 'Poista viesti'; +$labels['messagediscard'] = 'Hylkää viestillä'; +$labels['messagekeep'] = 'Säilytä viesti saapuneissa'; +$labels['messagesactions'] = '...suorita seuraavat toiminnot:'; $labels['add'] = 'Lisää'; $labels['del'] = 'Poista'; $labels['sender'] = 'Lähettäjä'; $labels['recipient'] = 'Vastaanottaja'; $labels['vacationsubject'] = 'Viestin aihe:'; +$labels['days'] = 'päivää'; +$labels['seconds'] = 'sekuntia'; $labels['setflags'] = 'Aseta liput viestiin'; $labels['addflags'] = 'Lisää liput viestiin'; $labels['removeflags'] = 'Poista liput viestistä'; @@ -50,14 +67,44 @@ $labels['setvariable'] = 'Aseta muuttuja'; $labels['setvarname'] = 'Muuttujan nimi:'; $labels['setvarvalue'] = 'Muuttujan arvo:'; $labels['notifyimportance'] = 'Tärkeysaste:'; +$labels['notifymethodmailto'] = 'Sähköposti'; +$labels['notifymethodtel'] = 'Puhelin'; +$labels['notifymethodsms'] = 'Tekstiviesti'; $labels['filtercreate'] = 'Luo suodatin'; $labels['...'] = '...'; +$labels['year'] = 'vuosi'; +$labels['month'] = 'kuukausi'; +$labels['day'] = 'päivä'; +$labels['hour'] = 'tunti'; +$labels['minute'] = 'minuutti'; +$labels['second'] = 'sekunti'; +$labels['time'] = 'aika (hh:mm:ss)'; +$labels['zone'] = 'aikavyöhyke'; $labels['advancedopts'] = 'Lisävalinnat'; +$labels['address'] = 'osoite'; +$labels['allparts'] = 'kaikki'; +$labels['user'] = 'käyttäjä'; $labels['default'] = 'oletus'; +$labels['vacation'] = 'Loma'; +$labels['vacation.reply'] = 'Vastausviesti'; +$labels['vacation.advanced'] = 'Lisäasetukset'; +$labels['vacation.subject'] = 'Aihe'; +$labels['vacation.body'] = 'Sisältö'; +$labels['vacation.dates'] = 'Loma-aika'; +$labels['vacation.from'] = 'Lähettäjä:'; +$labels['vacation.to'] = 'Vastaanottaja:'; +$labels['vacation.status'] = 'Tila'; +$labels['vacation.on'] = 'Päällä'; +$labels['vacation.off'] = 'Pois'; +$labels['vacation.saving'] = 'Tallennetaan tietoja...'; $messages['filterunknownerror'] = 'Tuntematon palvelinvirhe.'; $messages['filterconnerror'] = 'Yhteys palvelimeen epäonnistui.'; $messages['filterdeleted'] = 'Suodatin poistettu onnistuneesti.'; +$messages['filterdeleteconfirm'] = 'Haluatko varmasti poistaa valitun suodattimen?'; $messages['cannotbeempty'] = 'Kenttä ei voi olla tyhjä.'; $messages['moved'] = 'Suodatin siirretty onnistuneesti.'; $messages['nametoolong'] = 'Nimi on liian pitkä.'; +$messages['saveerror'] = 'Tietojen tallennus epäonnistui palvelinvirheen vuoksi.'; +$messages['vacationsaved'] = 'Lomatiedot tallennettu onnistuneesti.'; +$messages['emptyvacationbody'] = 'Lomaviestin sisältö vaaditaan!'; ?> diff --git a/plugins/managesieve/localization/id_ID.inc b/plugins/managesieve/localization/id_ID.inc index d4024491f..59dadc74d 100644 --- a/plugins/managesieve/localization/id_ID.inc +++ b/plugins/managesieve/localization/id_ID.inc @@ -47,15 +47,20 @@ $labels['messagesendcopy'] = 'Kirim salinan pesan ke'; $labels['messagereply'] = 'balas dengan pesan'; $labels['messagedelete'] = 'Hapus pesan'; $labels['messagediscard'] = 'Buang dengan pesan'; +$labels['messagekeep'] = 'Biarkan pesan tetap didalam kotak surat'; $labels['messagesrules'] = 'Untuk email masuk:'; $labels['messagesactions'] = '...lakukan tindakan berikut'; $labels['add'] = 'Tambah'; $labels['del'] = 'Hapus'; $labels['sender'] = 'Pengirim'; $labels['recipient'] = 'Penerima'; +$labels['vacationaddr'] = 'Alamat email tambahan saya:'; $labels['vacationdays'] = 'Seberapa sering mengirim pesan (dalam hari):'; +$labels['vacationinterval'] = 'Seberapa sering untuk pengiriman pesan:'; $labels['vacationreason'] = 'Isi pesan (alasan liburan):'; $labels['vacationsubject'] = 'Judul pesan:'; +$labels['days'] = 'hari'; +$labels['seconds'] = 'detik'; $labels['rulestop'] = 'Berhenti mengevaluasi aturan'; $labels['enable'] = 'Aktifkan/Non-Aktifkan'; $labels['filterset'] = 'Himpunan filter'; @@ -77,11 +82,13 @@ $labels['countisgreaterthanequal'] = 'penghitungan lebih besa dari atau sama den $labels['countislessthan'] = 'penghitungan lebih kecil dari'; $labels['countislessthanequal'] = 'penghitungan lebih kecil dari atau sama dengan'; $labels['countequals'] = 'penghitungan sama dengan'; +$labels['countnotequals'] = 'penghitungan tidak sama dengan'; $labels['valueisgreaterthan'] = 'nilai lebih besar dari'; $labels['valueisgreaterthanequal'] = 'nilai lebih besar dari atau sama dengan'; $labels['valueislessthan'] = 'nilai lebih kecil dari'; $labels['valueislessthanequal'] = 'nilai lebih kecil dari atau sama dengan'; $labels['valueequals'] = 'nilai sama dengan'; +$labels['valuenotequals'] = 'nilai tidak sadengan'; $labels['setflags'] = 'Atur tanda pada pesan'; $labels['addflags'] = 'Berikan tanda pada pesan'; $labels['removeflags'] = 'Cabut tanda dari pesan'; @@ -101,18 +108,37 @@ $labels['varupperfirst'] = 'karakter pertama huruf besar'; $labels['varquotewildcard'] = 'kutip karakter khusus'; $labels['varlength'] = 'panjang'; $labels['notify'] = 'Kirim pemberitahuan'; -$labels['notifyaddress'] = 'Ke alamat email:'; -$labels['notifybody'] = 'Isi pemberitahuan:'; -$labels['notifysubject'] = 'Judul pemberitahuan'; -$labels['notifyfrom'] = 'Pengirim pemberitahuan.'; +$labels['notifytarget'] = 'Pemberitahuan yang dituju:'; +$labels['notifymessage'] = 'Pemberitahuan pesan (pilihan):'; +$labels['notifyoptions'] = 'Pemberitahuan untuk beberapa pilihan (pilihan):'; +$labels['notifyfrom'] = 'Pemberitahuan ke pengirim (tidak harus):'; $labels['notifyimportance'] = 'Tingkat kepentingan:'; $labels['notifyimportancelow'] = 'rendah'; $labels['notifyimportancenormal'] = 'normal'; $labels['notifyimportancehigh'] = 'tinggi'; +$labels['notifymethodmailto'] = 'Surat Elektronik / Email'; +$labels['notifymethodtel'] = 'Telepon'; +$labels['notifymethodsms'] = 'SMS'; $labels['filtercreate'] = 'Buat filter'; $labels['usedata'] = 'Gunakan data berikut dalam filter:'; $labels['nextstep'] = 'Langkah Selanjutnya'; $labels['...'] = '...'; +$labels['currdate'] = 'Tanggal sekarang'; +$labels['datetest'] = 'Tanggal'; +$labels['dateheader'] = 'header / tajuk:'; +$labels['year'] = 'tahun'; +$labels['month'] = 'bulan'; +$labels['day'] = 'hari'; +$labels['date'] = 'tanggal (yyyy-mm-dd)'; +$labels['julian'] = 'tanggal (kalender julian)'; +$labels['hour'] = 'jam'; +$labels['minute'] = 'menit'; +$labels['second'] = 'detik'; +$labels['time'] = 'waktu :(hh:mm:ss)'; +$labels['iso8601'] = 'tanggal (ISO8601)'; +$labels['std11'] = 'tanggal (RFC2822)'; +$labels['zone'] = 'zona-waktu'; +$labels['weekday'] = 'hari kerja (0-6)'; $labels['advancedopts'] = 'Pilihan lanjutan'; $labels['body'] = 'Isi'; $labels['address'] = 'alamat'; @@ -132,26 +158,67 @@ $labels['default'] = 'standar'; $labels['octet'] = 'ketat (oktet)'; $labels['asciicasemap'] = 'case insensitive (ascii-casemap)'; $labels['asciinumeric'] = 'numeric (ascii-numeric)'; +$labels['index'] = 'indeks:'; +$labels['indexlast'] = 'mundur:'; +$labels['vacation'] = 'Liburan'; +$labels['vacation.reply'] = 'Balas pesan'; +$labels['vacation.advanced'] = 'Pengaturan Lanjutan'; +$labels['vacation.subject'] = 'Judul'; +$labels['vacation.body'] = 'Isi'; +$labels['vacation.dates'] = 'Waktu Liburan'; +$labels['vacation.from'] = 'Pengirim:'; +$labels['vacation.to'] = 'Kepada:'; +$labels['vacation.status'] = 'Status'; +$labels['vacation.on'] = 'Nyala'; +$labels['vacation.off'] = 'Mati'; +$labels['vacation.addresses'] = 'Alamat email tambahan saya'; +$labels['vacation.interval'] = 'Balas secara interval'; +$labels['vacation.after'] = 'Atur untuk pengaturan cuti setelah'; +$labels['vacation.saving'] = 'Menyimpan data...'; +$labels['vacation.action'] = 'Tindakan untuk pesan masuk'; +$labels['vacation.keep'] = 'Simpan'; +$labels['vacation.discard'] = 'Buang'; +$labels['vacation.redirect'] = 'Alihkan ke'; +$labels['vacation.copy'] = 'Kirim salinan ke'; +$labels['arialabelfiltersetactions'] = 'Tindakan untuk penyaringan'; +$labels['arialabelfilteractions'] = 'Tindakan penyaringan'; +$labels['arialabelfilterform'] = 'Properti untuk penyaringan'; +$labels['ariasummaryfilterslist'] = 'Daftar penyaringan'; +$labels['ariasummaryfiltersetslist'] = 'Daftar penyaringan yang telah di set'; +$labels['filterstitle'] = 'Ubah penyaringan untuk email masuk'; +$labels['vacationtitle'] = 'Ubah aturan untuk sedang-diluar-kantor'; $messages['filterunknownerror'] = 'Error pada server tak dikenali.'; $messages['filterconnerror'] = 'Tidak dapat menyambung ke server.'; +$messages['filterdeleteerror'] = 'Tidak dapat menghapus penyaringan. Terjadi kesalahan pada server.'; $messages['filterdeleted'] = 'Penyaringan berhasil dihapus.'; $messages['filtersaved'] = 'Penyaringan berhasil disimpan.'; +$messages['filtersaveerror'] = 'Tidak dapat menyimpan penyaringan. Terjadi kesalahan pada server.'; $messages['filterdeleteconfirm'] = 'Yakin untuk menghapus penyaringan terpilih?'; $messages['ruledeleteconfirm'] = 'Yakin untuk menghapus aturan terpilih?'; $messages['actiondeleteconfirm'] = 'Yakin untuk menghapus tindakan terpilih?'; $messages['forbiddenchars'] = 'Karakter terlarang pada isian.'; $messages['cannotbeempty'] = 'Isian tidak bisa kosong.'; $messages['ruleexist'] = 'Penyaringan dengan nama tersebut sudah ada.'; +$messages['setactivateerror'] = 'Tidak dapat mengaktivkan kumpulan penyaringan terpilih. Terjadi kesalahan pada server.'; +$messages['setdeactivateerror'] = 'Tidak bisa mematikan kumpulan penyaringan terpilih. Terjadi kesalahan pada server.'; +$messages['setdeleteerror'] = 'Tidak dapat menghapus kumpulan penyaringan terpilih. Terjadi kesalahan pada server.'; $messages['setactivated'] = 'Kumpulan penyaringan berhasil dihidupkan.'; $messages['setdeactivated'] = 'Kumpulan penyaringan berhasil dimatikan.'; $messages['setdeleted'] = 'Kumpulan penyaringan berhasil dihapus.'; $messages['setdeleteconfirm'] = 'Yakin ingin menghapus kumpulan penyaringan terpilih?'; +$messages['setcreateerror'] = 'Tidak bisa membuat kumpulan penyaringan. Terjadi kesalahan pada server'; $messages['setcreated'] = 'Kumpulan penyaringan berhasul dibuat.'; +$messages['activateerror'] = 'Tidak dapat mengaktifkan penyaringan terpilih. Terjadi kesalahan pada server'; +$messages['deactivateerror'] = 'Tidak dapat mematikan penyaringan terpilih. Terjadi kesalahan pada server'; $messages['deactivated'] = 'Berhasil menghidupkan penyaringan.'; $messages['activated'] = 'Berhasil mematikan penyaringan.'; $messages['moved'] = 'Berhasil memindahkan penyaringan.'; +$messages['moveerror'] = 'Tidak bisa memindahkan penyaringan terpilih. Ada kesalahan di server.'; $messages['nametoolong'] = 'Nama terlalu panjang.'; $messages['namereserved'] = 'Nama sudah terpesan.'; $messages['setexist'] = 'Kumpulan sudah ada.'; $messages['nodata'] = 'Setidaknya satu posisi harus dipilih!'; +$messages['invaliddateformat'] = 'Format tanggal atau bagian dari tanggal salah'; +$messages['saveerror'] = 'Tidak dapat menyimpan data. Terjadi kesalahan pada server.'; +$messages['vacationsaved'] = 'Data untuk cuti berhasil disimpan.'; ?> diff --git a/plugins/managesieve/localization/ml_IN.inc b/plugins/managesieve/localization/ml_IN.inc index 4dac39417..613695c0b 100644 --- a/plugins/managesieve/localization/ml_IN.inc +++ b/plugins/managesieve/localization/ml_IN.inc @@ -47,15 +47,20 @@ $labels['messagesendcopy'] = 'സന്ദേശത്തിന്റെ പക $labels['messagereply'] = 'സന്ദേശം വെച്ച് മറുപടി അയക്കു'; $labels['messagedelete'] = 'സന്ദേശം മായ്ക്കു'; $labels['messagediscard'] = 'സന്ദേശത്തോടെ നിരാകരിക്കുക'; +$labels['messagekeep'] = 'സന്ദേശം ഇൻബോക്സിൽ സൂക്ഷിക്കുക'; $labels['messagesrules'] = 'ആഗമന സന്ദേശങ്ങള്ക്ക്:'; $labels['messagesactions'] = '...ഈ പ്രവര്ത്തനങ്ങള് ചെയ്യുക:'; $labels['add'] = 'ചേര്ക്കു'; $labels['del'] = 'നീക്കം ചെയ്യുക'; $labels['sender'] = 'അയചയാള്'; $labels['recipient'] = 'സ്വീകര്ത്താവ്'; +$labels['vacationaddr'] = 'എന്റെ മറ്റ് ഈമെയിൽ വിലാസങ്ങൾ:'; $labels['vacationdays'] = 'എത്ര ഭിവസം കൂടുമ്പോള് സന്ദേശം അയക്കണം:'; +$labels['vacationinterval'] = 'എത്ര സമയം കൂടുമ്പോൾ സന്ദേശങ്ങൾ അയയ്ക്കണം:'; $labels['vacationreason'] = 'സന്ദേശത്തിന്റെ ഉള്ളടക്കം (അവധിയുടെ കാരണം):'; $labels['vacationsubject'] = 'സന്ദേശത്തിന്റെ വിഷയം:'; +$labels['days'] = 'ദിവസങ്ങൾ'; +$labels['seconds'] = 'സെക്കന്റുകൾ'; $labels['rulestop'] = 'നിയമങ്ങള് വിലയിരുത്തുന്നത് നിര്ത്തുക'; $labels['enable'] = 'പ്രവര്ത്തനസജ്ജം/രഹിതം'; $labels['filterset'] = 'അരിപ്പകളുടെ കൂട്ടം'; @@ -77,11 +82,13 @@ $labels['countisgreaterthanequal'] = 'എണ്ണം ഇതിനെക്ക $labels['countislessthan'] = 'എണ്ണം ഇതിനെക്കാള് കുറവ്'; $labels['countislessthanequal'] = 'എണ്ണം ഇതിനെക്കാള് കൂറവ് ഇല്ലെങ്കില് സമം'; $labels['countequals'] = 'എണ്ണം ഇതിനോട് സമം'; +$labels['countnotequals'] = 'എണ്ണം ഇതിനോട് തുല്യമല്ല'; $labels['valueisgreaterthan'] = 'മൂല്യം ഇതിനെക്കാള് കുടുതല്'; $labels['valueisgreaterthanequal'] = 'മുല്യം ഇതിനെക്കാള് കൂടുതല് ഇല്ലെങ്കില് സമം'; $labels['valueislessthan'] = 'മൂല്യം ഇതിനെക്കാള് കുറവ്'; $labels['valueislessthanequal'] = 'മൂല്യം ഇതിനെക്കാള് കൂറവ് ഇല്ലെങ്കില് തുല്യം'; $labels['valueequals'] = 'മൂല്യം ഇതിനോട് സമം'; +$labels['valuenotequals'] = 'മൂല്യം ഇതിനോട് തുല്യമല്ല'; $labels['setflags'] = 'സന്ദേശത്തില് അടയാളമിടുക'; $labels['addflags'] = 'സന്ദേശത്തില് അടയാളം ചേര്ക്കുക'; $labels['removeflags'] = 'സന്ദേശത്തില് നിന്നും അടയാളം മാറ്റുക'; @@ -90,6 +97,9 @@ $labels['flagdeleted'] = 'നീക്കം ചെയ്തവ'; $labels['flaganswered'] = 'മറുപടി നല്കിയവ'; $labels['flagflagged'] = 'അടയാളപ്പെടുത്തിയവ'; $labels['flagdraft'] = 'കരട്'; +$labels['setvariable'] = 'വേരിയബിൾ സ്ഥിരപ്പെടുത്തുക'; +$labels['setvarname'] = 'വേരിയബിളിന്റെ പേര്'; +$labels['setvarvalue'] = 'വേരിയബിളിന്റെ മൂല്യം'; $labels['filtercreate'] = 'അരിപ്പ ഉണ്ടാക്കുക'; $labels['usedata'] = 'ഈ വിവരങ്ങള് അരിപ്പയില് ഉപയോഗിക്കുക:'; $labels['nextstep'] = 'അടുത്ത പടി'; diff --git a/plugins/managesieve/localization/nn_NO.inc b/plugins/managesieve/localization/nn_NO.inc index 4ef35dbb4..2dc68e6c9 100644 --- a/plugins/managesieve/localization/nn_NO.inc +++ b/plugins/managesieve/localization/nn_NO.inc @@ -100,10 +100,6 @@ $labels['varlowerfirst'] = 'med liten forbokstav'; $labels['varupperfirst'] = 'med stor forbokstav'; $labels['varlength'] = 'lengde'; $labels['notify'] = 'Send varsel'; -$labels['notifyaddress'] = 'Til e-postadresse:'; -$labels['notifybody'] = 'Varseltekst:'; -$labels['notifysubject'] = 'Varselemne:'; -$labels['notifyfrom'] = 'Varselavsendar:'; $labels['notifyimportance'] = 'Betyding:'; $labels['notifyimportancelow'] = 'låg'; $labels['notifyimportancenormal'] = 'normal'; diff --git a/plugins/managesieve/localization/ru_RU.inc b/plugins/managesieve/localization/ru_RU.inc index eccce9470..ea0ebd263 100644 --- a/plugins/managesieve/localization/ru_RU.inc +++ b/plugins/managesieve/localization/ru_RU.inc @@ -57,10 +57,10 @@ $labels['recipient'] = 'Получатель'; $labels['vacationaddr'] = 'Мой дополнительный адрес(а):'; $labels['vacationdays'] = 'Как часто отправлять сообщения (в днях):'; $labels['vacationinterval'] = 'Как часто отправлять сообщения:'; -$labels['days'] = 'дней'; -$labels['seconds'] = 'секунд'; $labels['vacationreason'] = 'Текст сообщения (причина отсутствия):'; $labels['vacationsubject'] = 'Тема сообщения:'; +$labels['days'] = 'дней'; +$labels['seconds'] = 'секунд'; $labels['rulestop'] = 'Закончить выполнение'; $labels['enable'] = 'Включить/Выключить'; $labels['filterset'] = 'Набор фильтров'; @@ -108,14 +108,17 @@ $labels['varupperfirst'] = 'первый символ в верхнем реги $labels['varquotewildcard'] = 'символ кавычек'; $labels['varlength'] = 'длина'; $labels['notify'] = 'Отправить уведомление'; -$labels['notifyaddress'] = 'На адрес электронной почты:'; -$labels['notifybody'] = 'Текст уведомления:'; -$labels['notifysubject'] = 'Тема уведомления:'; -$labels['notifyfrom'] = 'Отправитель уведомления:'; +$labels['notifytarget'] = 'Объект уведомления:'; +$labels['notifymessage'] = 'Сообщение уведомления (не обязательно):'; +$labels['notifyoptions'] = 'Параметры уведомления (не обязательно):'; +$labels['notifyfrom'] = 'Отправитель уведомления (не обязательно):'; $labels['notifyimportance'] = 'Важность:'; $labels['notifyimportancelow'] = 'низкая'; $labels['notifyimportancenormal'] = 'нормальная'; $labels['notifyimportancehigh'] = 'высокая'; +$labels['notifymethodmailto'] = 'Email'; +$labels['notifymethodtel'] = 'Телефон'; +$labels['notifymethodsms'] = 'SMS'; $labels['filtercreate'] = 'Создать фильтр'; $labels['usedata'] = 'Использовать следующие данные в фильтре:'; $labels['nextstep'] = 'Далее'; @@ -157,6 +160,33 @@ $labels['asciicasemap'] = 'Регистронезависимый (ascii-casemap $labels['asciinumeric'] = 'Числовой (ascii-numeric)'; $labels['index'] = 'индекс:'; $labels['indexlast'] = 'наоборот'; +$labels['vacation'] = 'Отпуск'; +$labels['vacation.reply'] = 'Ответное сообщение'; +$labels['vacation.advanced'] = 'Дополнительные настройки'; +$labels['vacation.subject'] = 'Тема'; +$labels['vacation.body'] = 'Тело письма'; +$labels['vacation.dates'] = 'Время отпуска'; +$labels['vacation.from'] = 'От:'; +$labels['vacation.to'] = 'Кому:'; +$labels['vacation.status'] = 'Состояние'; +$labels['vacation.on'] = 'Вкл.'; +$labels['vacation.off'] = 'Выкл.'; +$labels['vacation.addresses'] = 'Мои дополнительные адреса'; +$labels['vacation.interval'] = 'Интервал ответа'; +$labels['vacation.after'] = 'Поместить правило отпуска после'; +$labels['vacation.saving'] = 'Сохранение данных...'; +$labels['vacation.action'] = 'Действия с входящим сообщением'; +$labels['vacation.keep'] = 'Оставить'; +$labels['vacation.discard'] = 'Отменить'; +$labels['vacation.redirect'] = 'Перенаправить на'; +$labels['vacation.copy'] = 'Отправить копию на'; +$labels['arialabelfiltersetactions'] = 'Действия набора фильтров'; +$labels['arialabelfilteractions'] = 'Действия фильтра'; +$labels['arialabelfilterform'] = 'Свойства фильтра'; +$labels['ariasummaryfilterslist'] = 'Список фильтров'; +$labels['ariasummaryfiltersetslist'] = 'Список набора фильтров'; +$labels['filterstitle'] = 'Редактировать фильтры для входящей почты'; +$labels['vacationtitle'] = 'Изменить правило "Не в офисе"'; $messages['filterunknownerror'] = 'Неизвестная ошибка сервера.'; $messages['filterconnerror'] = 'Невозможно подключиться к серверу.'; $messages['filterdeleteerror'] = 'Невозможно удалить фильтр. Ошибка сервера.'; @@ -189,4 +219,7 @@ $messages['namereserved'] = 'Зарезервированное имя.'; $messages['setexist'] = 'Набор уже существует.'; $messages['nodata'] = 'Нужно выбрать хотя бы одну позицию!'; $messages['invaliddateformat'] = 'Неверная дата или формат части даты'; +$messages['saveerror'] = 'Невозможно сохранить данные. Ошибка сервера.'; +$messages['vacationsaved'] = 'Данные об отпуске успешно сохранены.'; +$messages['emptyvacationbody'] = 'Сообщение о причине отсутствия не может быть пустым!'; ?> diff --git a/plugins/managesieve/localization/zh_TW.inc b/plugins/managesieve/localization/zh_TW.inc index 72eb3393b..b21310cea 100644 --- a/plugins/managesieve/localization/zh_TW.inc +++ b/plugins/managesieve/localization/zh_TW.inc @@ -102,10 +102,6 @@ $labels['varupperfirst'] = '第一個字高於'; $labels['varquotewildcard'] = '跳脫字元'; $labels['varlength'] = '長度'; $labels['notify'] = '寄送通知'; -$labels['notifyaddress'] = '寄到電子郵件位址:'; -$labels['notifybody'] = '通知內容:'; -$labels['notifysubject'] = '通知主旨:'; -$labels['notifyfrom'] = '通知寄件者:'; $labels['notifyimportance'] = '重要性:'; $labels['notifyimportancelow'] = '低'; $labels['notifyimportancenormal'] = '一般'; diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index 27ab38a77..cd0d5f3ca 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -48,80 +48,53 @@ if (window.rcmail) { if (rcmail.env.action.startsWith('plugin.managesieve')) { if (rcmail.gui_objects.sieveform) { rcmail.enable_command('plugin.managesieve-save', true); - - // small resize for header element - $('select[name="_header[]"]', rcmail.gui_objects.sieveform).each(function() { - if (this.value == '...') this.style.width = '40px'; - }); - - // resize dialog window - if (rcmail.env.action == 'plugin.managesieve' && rcmail.env.task == 'mail') { - parent.rcmail.managesieve_dialog_resize(rcmail.gui_objects.sieveform); - } - - $('input[type="text"]:first', rcmail.gui_objects.sieveform).focus(); - - // initialize smart list inputs - $('textarea[data-type="list"]', rcmail.gui_objects.sieveform).each(function() { - smart_field_init(this); - }); - - // enable date pickers on date fields - if ($.datepicker && rcmail.env.date_format) { - $.datepicker.setDefaults({ - dateFormat: rcmail.env.date_format, - changeMonth: true, - showOtherMonths: true, - selectOtherMonths: true, - onSelect: function(dateText) { $(this).focus().val(dateText) } - }); - $('input.datepicker').datepicker(); - } + sieve_form_init(); } else { rcmail.enable_command('plugin.managesieve-add', 'plugin.managesieve-setadd', !rcmail.env.sieveconnerror); } - var i, p = rcmail, setcnt, set = rcmail.env.currentset; + var setcnt, set = rcmail.env.currentset; if (rcmail.gui_objects.filterslist) { rcmail.filters_list = new rcube_list_widget(rcmail.gui_objects.filterslist, - {multiselect:false, draggable:true, keyboard:false}); + {multiselect:false, draggable:true, keyboard:true}); rcmail.filters_list - .addEventListener('select', function(e) { p.managesieve_select(e); }) - .addEventListener('dragstart', function(e) { p.managesieve_dragstart(e); }) - .addEventListener('dragend', function(e) { p.managesieve_dragend(e); }) + .addEventListener('select', function(e) { rcmail.managesieve_select(e); }) + .addEventListener('dragstart', function(e) { rcmail.managesieve_dragstart(e); }) + .addEventListener('dragend', function(e) { rcmail.managesieve_dragend(e); }) .addEventListener('initrow', function(row) { - row.obj.onmouseover = function() { p.managesieve_focus_filter(row); }; - row.obj.onmouseout = function() { p.managesieve_unfocus_filter(row); }; + row.obj.onmouseover = function() { rcmail.managesieve_focus_filter(row); }; + row.obj.onmouseout = function() { rcmail.managesieve_unfocus_filter(row); }; }) - .init().focus(); + .init(); } if (rcmail.gui_objects.filtersetslist) { rcmail.filtersets_list = new rcube_list_widget(rcmail.gui_objects.filtersetslist, - {multiselect:false, draggable:false, keyboard:false}); + {multiselect:false, draggable:false, keyboard:true}); - rcmail.filtersets_list - .addEventListener('select', function(e) { p.managesieve_setselect(e); }) - .init().focus(); + rcmail.filtersets_list.init().focus(); if (set != null) { set = rcmail.managesieve_setid(set); - rcmail.filtersets_list.shift_start = set; - rcmail.filtersets_list.highlight_row(set, false); + rcmail.filtersets_list.select(set); } + // attach select event after initial record was selected + rcmail.filtersets_list.addEventListener('select', function(e) { rcmail.managesieve_setselect(e); }); + setcnt = rcmail.filtersets_list.rowcount; rcmail.enable_command('plugin.managesieve-set', true); rcmail.enable_command('plugin.managesieve-setact', 'plugin.managesieve-setget', setcnt); rcmail.enable_command('plugin.managesieve-setdel', setcnt > 1); // Fix dragging filters over sets list - $('tr', rcmail.gui_objects.filtersetslist).each(function (i, e) { p.managesieve_fixdragend(e); }); + $('tr', rcmail.gui_objects.filtersetslist).each(function (i, e) { rcmail.managesieve_fixdragend(e); }); } } + if (rcmail.gui_objects.sieveform && rcmail.env.rule_disabled) $('#disabled').attr('checked', true); }); @@ -736,6 +709,13 @@ function action_type_select(id) } }; +function vacation_action_select() +{ + var selected = $('#vacation_action').val(); + + $('#action_target_span')[selected == 'discard' || selected == 'keep' ? 'hide' : 'show'](); +}; + // Inititalizes smart list input function smart_field_init(field) { @@ -778,6 +758,7 @@ function smart_field_row(value, name, idx, size) input = $('input', elem).attr(attrs).keydown(function(e) { var input = $(this); + // element creation event (on Enter) if (e.which == 13) { var name = input.attr('name').replace(/\[\]$/, ''), @@ -787,6 +768,21 @@ function smart_field_row(value, name, idx, size) input.parent().after(elem); $('input', elem).focus(); } + // backspace or delete: remove input, focus previous one + else if ((e.which == 8 || e.which == 46) && input.val() == '') { + + var parent = input.parent(), siblings = parent.parent().children(); + + if (siblings.length > 1) { + if (parent.prev().length) + parent.prev().children('input').focus(); + else + parent.next().children('input').focus(); + + parent.remove(); + return false; + } + } }); // element deletion event @@ -833,6 +829,101 @@ rcube_webmail.prototype.managesieve_tip_register = function(tips) } }; +// format time string +function sieve_formattime(hour, minutes) +{ + var i, c, h, time = '', format = rcmail.env.time_format || 'H:i'; + + for (i=0; i<format.length; i++) { + c = format.charAt(i); + switch (c) { + case 'a': time += hour > 12 ? 'am' : 'pm'; break; + case 'A': time += hour > 12 ? 'AM' : 'PM'; break; + case 'g': + case 'h': + h = hour == 0 ? 12 : hour > 12 ? hour - 12 : hour; + time += (c == 'h' && hour < 10 ? '0' : '') + hour; + break; + case 'G': time += hour; break; + case 'H': time += (hour < 10 ? '0' : '') + hour; break; + case 'i': time += (minutes < 10 ? '0' : '') + minutes; break; + case 's': time += '00'; + default: time += c; + } + } + + return time; +} + +function sieve_form_init() +{ + // small resize for header element + $('select[name="_header[]"]', rcmail.gui_objects.sieveform).each(function() { + if (this.value == '...') this.style.width = '40px'; + }); + + // resize dialog window + if (rcmail.env.action == 'plugin.managesieve' && rcmail.env.task == 'mail') { + parent.rcmail.managesieve_dialog_resize(rcmail.gui_objects.sieveform); + } + + $('input[type="text"]:first', rcmail.gui_objects.sieveform).focus(); + + // initialize smart list inputs + $('textarea[data-type="list"]', rcmail.gui_objects.sieveform).each(function() { + smart_field_init(this); + }); + + // enable date pickers on date fields + if ($.datepicker && rcmail.env.date_format) { + $.datepicker.setDefaults({ + dateFormat: rcmail.env.date_format, + changeMonth: true, + showOtherMonths: true, + selectOtherMonths: true, + onSelect: function(dateText) { $(this).focus().val(dateText); } + }); + $('input.datepicker').datepicker(); + } + + // configure drop-down menu on time input fields based on jquery UI autocomplete + $('#vacation_timefrom, #vacation_timeto') + .attr('autocomplete', "off") + .autocomplete({ + delay: 100, + minLength: 1, + source: function(p, callback) { + var h, result = []; + for (h = 0; h < 24; h++) + result.push(sieve_formattime(h, 0)); + result.push(sieve_formattime(23, 59)); + + return callback(result); + }, + open: function(event, ui) { + // scroll to current time + var $this = $(this), val = $this.val(), + widget = $this.autocomplete('widget').css('width', '10em'), + menu = $this.data('ui-autocomplete').menu; + + if (val && val.length) + widget.children().each(function() { + var li = $(this); + if (li.text().indexOf(val) == 0) + menu._scrollIntoView(li); + }); + }, + select: function(event, ui) { + $(this).val(ui.item.value); + return false; + } + }) + .click(function() { // show drop-down upon clicks + $(this).autocomplete('search', $(this).val() || ' '); + }) +} + + /*********************************************************/ /********* Mail UI methods *********/ /*********************************************************/ diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index 6adba4e2d..478f26b00 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -37,7 +37,7 @@ class managesieve extends rcube_plugin function init() { - $this->rc = rcmail::get_instance(); + $this->rc = rcube::get_instance(); // register actions $this->register_action('plugin.managesieve', array($this, 'managesieve_actions')); @@ -54,7 +54,9 @@ class managesieve extends rcube_plugin $this->add_hook('message_headers_output', array($this, 'mail_headers')); // inject Create Filter popup stuff - if (empty($this->rc->action) || $this->rc->action == 'show') { + if (empty($this->rc->action) || $this->rc->action == 'show' + || strpos($this->rc->action, 'plugin.managesieve') === 0 + ) { $this->mail_task_handler(); } } @@ -72,13 +74,15 @@ class managesieve extends rcube_plugin // load localization $this->add_texts('localization/'); - if ($this->rc->task == 'mail' || strpos($this->rc->action, 'plugin.managesieve') === 0) { + $sieve_action = strpos($this->rc->action, 'plugin.managesieve') === 0; + + if ($this->rc->task == 'mail' || $sieve_action) { $this->include_script('managesieve.js'); } // include styles $skin_path = $this->local_skin_path(); - if ($this->rc->task == 'settings') { + if ($this->rc->task == 'settings' || $sieve_action) { if (is_file($this->home . "/$skin_path/managesieve.css")) { $this->include_stylesheet("$skin_path/managesieve.css"); } @@ -89,7 +93,6 @@ class managesieve extends rcube_plugin } } - $this->ui_initialized = true; } @@ -109,6 +112,7 @@ class managesieve extends rcube_plugin 'class' => 'filter', 'label' => 'filters', 'domain' => 'managesieve', + 'title' => 'filterstitle', ); } @@ -119,6 +123,7 @@ class managesieve extends rcube_plugin 'class' => 'vacation', 'label' => 'vacation', 'domain' => 'managesieve', + 'title' => 'vacationtitle', ); } @@ -225,7 +230,7 @@ class managesieve extends rcube_plugin /** * Initializes engine object */ - private function get_engine($type = null) + public function get_engine($type = null) { if (!$this->engine) { $this->load_config(); diff --git a/plugins/managesieve/skins/classic/templates/vacation.html b/plugins/managesieve/skins/classic/templates/vacation.html index bf94edb20..26e408eef 100644 --- a/plugins/managesieve/skins/classic/templates/vacation.html +++ b/plugins/managesieve/skins/classic/templates/vacation.html @@ -17,7 +17,7 @@ <roundcube:object name="vacationform" id="vacationform" style="margin: 10px 10px 0 10px" /> <div id="formfooter" style="padding: 0 10px"> <div class="footerleft"> - <roundcube:button command="save" type="input" class="button mainaction" label="save" /> + <roundcube:button command="plugin.managesieve-save" type="input" class="button mainaction" label="save" /> </div> </div> </div> diff --git a/plugins/managesieve/skins/larry/managesieve.css b/plugins/managesieve/skins/larry/managesieve.css index 1f954caf2..61d1c89a8 100644 --- a/plugins/managesieve/skins/larry/managesieve.css +++ b/plugins/managesieve/skins/larry/managesieve.css @@ -306,6 +306,7 @@ a.button.disabled font-size: 11px; padding: 1px; vertical-align: middle; + max-width: 280px; } html.mozilla #filter-form select @@ -334,9 +335,7 @@ fieldset border: 1px solid #B2B2B2; border-radius: 4px; box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1); - -moz-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1); -webkit-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1); - -o-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1); margin: 0; padding: 2px; display: inline-block; @@ -417,11 +416,13 @@ body.iframe.mail #filter-form /* vacation form */ -#settings-sections span.vacation a { - background: url(images/vacation_icons.png) no-repeat 7px 1px; +#settings-sections .vacation a { + background-image: url(images/vacation_icons.png); + background-repeat: no-repeat; + background-position: 7px 1px; } -#settings-sections span.vacation.selected a { +#settings-sections .vacation.selected a { background-position: 7px -23px; } @@ -452,3 +453,7 @@ body.iframe.mail #filter-form border: 0; box-shadow: none; } + +#vacationform td.vacation { + white-space: nowrap; +} diff --git a/plugins/managesieve/skins/larry/templates/managesieve.html b/plugins/managesieve/skins/larry/templates/managesieve.html index 471bbf4d2..494af6ae2 100644 --- a/plugins/managesieve/skins/larry/templates/managesieve.html +++ b/plugins/managesieve/skins/larry/templates/managesieve.html @@ -4,39 +4,42 @@ <title><roundcube:object name="pagetitle" /></title> <roundcube:include file="/includes/links.html" /> </head> -<body class="noscroll"> +<roundcube:if condition="env:extwin" /><body class="noscroll extwin"><roundcube:else /><body class="noscroll"><roundcube:endif /> <roundcube:include file="/includes/header.html" /> +<h1 class="voice"><roundcube:label name="settings" /> : <roundcube:label name="managesieve.filters" /></h1> + <div id="mainscreen" class="offset"> <roundcube:include file="/includes/settingstabs.html" /> -<div id="settings-right"> -<div id="filtersetslistbox" class="uibox listbox"> -<h2 class="boxtitle"><roundcube:label name="managesieve.filtersets" /></h2> +<div id="settings-right" role="main"> +<div id="filtersetslistbox" class="uibox listbox" aria-labelledby="aria-label-filtersets"> +<h2 class="boxtitle" id="aria-label-filtersets"><roundcube:label name="managesieve.filtersets" /></h2> <div class="scroller withfooter"> - <roundcube:object name="filtersetslist" id="filtersetslist" class="listing" cellspacing="0" summary="Filters list" type="list" noheader="true" /> + <roundcube:object name="filtersetslist" id="filtersetslist" class="listing" summary="managesieve.ariasummaryfiltersetslist" type="list" noheader="true" role="listbox" /> </div> <div class="boxfooter"> - <roundcube:button command="plugin.managesieve-setadd" type="link" title="managesieve.filtersetadd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtersetmenulink" id="filtersetmenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtersetmenu');return false" innerClass="inner" content="⚙" /> + <roundcube:button command="plugin.managesieve-setadd" type="link" title="managesieve.filtersetadd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtersetmenulink" id="filtersetmenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="return UI.toggle_popup('filtersetmenu', event)" innerClass="inner" content="⚙" aria-haspopup="true" aria-expanded="false" aria-owns="filtersetmenu-menu" /> </div> </div> <div id="filtersscreen"> -<div id="filterslistbox" class="uibox listbox"> -<h2 class="boxtitle"><roundcube:label name="managesieve.filters" /></h2> +<div id="filterslistbox" class="uibox listbox" aria-labelledby="aria-label-filters"> +<h2 class="boxtitle" id="aria-label-filters"><roundcube:label name="managesieve.filters" /></h2> <div class="scroller withfooter"> - <roundcube:object name="filterslist" id="filterslist" class="listing" cellspacing="0" summary="Filters list" noheader="true" /> + <roundcube:object name="filterslist" id="filterslist" class="listing" summary="managesieve.ariasummaryfilterslist" noheader="true" role="listbox" /> </div> <div class="boxfooter"> - <roundcube:button command="plugin.managesieve-add" type="link" title="managesieve.filteradd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtermenulink" id="filtermenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtermenu');return false" innerClass="inner" content="⚙" /> + <roundcube:button command="plugin.managesieve-add" type="link" title="managesieve.filteradd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtermenulink" id="filtermenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="return UI.toggle_popup('filtermenu', event)" innerClass="inner" content="⚙" aria-haspopup="true" aria-expanded="false" aria-owns="filtermenu-menu" /> </div> </div> <div id="filter-box" class="uibox contentbox"> - <div class="iframebox"> - <roundcube:object name="filterframe" id="filter-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> + <div class="iframebox" role="complementary" aria-labelledby="aria-label-filterform"> + <h2 id="aria-label-filterframe" class="voice"><roundcube:label name="managesieve.arialabelfilterform" /></h2> + <roundcube:object name="filterframe" id="filter-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" title="managesieve.arialabelfilterform" /> </div> </div> @@ -44,19 +47,21 @@ </div> </div> -<div id="filtersetmenu" class="popupmenu"> - <ul class="toolbarmenu"> - <li><roundcube:button command="plugin.managesieve-setact" label="managesieve.enable" classAct="active" /></li> - <li><roundcube:button command="plugin.managesieve-setdel" label="delete" classAct="active" /></li> - <li class="separator_above"><roundcube:button command="plugin.managesieve-setget" label="download" classAct="active" /></li> +<div id="filtersetmenu" class="popupmenu" aria-hidden="true"> + <h3 id="aria-label-setactions" class="voice"><roundcube:label name="managesieve.arialabelfiltersetactions" /></h3> + <ul class="toolbarmenu" id="filtersetmenu-menu" role="menu" aria-labelledby="aria-label-setactions"> + <li role="menuitem"><roundcube:button command="plugin.managesieve-setact" label="managesieve.enable" classAct="active" /></li> + <li role="menuitem"><roundcube:button command="plugin.managesieve-setdel" label="delete" classAct="active" /></li> + <li role="menuitem" class="separator_above"><roundcube:button command="plugin.managesieve-setget" label="download" classAct="active" /></li> <roundcube:container name="filtersetoptions" id="filtersetmenu" /> </ul> </div> -<div id="filtermenu" class="popupmenu"> - <ul class="toolbarmenu"> - <li><roundcube:button command="plugin.managesieve-act" label="managesieve.enable" classAct="active" /></li> - <li><roundcube:button command="plugin.managesieve-del" label="delete" classAct="active" /></li> +<div id="filtermenu" class="popupmenu" aria-hidden="true"> + <h3 id="aria-label-filteractions" class="voice"><roundcube:label name="managesieve.arialabelfilteractions" /></h3> + <ul class="toolbarmenu" id="filtermenu-menu" role="menu" aria-labelledby="aria-label-filteractions"> + <li role="menuitem"><roundcube:button command="plugin.managesieve-act" label="managesieve.enable" classAct="active" /></li> + <li role="menuitem"><roundcube:button command="plugin.managesieve-del" label="delete" classAct="active" /></li> <roundcube:container name="filteroptions" id="filtermenu" /> </ul> </div> diff --git a/plugins/managesieve/skins/larry/templates/vacation.html b/plugins/managesieve/skins/larry/templates/vacation.html index c91eb87c8..26dd2027b 100644 --- a/plugins/managesieve/skins/larry/templates/vacation.html +++ b/plugins/managesieve/skins/larry/templates/vacation.html @@ -10,11 +10,13 @@ <div id="mainscreen" class="offset"> +<h1 class="voice"><roundcube:label name="settings" /> : <roundcube:label name="managesieve.vacation" /></h1> + <roundcube:include file="/includes/settingstabs.html" /> -<div id="managesieve-vacation" class="uibox contentbox"> +<div id="managesieve-vacation" class="uibox contentbox" role="main" aria-labelledby="aria-label-vacationform"> <div> - <h2 class="boxtitle"><roundcube:label name="managesieve.vacation" /></h2> + <h2 class="boxtitle" id="aria-label-vacationform"><roundcube:label name="managesieve.vacation" /></h2> <roundcube:object name="vacationform" id="vacationform" class="propform boxcontent tabbed" /> </div> <div class="footerleft formbuttons"> diff --git a/plugins/managesieve/tests/Vacation.php b/plugins/managesieve/tests/Vacation.php new file mode 100644 index 000000000..e34eb7aa2 --- /dev/null +++ b/plugins/managesieve/tests/Vacation.php @@ -0,0 +1,66 @@ +<?php + +class Managesieve_Vacation extends PHPUnit_Framework_TestCase +{ + + function setUp() + { + include_once dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_engine.php'; + include_once dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_vacation.php'; + } + + /** + * Plugin object construction test + */ + function test_constructor() + { + $vacation = new rcube_sieve_vacation(true); + + $this->assertInstanceOf('rcube_sieve_vacation', $vacation); + } + + function test_build_regexp_tests() + { + $tests = rcube_sieve_vacation::build_regexp_tests('2014-02-20', '2014-03-05', $error); + + $this->assertCount(2, $tests); + $this->assertSame('header', $tests[0]['test']); + $this->assertSame('regex', $tests[0]['type']); + $this->assertSame('received', $tests[0]['arg1']); + $this->assertSame('(20|21|22|23|24|25|26|27|28) Feb 2014', $tests[0]['arg2']); + $this->assertSame('header', $tests[1]['test']); + $this->assertSame('regex', $tests[1]['type']); + $this->assertSame('received', $tests[1]['arg1']); + $this->assertSame('([ 0]1|[ 0]2|[ 0]3|[ 0]4|[ 0]5) Mar 2014', $tests[1]['arg2']); + + $tests = rcube_sieve_vacation::build_regexp_tests('2014-02-20', '2014-01-05', $error); + + $this->assertSame(null, $tests); + $this->assertSame('managesieve.invaliddateformat', $error); + } + + function test_parse_regexp_tests() + { + $tests = array( + array( + 'test' => 'header', + 'type' => 'regex', + 'arg1' => 'received', + 'arg2' => '(20|21|22|23|24|25|26|27|28) Feb 2014', + ), + array( + 'test' => 'header', + 'type' => 'regex', + 'arg1' => 'received', + 'arg2' => '([ 0]1|[ 0]2|[ 0]3|[ 0]4|[ 0]5) Mar 2014', + ) + ); + + $result = rcube_sieve_vacation::parse_regexp_tests($tests); + + $this->assertCount(2, $result); + $this->assertSame('20 Feb 2014', $result['from']); + $this->assertSame('05 Mar 2014', $result['to']); + } +} + |