/* Redirect back to the options screen if ACL is not enabled. */
$prefs_url = IMP::prefsURL(true);
if ($prefs->isLocked('acl') || empty($_SESSION['imp']['acl'])) {
- $notification->push(_('Folder sharing is not enabled.'), 'horde.error');
+ $notification->push(_("Folder sharing is not enabled."), 'horde.error');
header('Location: ' . $prefs_url);
exit;
}
try {
$ACLDriver = IMP_Imap_Acl::singleton();
} catch (Horde_Exception $e) {
- $notification->push($error, _('This server does not support sharing folders.'));
+ $notification->push($error, _("This server does not support sharing folders."));
header('Location: ' . $prefs_url);
exit;
}
switch (Horde_Util::getFormData('actionID')) {
case 'imp_acl_set':
if (!$folder) {
- $notification->push(_('No folder selected.'), 'horde.error');
+ $notification->push(_("No folder selected."), 'horde.error');
$ok_form = false;
}
try {
$ACLDriver->editACL($folder, $new_user, $new_acl);
if (!count($new_acl)) {
- $notification->push(sprintf(_('All rights on folder "%s" successfully removed for user "%s".'), $folder, $new_user), 'horde.success');
+ $notification->push(sprintf(_("All rights on folder \"%s\" successfully removed for user \"%s\"."), $folder, $new_user), 'horde.success');
} else {
- $notification->push(sprintf(_('User "%s" successfully given the specified rights for the folder "%s".'), $new_user, $folder), 'horde.success');
+ $notification->push(sprintf(_("User \"%s\" successfully given the specified rights for the folder \"%s\"."), $new_user, $folder), 'horde.success');
}
} catch (Horde_Exception $e) {
$notification->push($e);
}
if (!$user) {
- $notification->push(_('No user specified.'), 'horde.error');
+ $notification->push(_("No user specified."), 'horde.error');
continue;
}
if (in_array($user, $protected)) {
if ($acl) {
- $notification->push(sprintf(_('Rights for user "%s" cannot be modified.'), $user), 'horde.error');
+ $notification->push(sprintf(_("Rights for user \"%s\" cannot be modified."), $user), 'horde.error');
}
continue;
}
try {
$ACLDriver->editACL($folder, $user, $acl);
if (!count($acl)) {
- $notification->push(sprintf(_('All rights on folder "%s" successfully removed for user "%s".'), $folder, $user), 'horde.success');
+ $notification->push(sprintf(_("All rights on folder \"%s\" successfully removed for user \"%s\"."), $folder, $user), 'horde.success');
} else {
- $notification->push(sprintf(_('User "%s" successfully given the specified rights for the folder "%s".'), $user, $folder), 'horde.success');
+ $notification->push(sprintf(_("User \"%s\" successfully given the specified rights for the folder \"%s\"."), $user, $folder), 'horde.success');
}
} catch (Horde_Exception $e) {
$notification->push($e);
$t->set('aclurl', Horde::applicationUrl('acl.php'));
$t->set('forminput', Horde_Util::formInput());
$t->set('aclnavcell', Horde_Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'acl'));
-$t->set('changefolder', Horde::link('#', _('Change Folder'), 'smallheader', '', '', '', '', array('id' => 'changefolder')));
-$t->set('sharedimg', Horde::img('shared.png', _('Change Folder')));
+$t->set('changefolder', Horde::link('#', _("Change Folder"), 'smallheader', '', '', '', '', array('id' => 'changefolder')));
+$t->set('sharedimg', Horde::img('shared.png', _("Change Folder")));
$t->set('options', IMP::flistSelect(array('selected' => $folder)));
-$t->set('current', sprintf(_('Current access to %s'), IMP::displayFolder($folder)));
+$t->set('current', sprintf(_("Current access to %s"), IMP::displayFolder($folder)));
$t->set('folder', $folder);
$t->set('noacl', !count($curr_acl));
$t->set('maxrule', 1);
if (in_array($user, $current_users)) {
continue;
}
- $new_user_field .= "\n<option>" . htmlspecialchars($user)
+ $new_user_field .= "\n" . '<option>' . htmlspecialchars($user)
. '</option>';
}
$new_user_field .= "\n</select>";
}
$list_msg = new IMP_Views_ListMessages();
- $res = $list_msg->listMessages($args);
+ $res = $list_msg->ListMessages($args);
// TODO: This can potentially be optimized for arrival time sort - if the
// cache ID changes, we know the changes must occur at end of mailbox.
try {
IMP::addAddress($email, $name);
$result = true;
- $notification->push(sprintf(_('%s was successfully added to your address book.'), $name ? $name : $email), 'horde.success');
+ $notification->push(sprintf(_("%s was successfully added to your address book."), $name ? $name : $email), 'horde.success');
} catch (Horde_Exception $e) {
$notification->push($e, 'horde.error');
$result = false;
);
$show_msg = new IMP_Views_ShowMessage();
- $result = (object)$show_msg->showMessage($args);
+ $result = (object) $show_msg->showMessage($args);
break;
case 'Html2Text':
if (!is_null($atc)) {
$imp_compose = IMP_Compose::singleton(Horde_Util::getPost('imp_compose'));
foreach ($imp_compose->deleteAttachment($atc) as $val) {
- $notification->push(sprintf(_('Deleted the attachment "%s".'), Horde_Mime::decode($val)), 'horde.success');
+ $notification->push(sprintf(_("Deleted the attachment \"%s\"."), Horde_Mime::decode($val)), 'horde.success');
}
}
break;
$expunge_count = count($expunged[$mbox]);
$display_folder = IMP::displayFolder($mbox);
if ($expunge_count == 1) {
- $notification->push(sprintf(_('1 message was purged from "%s".'), $display_folder), 'horde.success');
+ $notification->push(sprintf(_("1 message was purged from \"%s\"."), $display_folder), 'horde.success');
} else {
- $notification->push(sprintf(_('%s messages were purged from "%s".'), $expunge_count, $display_folder), 'horde.success');
+ $notification->push(sprintf(_("%s messages were purged from \"%s\"."), $expunge_count, $display_folder), 'horde.success');
}
$result = _generateDeleteResult($mbox, $expunged, $change);
// Need to manually set remove to true since we want to remove
$imptree = IMP_Imap_Tree::singleton();
$result = new stdClass;
- $result->add = (bool)$add;
+ $result->add = (bool) $add;
$result->folder = $mbox;
if ($add) {
if ($info = $imptree->getElementInfo($mbox)) {
$result->poll = array($mbox => $info['unseen']);
}
- $notification->push(sprintf(_('"%s" mailbox now polled for new mail.'), $display_folder), 'horde.success');
+ $notification->push(sprintf(_("\"%s\" mailbox now polled for new mail."), $display_folder), 'horde.success');
} else {
$imptree->removePollList($mbox);
- $notification->push(sprintf(_('"%s" mailbox no longer polled for new mail.'), $display_folder), 'horde.success');
+ $notification->push(sprintf(_("\"%s\" mailbox no longer polled for new mail."), $display_folder), 'horde.success');
}
break;
}
$imp_ui = new IMP_UI_Message();
- $imp_ui->mdnCheck($mbox, $index, $reset($fetch_ret[$index]['headertext']), true);
+ $imp_ui->MDNCheck($mbox, $index, $reset($fetch_ret[$index]['headertext']), true);
break;
case 'PGPSymmetric':
if ($imp_smime->storePassphrase($passphrase)) {
$result->success = 1;
} else {
- $result->error = _('Invalid passphrase entered.');
+ $result->error = _("Invalid passphrase entered.");
}
} else {
- $result->error = _('No passphrase entered.');
+ $result->error = _("No passphrase entered.");
}
} catch (Horde_Exception $e) {
$result->error = $e->getMessage();
if ($imp_pgp->storePassphrase(($action == 'PGPSymmetric') ? 'symmetric' : 'personal', $passphrase, Horde_Util::getFormData('symmetricid'))) {
$result->success = 1;
} else {
- $result->error = _('Invalid passphrase entered.');
+ $result->error = _("Invalid passphrase entered.");
}
} else {
- $result->error = _('No passphrase entered.');
+ $result->error = _("No passphrase entered.");
}
} catch (Horde_Exception $e) {
$result->error = $e->getMessage();
case 'Fetchmail':
$fetch_list = Horde_Util::getFormData('accounts');
if (empty($fetch_list)) {
- $result->error = _('No accounts selected.');
+ $result->error = _("No accounts selected.");
} else {
IMP_Fetchmail::fetchmail($fetch_list);
$result->success = 1;
// Lets see if we are even able to send the user an attachment.
if (!$conf['compose']['link_attachments']) {
- throw new Horde_Exception(_('Linked attachments are forbidden.'));
+ throw new Horde_Exception(_("Linked attachments are forbidden."));
}
// Gather required form variables.
$time_stamp = Horde_Util::getFormData('t');
$file_name = Horde_Util::getFormData('f');
if (is_null($mail_user) || is_null($time_stamp) || is_null($file_name)) {
- throw new Horde_Exception(_('The attachment was not found.'));
+ throw new Horde_Exception(_("The attachment was not found."));
}
// Initialize the VFS.
$vfsroot = VFS::singleton($conf['vfs']['type'], Horde::getDriverConfig('vfs', $conf['vfs']['type']));
if (is_a($vfsroot, 'PEAR_Error')) {
- throw new Horde_Exception(sprintf(_('Could not create the VFS backend: %s'), $vfsroot->getMessage()));
+ throw new Horde_Exception(sprintf(_("Could not create the VFS backend: %s"), $vfsroot->getMessage()));
}
// Check if the file exists.
$file_name = escapeshellcmd(basename($file_name));
$full_path = sprintf(IMP_Compose::VFS_LINK_ATTACH_PATH . '/%s/%d', $mail_user, $time_stamp);
if (!$vfsroot->exists($full_path, $file_name)) {
- throw new Horde_Exception(_('The specified attachment does not exist. It may have been deleted by the original sender.'));
+ throw new Horde_Exception(_("The specified attachment does not exist. It may have been deleted by the original sender."));
}
// Check to see if we need to send a verification message.
} elseif ($delete_id == $read_id) {
$vfsroot->deleteFile($full_path, $file_name);
$vfsroot->deleteFile($full_path, $file_name . '.notify');
- printf(_('Attachment %s deleted.'), $file_name);
+ printf(_("Attachment %s deleted."), $file_name);
exit;
}
} else {
/* Create a random identifier for this file. */
$id = uniqid(mt_rand());
- $res = $vfsroot->writeData($full_path, $file_name . '.notify', $id, true);
+ $res = $vfsroot->writeData($full_path, $file_name . '.notify' , $id, true);
if (is_a($res, 'PEAR_Error')) {
Horde::logMessage($res, __FILE__, __LINE__, PEAR_LOG_ERR);
} else {
$msg_headers->addHeader('Date', date('r'));
$msg_headers->addHeader('From', $mail_address_full);
$msg_headers->addHeader('To', $mail_address_full);
- $msg_headers->addHeader('Subject', _('Notification: Linked attachment downloaded'));
+ $msg_headers->addHeader('Subject', _("Notification: Linked attachment downloaded"));
$msg = new Horde_Mime_Part();
$msg->setType('text/plain');
$file_data = $vfsroot->read($full_path, $file_name);
if (is_a($file_data, 'PEAR_Error')) {
Horde::logMessage($file_data, __FILE__, __LINE__, PEAR_LOG_ERR);
- throw new Horde_Exception(_('The specified file cannot be read.'));
+ throw new Horde_Exception(_("The specified file cannot be read."));
}
$mime_type = Horde_Mime_Magic::analyzeData($file_data, isset($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null);
if ($mime_type === false) {
_removeAutoSaveDraft($old_index);
if ($action == 'auto_save_draft') {
- $notification->push(_('Draft automatically saved.'), 'horde.message');
+ $notification->push(_("Draft automatically saved."), 'horde.message');
} else {
$notification->push($res);
}
}
if ($sent && $prefs->getValue('compose_confirm')) {
- $notification->push(empty($header['subject']) ? _('Message sent successfully.') : sprintf(_('Message "%s" sent successfully.'), Horde_String::truncate($header['subject'])), 'horde.success');
+ $notification->push(empty($header['subject']) ? _("Message sent successfully.") : sprintf(_("Message \"%s\" sent successfully."), Horde_String::truncate($header['subject'])), 'horde.success');
}
/* Update maillog information. */
$index = Horde_Util::getFormData('uid');
$folder = Horde_Util::getFormData('folder');
$show_editor = false;
-$title = _('New Message');
+$title = _("New Message");
if (in_array($type, array('reply', 'reply_all', 'reply_list', 'forward', 'resume'))) {
if (!$index || !$folder) {
try {
$imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $folder);
} catch (Horde_Exception $e) {
- $notification->push(_('Requested message not found.'), 'horde.error');
+ $notification->push(_("Requested message not found."), 'horde.error');
$index = $folder = null;
$type = 'new';
}
$header['replytype'] = 'reply';
if ($type == 'reply') {
- $title = _('Reply:');
+ $title = _("Reply:");
} elseif ($type == 'reply_all') {
- $title = _('Reply to All:');
+ $title = _("Reply to All:");
} elseif ($type == 'reply_list') {
- $title = _('Reply to List:');
+ $title = _("Reply to List:");
}
$title .= ' ' . $header['subject'];
array('compose-dimp.js', 'imp', true)
);
-DIMP::header(_('Message Composition'), $scripts);
+DIMP::header(_("Message Composition"), $scripts);
echo $t->fetch('compose.html');
IMP::includeScriptFiles();
Horde::outputInlineScript();
$imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
return $imp_contents;
} catch (Horde_Exception $e) {
- $GLOBALS['notification']->push(_('Could not retrieve the message from the mail server.'), 'horde.error');
+ $GLOBALS['notification']->push(_("Could not retrieve the message from the mail server."), 'horde.error');
return false;
}
}
}
break;
-case _('Expand Names'):
+case _("Expand Names"):
$action = Horde_Util::getFormData('action');
$imp_ui = new IMP_UI_Compose();
$header['to'] = $imp_ui->expandAddresses(Horde_Util::getFormData('to'), $imp_compose);
$reply_msg = $imp_compose->replyMessage($actions[$actionID], $imp_contents, Horde_Util::getFormData('to'));
$header = $reply_msg['headers'];
- $notification->push(_('Reply text will be automatically appended to your outgoing message.'), 'horde.message');
+ $notification->push(_("Reply text will be automatically appended to your outgoing message."), 'horde.message');
break;
// 'f' = forward
$fwd_msg = $imp_compose->forwardMessage($imp_contents);
$header = $fwd_msg['headers'];
- $notification->push(_('Forwarded message will be automatically added to your outgoing message.'), 'horde.message');
+ $notification->push(_("Forwarded message will be automatically added to your outgoing message."), 'horde.message');
break;
-case _('Redirect'):
+case _("Redirect"):
if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
break;
}
try {
$imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents, Horde_Nls::getEmailCharset());
if ($prefs->getValue('compose_confirm')) {
- $notification->push(_('Message redirected successfully.'), 'horde.success');
+ $notification->push(_("Message redirected successfully."), 'horde.success');
}
require IMP_BASE . '/mailbox-mimp.php';
exit;
}
break;
-case _('Send'):
+case _("Send"):
if ($compose_disable) {
break;
}
$delete_draft = $imp_message->delete($idx_array, array('nuke' => true));
}
- $notification->push(_('Message sent successfully.'), 'horde.success');
+ $notification->push(_("Message sent successfully."), 'horde.success');
require IMP_BASE . '/mailbox-mimp.php';
exit;
}
/* Get the message cache ID. */
$cacheID = $imp_compose->getCacheId();
-$title = _('Message Composition');
+$title = _("Message Composition");
$mimp_render->set('title', $title);
$select_list = $identity->getSelectList();
}
}
-$menu = new Horde_Mobile_card('o', _('Menu'));
+$menu = new Horde_Mobile_card('o', _("Menu"));
$mset = &$menu->add(new Horde_Mobile_linkset());
MIMP::addMIMPMenu($mset, 'compose');
function _popupSuccess()
{
$menu = new Horde_Menu(Horde_Menu::MASK_NONE);
- $menu->add(Horde::applicationUrl('compose.php'), _('New Message'), 'compose.png');
- $menu->add('', _('Close this window'), 'close.png', $GLOBALS['registry']->getImageDir('horde'), '', 'window.close();');
+ $menu->add(Horde::applicationUrl('compose.php'), _("New Message"), 'compose.png');
+ $menu->add('', _("Close this window"), 'close.png', $GLOBALS['registry']->getImageDir('horde'), '', 'window.close();');
require IMP_TEMPLATES . '/common-header.inc';
$success_template = new Horde_Template();
$success_template->set('menu', $menu->render());
$imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
return $imp_contents;
} catch (Horde_Exception $e) {
- $GLOBALS['notification']->push(_('Could not retrieve the message from the mail server.'), 'horde.error');
+ $GLOBALS['notification']->push(_("Could not retrieve the message from the mail server."), 'horde.error');
return false;
}
}
$notification->push($verified);
$actionID = null;
} elseif (!$verified) {
- $notification->push(_('You have already submitted this page.'), 'horde.error');
+ $notification->push(_("You have already submitted this page."), 'horde.error');
$actionID = null;
}
}
/* Initialize the IMP_Compose:: object. */
$imp_compose = IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
-$imp_compose->pgpAttachPubkey((bool)Horde_Util::getFormData('pgp_attach_pubkey'));
-$imp_compose->userLinkAttachments((bool)Horde_Util::getFormData('link_attachments'));
+$imp_compose->pgpAttachPubkey((bool) Horde_Util::getFormData('pgp_attach_pubkey'));
+$imp_compose->userLinkAttachments((bool) Horde_Util::getFormData('link_attachments'));
try {
- $imp_compose->attachVCard((bool)Horde_Util::getFormData('vcard'), $identity->getValue('fullname'));
+ $imp_compose->attachVCard((bool) Horde_Util::getFormData('vcard'), $identity->getValue('fullname'));
} catch (IMP_Compose_Exception $e) {
$notification->push($e);
}
$filenames = $imp_compose->deleteAttachment($deleteList);
if ($notify) {
foreach ($filenames as $val) {
- $notification->push(sprintf(_('Deleted the attachment "%s".'), Horde_Mime::decode($val)), 'horde.success');
+ $notification->push(sprintf(_("Deleted the attachment \"%s\"."), Horde_Mime::decode($val)), 'horde.success');
}
}
}
}
/* Run through the action handlers. */
-$title = _('New Message');
+$title = _("New Message");
switch ($actionID) {
case 'mailto':
if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
}
if ($actionID == 'reply') {
- $title = _('Reply:');
+ $title = _("Reply:");
} elseif ($actionID == 'reply_all') {
- $title = _('Reply to All:');
+ $title = _("Reply to All:");
} elseif ($actionID == 'reply_list') {
- $title = _('Reply to List:');
+ $title = _("Reply to List:");
}
$title .= ' ' . $header['subject'];
break;
case 'redirect_compose':
- $title = _('Redirect this message');
+ $title = _("Redirect this message");
break;
case 'redirect_send':
$imp_compose->destroy();
if ($isPopup) {
if ($prefs->getValue('compose_confirm')) {
- $notification->push(_('Message redirected successfully.'), 'horde.success');
+ $notification->push(_("Message redirected successfully."), 'horde.success');
_popupSuccess();
} else {
Horde_Util::closeWindowJS();
}
} else {
if ($prefs->getValue('compose_confirm')) {
- $notification->push(_('Message redirected successfully.'), 'horde.success');
+ $notification->push(_("Message redirected successfully."), 'horde.success');
}
header('Location: ' . _mailboxReturnURL(false));
}
if (Horde_Util::getFormData('resume_draft') &&
$prefs->getValue('auto_delete_drafts') &&
- ($thismailbox == IMP::folderPref($prefs->getValue('drafts_folder'), true))) {
+ ($thismailbox == IMP::folderPref($prefs->getValue('drafts_folder'), true))) {
$imp_message = IMP_Message::singleton();
$idx_array = array($index . IMP::IDX_SEP . $thismailbox);
if ($imp_message->delete($idx_array)) {
- $notification->push(_('The draft message was automatically deleted because it was successfully completed and sent.'), 'horde.success');
+ $notification->push(_("The draft message was automatically deleted because it was successfully completed and sent."), 'horde.success');
}
}
if ($isPopup) {
if ($prefs->getValue('compose_confirm') || !$sent) {
if ($sent) {
- $notification->push(_('Message sent successfully.'), 'horde.success');
+ $notification->push(_("Message sent successfully."), 'horde.success');
}
_popupSuccess();
} else {
}
} else {
if ($prefs->getValue('compose_confirm') && $sent) {
- $notification->push(_('Message sent successfully.'), 'horde.success');
+ $notification->push(_("Message sent successfully."), 'horde.success');
}
header('Location: ' . _mailboxReturnURL(false));
}
if (!empty($indices)) {
$msglist = unserialize(urldecode($indices));
$subject_header = $imp_compose->attachIMAPMessage($msglist);
- if ($subject_header !== false) {
+ if ($subject_header === false) {
+ // TODO: notification
+ } else {
$header['subject'] = $subject_header;
}
}
}
} catch (IMP_Compose_Exception $e) {
} catch (Horde_Exception $e) {
- $notification->push(_('PGP encryption cannot be used by default as public keys cannot be found for all recipients.'), 'horde.warning');
+ $notification->push(_("PGP encryption cannot be used by default as public keys cannot be found for all recipients."), 'horde.warning');
$encrypt_options = ($default_encrypt == IMP::PGP_ENCRYPT) ? IMP::ENCRYPT_NONE : IMP::PGP_SIGN;
}
}
if ($registry->hasMethod('contacts/search')) {
$t->set('has_search', true);
- $t->set('abook', Horde::link('#', _('Address Book'), 'widget', null, 'window.open(\'' . Horde_Util::addParameter(Horde::applicationUrl('contacts.php'), array('formname' => 'redirect', 'to_only' => 1)) . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '<br />' . _('Address Book') . '</a>');
+ $t->set('abook', Horde::link('#', _("Address Book"), 'widget', null, 'window.open(\'' . Horde_Util::addParameter(Horde::applicationUrl('contacts.php'), array('formname' => 'redirect', 'to_only' => 1)) . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>');
if (!$has_js) {
- $t->set('expand', Horde::link('#', _('Expand Names'), 'widget', null, '$("actionID").value="redirect_expand_addr";uniqSubmit();return false;') . Horde::img('expand.png') . '<br />' . _('Expand Names') . '</a>', true);
+ $t->set('expand', Horde::link('#', _("Expand Names"), 'widget', null, "$('actionID').value='redirect_expand_addr';uniqSubmit();return false;") . Horde::img('expand.png') . '<br />' . _("Expand Names") . '</a>', true);
}
}
- $t->set('to', Horde::label('to', _('To')));
+ $t->set('to', Horde::label('to', _("To")));
$tabindex = -1;
if (is_array($header['to'])) {
$entry['select_tabindex'] = ++$tabindex;
$entry['select_name'] = htmlspecialchars($to_item[0]);
$entry['select_to'] = array();
- for ($i = 1, $items = count($to_item); $i < $items; ++$i) {
+ for ($i = 1; $i < count($to_item); $i++) {
$entry['select_to'][] = array('val' => htmlspecialchars($to_item[$i]));
}
} else {
$t->set('title', htmlspecialchars($title));
$t->set('status', Horde_Util::bufferOutput(array('IMP', 'status')));
- $t->set('send_msg_ak', Horde::getAccessKeyAndTitle(_('_Send Message')));
+ $t->set('send_msg_ak', Horde::getAccessKeyAndTitle(_("_Send Message")));
if ($conf['user']['allow_folders'] && !$readonly_drafts) {
- $t->set('save_draft_ak', Horde::getAccessKeyAndTitle(_('Save _Draft')));
+ $t->set('save_draft_ak', Horde::getAccessKeyAndTitle(_("Save _Draft")));
}
$t->set('help_buttons', Horde_Help::link('imp', 'compose-buttons'));
$t->set('di_locked', $prefs->isLocked('default_identity'));
}
} else {
$select_list = $identity->getSelectList();
- $t->set('identity_label', Horde::label('identity', _('_Identity')));
+ $t->set('identity_label', Horde::label('identity', _("_Identity")));
$t->set('help_compose-from', Horde_Help::link('imp', 'compose-identity'));
$t->set('last_identity', $identity->getDefault());
$t->set('count_select_list', count($select_list) > 1);
$t->set('identity_text', htmlspecialchars($select_list[0]));
}
}
- $t->set('label_to', Horde::label('to', _('_To')));
+ $t->set('label_to', Horde::label('to', _("_To")));
- $addr_array = array('to' => _('_To'));
+ $addr_array = array('to' => _("_To"));
if ($prefs->getValue('compose_cc')) {
- $addr_array['cc'] = _('_Cc');
+ $addr_array['cc'] = _("_Cc");
}
if ($prefs->getValue('compose_bcc')) {
- $addr_array['bcc'] = _('_Bcc');
+ $addr_array['bcc'] = _("_Bcc");
}
$address_array = array();
$entry['select_tabindex'] = ++$tabindex;
$entry['select_name'] = htmlspecialchars($item[0]);
$entry['select_arr'] = array();
- for ($i = 1, $items = count($item); $i < $items; ++$i) {
+ for ($i = 1; $i < count($item); $i++) {
$entry['select_arr'][] = array('val' => htmlspecialchars($item[$i]));
}
$entry['input_value'] = null;
}
$t->set('addr', $address_array);
- $t->set('subject_label', Horde::label('subject', _('S_ubject')));
+ $t->set('subject_label', Horde::label('subject', _("S_ubject")));
$t->set('subject_tabindex', ++$tabindex);
$t->set('subject', htmlspecialchars($header['subject']));
$t->set('help-subject', Horde_Help::link('imp', 'compose-subject'));
$t->set('set_priority', $prefs->getValue('set_priority'));
$t->set('unlocked_charset', !$prefs->isLocked('sending_charset'));
if ($t->get('unlocked_charset')) {
- $t->set('charset_label', Horde::label('charset', _('C_harset')));
+ $t->set('charset_label', Horde::label('charset', _("C_harset")));
$t->set('charset_tabindex', ++$tabindex);
$charset_array = array();
foreach (Horde_Nls::$config['encodings'] as $charset => $label) {
$t->set('help_compose_charset', Horde_Help::link('imp', 'compose-charset'));
}
if ($t->get('set_priority')) {
- $t->set('priority_label', Horde::label('priority', _('_Priority')));
+ $t->set('priority_label', Horde::label('priority', _("_Priority")));
$t->set('priority_tabindex', ++$tabindex);
$priority = Horde_Util::getFormData('x_priority', 3);
$priorities = array(
- 1 => '1 (' . _('Highest') . ')',
- 2 => '2 (' . _('High') . ')',
- 3 => '3 (' . _('Normal') . ')',
- 4 => '4 (' . _('Low') . ')',
- 5 => '5 (' . _('Lowest') . ')'
+ 1 => '1 (' . _("Highest") . ')',
+ 2 => '2 (' . _("High") . ')',
+ 3 => '3 (' . _("Normal") . ')',
+ 4 => '4 (' . _("Low") . ')',
+ 5 => '5 (' . _("Lowest") . ')'
);
$priority_option = array();
foreach ($priorities as $key => $val) {
$t->set('stationery', !empty($stationery_list));
if ($t->get('stationery')) {
- $t->set('stationery_label', Horde::label('stationery', _('Stationery')));
+ $t->set('stationery_label', Horde::label('stationery', _("Stationery")));
$stationeries = array();
foreach ($stationery_list as $id => $choice) {
$stationeries[] = array('val' => $id, 'label' => $choice['n'], 'selected' => ($stationery === $id));
$compose_options[] = array(
'url' => Horde::link('#', '', 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php') . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;'),
'img' => Horde::img('addressbook_browse.png'),
- 'label' => $show_text ? _('Address Book') : '');
+ 'label' => $show_text ? _("Address Book") : '');
if (!$has_js) {
$compose_options[] = array(
'url' => Horde::link(
'#', '', 'widget', null,
"uniqSubmit('compose_expand_addr'); return false;",
- '', '', array('name' => 'btn_compose_expand_addr')
- ),
+ '', '', array('name' => 'btn_compose_expand_addr')),
'img' => Horde::img('expand.png'),
- 'label' => $show_text ? _('Expand Names') : '');
+ 'label' => $show_text ? _("Expand Names") : '');
}
}
if ($spellcheck) {
$compose_options[] = array(
'url' => Horde::link('#attachments', '', 'widget'),
'img' => Horde::img('manage_attachments.png'),
- 'label' => $show_text ? _('Attachments') : ''
+ 'label' => $show_text ? _("Attachments") : ''
);
}
$t->set('compose_options', $compose_options);
$t->set('ssm', ($conf['user']['allow_folders'] && !$prefs->isLocked('save_sent_mail')));
if ($t->get('ssm')) {
if ($readonly_sentmail) {
- $notification->push(sprintf(_('Cannot save sent-mail message to "%s" as that mailbox is read-only.'), $sent_mail_folder), 'horde.warning');
+ $notification->push(sprintf(_("Cannot save sent-mail message to \"%s\" as that mailbox is read-only.", $sent_mail_folder), 'horde.warning'));
}
$t->set('ssm_selected', $token ? ($save_sent_mail == 'on') : $identity->saveSentmail());
- $t->set('ssm_label', Horde::label('ssm', _('Sa_ve a copy in ')));
+ $t->set('ssm_label', Horde::label('ssm', _("Sa_ve a copy in ")));
if ($smf = Horde_Util::getFormData('sent_mail_folder')) {
$sent_mail_folder = $smf;
}
$d_read = $prefs->getValue('disposition_request_read');
$t->set('rrr', $conf['compose']['allow_receipts'] && ($d_read != 'never'));
if ($t->get('rrr')) {
- $t->set('rrr_selected', ($d_read != 'ask') || (Horde_Util::getFormData('request_read_receipt') == 'on'));
- $t->set('rrr_label', Horde::label('rrr', _('Request a _Read Receipt')));
+ $t->set('rrr_selected', ($d_read != 'ask') || (Horde_Util::getFormData('request_read_receipt') == 'on'));
+ $t->set('rrr_label', Horde::label('rrr', _("Request a _Read Receipt")));
}
$t->set('compose_html', (!is_null($rtemode) && !$prefs->isLocked('compose_html')));
if ($t->get('compose_html')) {
- $t->set('html_img', Horde::img('compose.png', _('Switch Composition Method')));
- $t->set('html_switch', Horde::link('#', _('Switch Composition Method'), '', '', '$("rtemode").value="' . ($rtemode ? 0 : 1) . '";uniqSubmit();return false;'));
+ $t->set('html_img', Horde::img('compose.png', _("Switch Composition Method")));
+ $t->set('html_switch', Horde::link('#', _("Switch Composition Method"), '', '', "$('rtemode').value='" . ($rtemode ? 0 : 1) . "';uniqSubmit();return false;"));
$t->set('rtemode', $rtemode);
}
- $t->set('message_label', Horde::label('message', _('Te_xt')));
+ $t->set('message_label', Horde::label('message', _("Te_xt")));
$t->set('message_tabindex', ++$tabindex);
$t->set('message', htmlspecialchars($msg));
if ($prefs->isLocked('default_encrypt')) {
$t->set('use_encrypt', false);
} else {
- $t->set('encrypt_label', Horde::label('encrypt_options', _('Encr_yption Options')));
+ $t->set('encrypt_label', Horde::label('encrypt_options', _("Encr_yption Options")));
$t->set('encrypt_options', IMP::encryptList($encrypt_options));
$t->set('help-encrypt', Horde_Help::link('imp', 'compose-options-encrypt'));
}
$t->set('pgp_options', ($prefs->getValue('use_pgp') && $prefs->getValue('pgp_public_key')));
if ($t->get('pgp_options')) {
$t->set('pgp_attach_pubkey', Horde_Util::getFormData('pgp_attach_pubkey', $prefs->getValue('pgp_attach_pubkey')));
- $t->set('pap', Horde::label('pap', _('Attach a copy of your PGP public key to the message?')));
+ $t->set('pap', Horde::label('pap', _("Attach a copy of your PGP public key to the message?")));
$t->set('help-pubkey', Horde_Help::link('imp', 'pgp-compose-attach-pubkey'));
}
}
if ($registry->hasMethod('contacts/ownVCard')) {
- $t->set('vcard', Horde::label('vcard', _('Attach your contact information to the message?')));
+ $t->set('vcard', Horde::label('vcard', _("Attach your contact information to the message?")));
$t->set('attach_vcard', Horde_Util::getFormData('vcard'));
}
if ($_SESSION['imp']['file_upload']) {
$localeinfo = Horde_Nls::getLocaleInfo();
try {
- $t->set('selectlistlink', $GLOBALS['registry']->call('files/selectlistLink', array(_('Attach Files'), 'widget', 'compose', true)));
+ $t->set('selectlistlink', $GLOBALS['registry']->call('files/selectlistLink', array(_("Attach Files"), 'widget', 'compose', true)));
} catch (Horde_Exception $e) {
$t->set('selectlistlink', null);
}
$attach_options = array();
if ($show_save_attach) {
$save_attach_val = Horde_Util::getFormData('save_attachments_select', ($save_attach == 'prompt_yes'));
- $attach_options[] = array('label' => _('Save Attachments with message in sent-mail folder?'), 'name' => 'save_attachments_select', 'select_yes' => ($save_attach_val == 1), 'select_no' => ($save_attach_val == 0), 'help' => Horde_Help::link('imp', 'compose-save-attachments'));
+ $attach_options[] = array('label' => _("Save Attachments with message in sent-mail folder?"), 'name' => 'save_attachments_select', 'select_yes' => ($save_attach_val == 1), 'select_no' => ($save_attach_val == 0), 'help' => Horde_Help::link('imp', 'compose-save-attachments'));
}
if ($show_link_attach) {
$link_attach_val = Horde_Util::getFormData('link_attachments');
- $attach_options[] = array('label' => _('Link Attachments?'), 'name' => 'link_attachments', 'select_yes' => ($link_attach_val == 1), 'select_no' => ($link_attach_val == 0), 'help' => Horde_Help::link('imp', 'compose-link-attachments'));
+ $attach_options[] = array('label' => _("Link Attachments?"), 'name' => 'link_attachments', 'select_yes' => ($link_attach_val == 1), 'select_no' => ($link_attach_val == 0), 'help' => Horde_Help::link('imp', 'compose-link-attachments'));
}
$t->set('attach_options', $attach_options);
}
if ($type != 'application/octet-stream') {
$preview_url = Horde_Util::addParameter(Horde::applicationUrl('view.php'), array('actionID' => 'compose_attach_preview', 'id' => $atc_num, 'composeCache' => $composeCacheID));
- $entry['name'] = Horde::link($preview_url, _('Preview') . ' ' . $entry['name'], 'link', 'compose_preview_window') . $entry['name'] . '</a>';
+ $entry['name'] = Horde::link($preview_url, _("Preview") . ' ' . $entry['name'], 'link', 'compose_preview_window') . $entry['name'] . '</a>';
}
$atc[] = $entry;
$t->set('total_attach_size', number_format($imp_compose->sizeOfAttachments() / 1024, 2, $localeinfo['decimal_point'], $localeinfo['thousands_sep']));
$t->set('perc_attach', ((!empty($conf['compose']['attach_size_limit'])) && ($conf['compose']['attach_size_limit'] > 0)));
if ($t->get('perc_attach')) {
- $t->set('perc_attach', sprintf(_('%s%% of allowed size'), number_format($imp_compose->sizeOfAttachments() / $conf['compose']['attach_size_limit'] * 100, 2, $localeinfo['decimal_point'], $localeinfo['thousands_sep'])));
+ $t->set('perc_attach', sprintf(_("%s%% of allowed size"), number_format($imp_compose->sizeOfAttachments() / $conf['compose']['attach_size_limit'] * 100, 2, $localeinfo['decimal_point'], $localeinfo['thousands_sep'])));
}
$t->set('help-current-attachments', Horde_Help::link('imp', 'compose-current-attachments'));
}
// if (!function_exists('_imp_hook_mbox_redirect')) {
// function _imp_hook_mbox_redirect($mailbox)
// {
-// if ((strpos($mailbox, 'INBOX/Calendar') !== false) ||
+// if ((strpos($mailbox, "INBOX/Calendar") !== false) ||
// preg_match("!^user/[^/]+/Calendar!", $mailbox)) {
// return $GLOBALS['registry']->get('webroot', 'kronolith');
-// } elseif ((strpos($mailbox, 'INBOX/Tasks') !== false) ||
+// } elseif ((strpos($mailbox, "INBOX/Tasks") !== false) ||
// preg_match("!^user/[^/]+/Tasks!", $mailbox)) {
// return $GLOBALS['registry']->get('webroot', 'nag');
-// } elseif ((strpos($mailbox, 'INBOX/Notes') !== false) ||
+// } elseif ((strpos($mailbox, "INBOX/Notes") !== false) ||
// preg_match("!^user/[^/]+/Notes!", $mailbox)) {
// return $GLOBALS['registry']->get('webroot', 'mnemo');
-// } elseif ((strpos($mailbox, 'INBOX/Contacts') !== false) ||
+// } elseif ((strpos($mailbox, "INBOX/Contacts") !== false) ||
// preg_match("!^user/[^/]+/Contacts!", $mailbox)) {
// return $GLOBALS['registry']->get('webroot', 'turba');
// }
// $newmailboxes = array();
//
// foreach ($mailboxes as $box) {
-// $box = preg_replace('/^{[^}]+}/', '', $box);
-// if ((strpos($box, 'INBOX/Calendar') !== false) ||
-// preg_match('!^user/[^/]+/Calendar!', $box)) {
+// $box = preg_replace("/^{[^}]+}/", "", $box);
+// if ((strpos($box, "INBOX/Calendar") !== false) ||
+// preg_match("!^user/[^/]+/Calendar!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'kronolith.png',
// 'icondir' => $GLOBALS['registry']->getImageDir('kronolith')
-// 'alt' => _('Calendar')
+// 'alt' => _("Calendar")
// );
-// } elseif ((strpos($box, 'INBOX/Tasks') !== false) ||
-// preg_match('!^user/[^/]+/Tasks!', $box)) {
+// } elseif ((strpos($box, "INBOX/Tasks") !== false) ||
+// preg_match("!^user/[^/]+/Tasks!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'nag.png',
// 'icondir' => $GLOBALS['registry']->getImageDir('nag')
-// 'alt' => _('Tasks')
+// 'alt' => _("Tasks")
// );
-// } elseif ((strpos($box, 'INBOX/Notes') !== false) ||
-// preg_match('!^user/[^/]+/Notes!', $box)) {
+// } elseif ((strpos($box, "INBOX/Notes") !== false) ||
+// preg_match("!^user/[^/]+/Notes!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'mnemo.png',
// 'icondir' => $GLOBALS['registry']->getImageDir('mnemo')
-// 'alt' => _('Notes')
+// 'alt' => _("Notes")
// );
-// } elseif ((strpos($box, 'INBOX/Contacts') !== false) ||
-// preg_match('!^user/[^/]+/Contacts!', $box)) {
+// } elseif ((strpos($box, "INBOX/Contacts") !== false) ||
+// preg_match("!^user/[^/]+/Contacts!", $box)) {
// $newmailboxes[$box] = array(
// 'icon' => 'turba.png',
// 'icondir' => $GLOBALS['registry']->getImageDir('turba')
-// 'alt' => _('Contacts')
+// 'alt' => _("Contacts")
// );
// }
// }
$icons[$name] = array(
'icon' => 'kronolith.png',
'icondir' => $GLOBALS['registry']->getImageDir('kronolith'),
- 'alt' => _('Calendar')
+ 'alt' => _("Calendar")
);
break;
$icons[$name] = array(
'icon' => 'nag.png',
'icondir' => $GLOBALS['registry']->getImageDir('nag'),
- 'alt' => _('Tasks')
+ 'alt' => _("Tasks")
);
break;
$icons[$name] = array(
'icon' => 'mnemo.png',
'icondir' => $GLOBALS['registry']->getImageDir('mnemo'),
- 'alt' => _('Notes')
+ 'alt' => _("Notes")
);
break;
$icons[$name] = array(
'icon' => 'turba.png',
'icondir' => $GLOBALS['registry']->getImageDir('turba'),
- 'alt' => _('Contacts')
+ 'alt' => _("Contacts")
);
break;
$icons[$name] = array(
'icon' => 'prefs.png',
'icondir' => $GLOBALS['registry']->getImageDir('horde'),
- 'alt' => _('Preferences')
+ 'alt' => _("Preferences")
);
break;
}
$session = ssh2_connect($host);
if (!$session) {
- throw new Horde_Exception(_('Connection to server failed.'), 'horde.error');
+ throw new Horde_Exception(_("Connection to server failed."), 'horde.error');
}
if (!ssh2_auth_password($session, $user, $pass)) {
- throw new Horde_Exception(_('Authentication failed.'), 'horde.error');
+ throw new Horde_Exception(_("Authentication failed."), 'horde.error');
}
$stream = ssh2_exec($session, $command, false);
?>
<br />
-<table width="100%"><tr><td align="center"><?php echo Horde::img('horde-power1.png', _('Powered by Horde'), '', $registry->getImageDir('horde')) ?></td></tr></table>
+<table width="100%"><tr><td align="center"><?php echo Horde::img('horde-power1.png', _("Powered by Horde"), '', $registry->getImageDir('horde')) ?></td></tr></table>
$dimp_block_list = array();
// Show a folder summary of the mailbox. All polled folders are displayed.
-$dimp_block_list[_('Folder Summary')] = array(
+$dimp_block_list[_("Folder Summary")] = array(
'ob' => new IMP_Block_Foldersummary(array())
);
$is_pop3 = isset($_SESSION['imp']['protocol']) && ($_SESSION['imp']['protocol'] == 'pop');
$prefGroups['identities'] = array(
- 'column' => _('General Options'),
- 'label' => _('Personal Information'),
- 'desc' => _('Change the name, address, and signature that people see when they read and reply to your email.'),
+ 'column' => _("General Options"),
+ 'label' => _("Personal Information"),
+ 'desc' => _("Change the name, address, and signature that people see when they read and reply to your email."),
'members' => array('replyto_addr', 'alias_addr', 'tieto_addr', 'bcc_addr',
'signature', 'sig_dashes', 'sig_first',
'save_sent_mail', 'sent_mail_folder', 'sentmailselect')
if (!$is_pop3) {
$prefGroups['server'] = array(
- 'column' => _('General Options'),
- 'label' => _('Server and Folder Information'),
- 'desc' => _('Change mail server and folder settings.'),
+ 'column' => _("General Options"),
+ 'label' => _("Server and Folder Information"),
+ 'desc' => _("Change mail server and folder settings."),
'members' => array('use_vinbox', 'subscribe', 'draftsselect',
'trashselect', 'spamselect')
);
if (!empty($_SESSION['imp']['acl'])) {
$prefGroups['acl'] = array(
- 'column' => _('General Options'),
- 'label' => _('Share Folders'),
- 'desc' => _('Share your mail folders with other users.'),
+ 'column' => _("General Options"),
+ 'label' => _("Share Folders"),
+ 'desc' => _("Share your mail folders with other users."),
'url' => 'acl.php'
);
}
$prefGroups['logintasks'] = array(
- 'column' => _('General Options'),
- 'label' => _('Login Tasks'),
- 'desc' => sprintf(_('Customize tasks to run upon logon to %s.'), $GLOBALS['registry']->get('name')),
+ 'column' => _("General Options"),
+ 'label' => _("Login Tasks"),
+ 'desc' => sprintf(_("Customize tasks to run upon logon to %s."), $GLOBALS['registry']->get('name')),
'members' => array('delete_attachments_monthly',
'delete_attachments_monthly_keep')
);
}
$prefGroups['compose'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Message Composition'),
- 'desc' => _('Customize how you send mail.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Message Composition"),
+ 'desc' => _("Customize how you send mail."),
'members' => array('stationery_link', 'mailto_handler', 'compose_cc',
'compose_bcc', 'compose_spellcheck', 'compose_confirm',
'set_priority', 'compose_popup', 'compose_html',
}
$prefGroups['reply_forward'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Message Replies/Forwards'),
- 'desc' => _('Customize how you reply to or forward mail.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Message Replies/Forwards"),
+ 'desc' => _("Customize how you reply to or forward mail."),
'members' => array('reply_quote', 'reply_format', 'forward_bodytext',
'reply_headers', 'attrib_text')
);
$prefGroups['drafts'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Message Drafts'),
- 'desc' => _('Customize how to deal with message drafts.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Message Drafts"),
+ 'desc' => _("Customize how to deal with message drafts."),
'members' => array('draftsselect', 'close_draft', 'unseen_drafts',
'auto_save_drafts', 'auto_delete_drafts')
);
$prefGroups['viewing'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Message Viewing'),
- 'desc' => _('Configure how messages are displayed.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Message Viewing"),
+ 'desc' => _("Configure how messages are displayed."),
'members' => array('filtering', 'strip_attachments',
'html_image_replacement', 'html_image_addrbook',
'highlight_text', 'highlight_simple_markup',
}
$prefGroups['delmove'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Deleting and Moving Messages'),
- 'desc' => _('Set preferences for what happens when you move and delete messages.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Deleting and Moving Messages"),
+ 'desc' => _("Set preferences for what happens when you move and delete messages."),
'members' => array('mailbox_return', 'delete_spam_after_report',
'empty_spam_menu')
);
}
$prefGroups['newmail'] = array(
- 'column' => _('Message Options'),
- 'label' => _('New Mail'),
- 'desc' => _('Control when new mail will be checked for, and whether or not to notify you when it arrives.'),
+ 'column' => _("Message Options"),
+ 'label' => _("New Mail"),
+ 'desc' => _("Control when new mail will be checked for, and whether or not to notify you when it arrives."),
'members' => array('refresh_time', 'nav_poll_all', 'nav_popup', 'soundselect')
);
if (!empty($GLOBALS['conf']['mailbox']['show_preview'])) {
$prefGroups['mailpreview'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Mail Previews'),
- 'desc' => _('Configure mail preview options.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Mail Previews"),
+ 'desc' => _("Configure mail preview options."),
'members' => array('preview_enabled', 'preview_maxlen', 'preview_strip_nl', 'preview_show_unread', 'preview_show_tooltip')
);
}
if (!$is_pop3) {
$prefGroups['flags'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Message Flags'),
- 'desc' => _('Customize flag highlighting.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Message Flags"),
+ 'desc' => _("Customize flag highlighting."),
'members' => array('flagmanagement')
);
$prefGroups['fetchmail'] = array(
- 'column' => _('Message Options'),
- 'label' => _('Fetch Mail'),
- 'desc' => _('Customize accounts for fetching mail from other accounts.'),
+ 'column' => _("Message Options"),
+ 'label' => _("Fetch Mail"),
+ 'desc' => _("Customize accounts for fetching mail from other accounts."),
'members' => array('fetchmail_link', 'fetchmail_menu')
);
}
$prefGroups['display'] = array(
- 'column' => _('Other Options'),
- 'label' => _('Mailbox and Folder Display Options'),
- 'desc' => _('Change display options such as how many messages you see on each page and how messages are sorted.'),
+ 'column' => _("Other Options"),
+ 'label' => _("Mailbox and Folder Display Options"),
+ 'desc' => _("Change display options such as how many messages you see on each page and how messages are sorted."),
'members' => array('mailbox_start', 'sortby', 'sortdir', 'max_msgs',
'from_link', 'time_format', 'atc_flag')
);
}
$prefGroups['filters'] = array(
- 'column' => _('Other Options'),
- 'label' => _('Filters'),
- 'desc' => _('Create filtering rules to organize your incoming mail, sort it into folders, and delete spam.'),
+ 'column' => _("Other Options"),
+ 'label' => _("Filters"),
+ 'desc' => _("Create filtering rules to organize your incoming mail, sort it into folders, and delete spam."),
'url' => 'filterprefs.php'
);
$prefGroups['addressbooks'] = array(
- 'column' => _('Other Options'),
- 'label' => _('Address Books'),
- 'desc' => _('Select address book sources for adding and searching for addresses.'),
+ 'column' => _("Other Options"),
+ 'label' => _("Address Books"),
+ 'desc' => _("Select address book sources for adding and searching for addresses."),
'members' => array('save_recipients', 'display_contact', 'sourceselect')
);
$prefGroups['events'] = array(
- 'column' => _('Other Options'),
- 'label' => _('Event Requests'),
- 'desc' => _('Customize how should be dealt with event or meeting requests.'),
+ 'column' => _("Other Options"),
+ 'label' => _("Event Requests"),
+ 'desc' => _("Customize how should be dealt with event or meeting requests."),
'members' => array('conflict_interval')
);
if (isset($GLOBALS['conf']['gnupg']['path'])) {
$prefGroups['pgp'] = array(
- 'column' => _('Other Options'),
- 'label' => _('PGP Options'),
- 'desc' => sprintf(_('Control PGP support for %s.'), $GLOBALS['registry']->get('name')),
+ 'column' => _("Other Options"),
+ 'label' => _("PGP Options"),
+ 'desc' => sprintf(_("Control PGP support for %s."), $GLOBALS['registry']->get('name')),
'url' => 'pgp.php'
);
}
if (Horde_Util::extensionExists('openssl') && isset($GLOBALS['conf']['openssl']['path'])) {
$prefGroups['smime'] = array(
- 'column' => _('Other Options'),
- 'label' => _('S/MIME Options'),
- 'desc' => sprintf(_('Control S/MIME support for %s.'), $GLOBALS['registry']->get('name')),
+ 'column' => _("Other Options"),
+ 'label' => _("S/MIME Options"),
+ 'desc' => sprintf(_("Control S/MIME support for %s."), $GLOBALS['registry']->get('name')),
'url' => 'smime.php'
);
}
$prefGroups['mimp'] = array(
- 'column' => _('Other Options'),
- 'label' => _('MIMP Options'),
- 'desc' => _('Configure MIMP Options.'),
+ 'column' => _("Other Options"),
+ 'label' => _("MIMP Options"),
+ 'desc' => _("Configure MIMP Options."),
'members' => array('mimp_preview_msg')
);
$prefGroups['dimp'] = array(
- 'column' => _('Other Options'),
- 'label' => _('DIMP Options'),
- 'desc' => _('Configure DIMP Options.'),
+ 'column' => _("Other Options"),
+ 'label' => _("DIMP Options"),
+ 'desc' => _("Configure DIMP Options."),
'members' => array('dimp_login_view')
);
'locked' => false,
'shared' => false,
'type' => 'text',
- 'desc' => _('Your Reply-to: address: <em>(optional)</em>'));
+ 'desc' => _("Your Reply-to: address: <em>(optional)</em>"));
// user preferred alias addresses
$_prefs['alias_addr'] = array(
'locked' => false,
'shared' => false,
'type' => 'textarea',
- 'desc' => _('Your alias addresses: <em>(optional, enter each address on a new line)</em>'));
+ 'desc' => _("Your alias addresses: <em>(optional, enter each address on a new line)</em>"));
// user preferred 'tie to' addresses
$_prefs['tieto_addr'] = array(
'locked' => false,
'shared' => false,
'type' => 'textarea',
- 'desc' => _('Addresses to explicitly tie to this identity: <em>(optional, enter each address on a new line)</em>'));
+ 'desc' => _("Addresses to explicitly tie to this identity: <em>(optional, enter each address on a new line)</em>"));
// Automatically Bcc addresses when composing
$_prefs['bcc_addr'] = array(
'locked' => false,
'shared' => false,
'type' => 'textarea',
- 'desc' => _('Addresses to BCC all messages: <em>(optional, enter each address on a new line)</em>'));
+ 'desc' => _("Addresses to BCC all messages: <em>(optional, enter each address on a new line)</em>"));
// user signature
$_prefs['signature'] = array(
'locked' => false,
'shared' => false,
'type' => 'textarea',
- 'desc' => _('Your signature:'));
+ 'desc' => _("Your signature:"));
// precede the signature with dashes ('-- ')?
$_prefs['sig_dashes'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Precede your signature with dashes ("-- ")?'));
+ 'desc' => _("Precede your signature with dashes ('-- ')?"));
// signature before replies and forwards?
$_prefs['sig_first'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Place your signature before replies and forwards?'));
+ 'desc' => _("Place your signature before replies and forwards?"));
// save a copy of sent messages?
$_prefs['save_sent_mail'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Save sent mail?'));
+ 'desc' => _("Save sent mail?"));
// sent mail folder
$_prefs['sent_mail_folder'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Display Virtual Inbox?'));
+ 'desc' => _("Display Virtual Inbox?"));
// use IMAP subscribe?
$_prefs['subscribe'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Use IMAP folder subscriptions?'));
+ 'desc' => _("Use IMAP folder subscriptions?"));
// drafts folder selection widget. includes some javascript, so it's specific
// to IMP.
// Listing of Horde_LoginTasks constants -> strings
$logintasks_labels = array(
- Horde_LoginTasks::YEARLY => _('Yearly'),
- Horde_LoginTasks::MONTHLY => _('Monthly'),
- Horde_LoginTasks::WEEKLY => _('Weekly'),
- Horde_LoginTasks::DAILY => _('Daily'),
- Horde_LoginTasks::EVERY => _('Every Login')
+ Horde_LoginTasks::YEARLY => _("Yearly"),
+ Horde_LoginTasks::MONTHLY => _("Monthly"),
+ Horde_LoginTasks::WEEKLY => _("Weekly"),
+ Horde_LoginTasks::DAILY => _("Daily"),
+ Horde_LoginTasks::EVERY => _("Every Login")
);
// select widget for the initial_page preference
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Rename sent-mail folder at beginning of month?'),
+ 'desc' => _("Rename sent-mail folder at beginning of month?"),
'help' => 'prefs-rename_sentmail_monthly');
// delete sent-mail folders every month?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Delete old sent-mail folders at beginning of month?'),
+ 'desc' => _("Delete old sent-mail folders at beginning of month?"),
'help' => 'prefs-delete_sentmail_monthly');
// how many old sent-mail folders to keep every month?
'locked' => false,
'shared' => false,
'type' => 'number',
- 'desc' => _('Number of old sent-mail folders to keep if deleting monthly.'),
+ 'desc' => _("Number of old sent-mail folders to keep if deleting monthly."),
'help' => 'prefs-delete_sentmail_monthly_keep');
// purge sent-mail folder?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Purge old messages in the sent-mail folder(s)?'),
+ 'desc' => _("Purge old messages in the sent-mail folder(s)?"),
'help' => 'prefs-purge_sentmail');
// how often to purge the Sent-Mail folder?
'shared' => false,
'type' => 'enum',
'enum' => $logintasks_labels,
- 'desc' => _('Purge sent-mail how often:'),
+ 'desc' => _("Purge sent-mail how often:"),
'help' => 'prefs-purge_sentmail_interval');
// when purging sent-mail folder, purge messages older than how many days?
'locked' => false,
'shared' => false,
'type' => 'number',
- 'desc' => _('Purge messages in sent-mail folder(s) older than this amount of days.'),
+ 'desc' => _("Purge messages in sent-mail folder(s) older than this amount of days."),
'help' => 'prefs-purge_sentmail_keep');
// purge old attachments every month?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Delete old linked attachments at beginning of month?'),
+ 'desc' => _("Delete old linked attachments at beginning of month?"),
'help' => 'prefs-delete_attachments_monthly');
// how many old months of attachments to keep?
'locked' => false,
'shared' => false,
'type' => 'number',
- 'desc' => _('Number of months to keep old linked attachments if deleting monthly.'),
+ 'desc' => _("Number of months to keep old linked attachments if deleting monthly."),
'help' => 'prefs-delete_attachments_monthly_keep');
// purge Spam folder?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Purge old messages in the Spam folder?'),
+ 'desc' => _("Purge old messages in the Spam folder?"),
'help' => 'prefs-purge_spam');
// how often to purge the Spam folder?
'shared' => false,
'type' => 'enum',
'enum' => $logintasks_labels,
- 'desc' => _('Purge Spam how often:'),
+ 'desc' => _("Purge Spam how often:"),
'help' => 'prefs-purge_spam_interval');
// when purging Spam folder, purge messages older than how many days?
'locked' => false,
'shared' => false,
'type' => 'number',
- 'desc' => _('Purge messages in Spam folder older than this amount of days.'),
+ 'desc' => _("Purge messages in Spam folder older than this amount of days."),
'help' => 'prefs-purge_spam_keep');
// purge Trash folder?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Purge old messages in the Trash folder?'),
+ 'desc' => _("Purge old messages in the Trash folder?"),
'help' => 'prefs-purge_trash');
// how often to purge the Trash folder?
'shared' => false,
'type' => 'enum',
'enum' => $logintasks_labels,
- 'desc' => _('Purge Trash how often:'),
+ 'desc' => _("Purge Trash how often:"),
'help' => 'prefs-purge_trash_interval');
// when purging Trash folder, purge messages older than how many days?
'locked' => false,
'shared' => false,
'type' => 'number',
- 'desc' => _('Purge messages in Trash folder older than this amount of days.'),
+ 'desc' => _("Purge messages in Trash folder older than this amount of days."),
'help' => 'prefs-purge_trash_keep');
// End Login Tasks preferences
$_prefs['stationery_link'] = array(
'type' => 'link',
'url' => 'stationery.php',
- 'desc' => _('To the stationery and form responses.'));
+ 'desc' => _("To the stationery and form responses."));
$_prefs['stationery'] = array(
// value = serialize(array())
$_prefs['mailto_handler'] = array(
'type' => 'link',
'xurl' => 'javascript:if(typeof navigator.registerProtocolHandler==\'undefined\')alert(\''
- . addslashes(_('Your browser does not support this feature.'))
+ . addslashes(_("Your browser does not support this feature."))
. '\');else navigator.registerProtocolHandler(\'mailto\',\''
. Horde_Util::addParameter(Horde::applicationUrl('compose.php', true),
array('actionID' => 'mailto_link', 'to' => ''), false)
. '%s\',\'' . $GLOBALS['registry']->get('name') . '\');',
- 'desc' => sprintf(_('Click here to open all mailto: links in %s.'), $GLOBALS['registry']->get('name')));
+ 'desc' => sprintf(_("Click here to open all mailto: links in %s."), $GLOBALS['registry']->get('name')));
// Show Cc: field?
$_prefs['compose_cc'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Show the Cc: header field when composing mail?')
+ 'desc' => _("Show the Cc: header field when composing mail?")
);
// Show Bcc: field?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Show the Bcc: header field when composing mail?')
+ 'desc' => _("Show the Bcc: header field when composing mail?")
);
// Check spelling before sending the message?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Check spelling before sending a message?'));
+ 'desc' => _("Check spelling before sending a message?"));
// confirm successful sending of messages?
$_prefs['compose_confirm'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Display confirmation after sending a message?'));
+ 'desc' => _("Display confirmation after sending a message?"));
// allow the user to add a "X-Priority" header when composing messages?
$_prefs['set_priority'] = array(
'locked' => true,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Set the X-Priority header when composing messages?'));
+ 'desc' => _("Set the X-Priority header when composing messages?"));
// compose in a separate window?
$_prefs['compose_popup'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Compose messages in a separate window?')
+ 'desc' => _("Compose messages in a separate window?")
);
// If browser supports the HTML editor, should we compose in HTML mode by
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Compose messages with an HTML GUI by default (if browser supports the feature)?')
+ 'desc' => _("Compose messages with an HTML GUI by default (if browser supports the feature)?")
);
// The list of buttons to show in FCKeditor
'locked' => true,
'shared' => false,
'type' => 'textarea',
- 'desc' => _('The buttons to show when using the HTML editor.')
+ 'desc' => _("The buttons to show when using the HTML editor.")
);
// default outgoing mail domain and address completion
'locked' => false,
'shared' => false,
'type' => 'text',
- 'desc' => _('When sending mail or expanding addresses, what domain should we append to unqualified addresses (email addresses without "@")?'));
+ 'desc' => _("When sending mail or expanding addresses, what domain should we append to unqualified addresses (email addresses without \"@\")?"));
// Where should the cursor be located in the compose text area by default?
$_prefs['compose_cursor'] = array(
'locked' => false,
'shared' => false,
'type' => 'enum',
- 'enum' => array('top' => _('Top'),
- 'bottom' => _('Bottom'),
- 'sig' => _('Before Signature')),
- 'desc' => _('Where should the cursor be located in the compose text area by default?')
+ 'enum' => array('top' => _("Top"),
+ 'bottom' => _("Bottom"),
+ 'sig' => _("Before Signature")),
+ 'desc' => _("Where should the cursor be located in the compose text area by default?")
);
// Select widget for the possible charsets
'locked' => false,
'shared' => true,
'type' => 'enum',
- 'enum' => array_merge(array('' => _('Default')), Horde_Nls::$config['encodings']),
- 'desc' => _('Your default charset for sending messages:'));
+ 'enum' => array_merge(array('' => _("Default")), Horde_Nls::$config['encodings']),
+ 'desc' => _("Your default charset for sending messages:"));
// Select widget for the 'default_encrypt' preference
$_prefs['encryptselect'] = array('type' => 'special');
'shared' => false,
'type' => 'enum',
'enum' => array(
- 'always' => _('Always save attachments'),
- 'prompt_yes' => _('Prompt every time an attachment is sent; default to YES'),
- 'prompt_no' => _('Prompt every time an attachment is sent; default to NO'),
- 'never' => _('Never save attachments')
+ 'always' => _("Always save attachments"),
+ 'prompt_yes' => _("Prompt every time an attachment is sent; default to YES"),
+ 'prompt_no' => _("Prompt every time an attachment is sent; default to NO"),
+ 'never' => _("Never save attachments")
),
- 'desc' => _('When saving sent-mail, should we save attachment data?'),
+ 'desc' => _("When saving sent-mail, should we save attachment data?"),
'help' => 'prefs-save_attachments');
// Disposition Notification Preferences
'locked' => false,
'shared' => false,
'type' => 'enum',
- 'enum' => array('never' => _('Never'),
- 'ask' => _('Ask'),
- 'always' => _('Always')),
- 'desc' => _('Request read receipts?'),
+ 'enum' => array('never' => _("Never"),
+ 'ask' => _("Ask"),
+ 'always' => _("Always")),
+ 'desc' => _("Request read receipts?"),
'help' => 'prefs-disposition_request_read'
);
'locked' => true,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Include original message in a reply?'));
+ 'desc' => _("Include original message in a reply?"));
// When replying/forwarding to a message, should we use the same format as the
// original message?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('When replying/forwarding to a message, should we use the same format as the original message?'));
+ 'desc' => _("When replying/forwarding to a message, should we use the same format as the original message?"));
// Should the original message be included?
$_prefs['forward_bodytext'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Include body text in forward message by default?'));
+ 'desc' => _("Include body text in forward message by default?"));
// Reply to header summary - leave a brief summary of the header inside
// the message.
$_prefs['reply_headers'] = array(
- 'desc' => _('Include a brief summary of the header in a reply?'),
+ 'desc' => _("Include a brief summary of the header in a reply?"),
'value' => 0,
'locked' => false,
'shared' => false,
// How should we attribute quoted lines in a reply
$_prefs['attrib_text'] = array(
- 'value' => _('Quoting %f:'),
+ 'value' => _("Quoting %f:"),
'locked' => false,
'shared' => false,
'type' => 'text',
- 'desc' => _('How to attribute quoted lines in a reply'),
+ 'desc' => _("How to attribute quoted lines in a reply"),
'help' => 'prefs-attrib_text');
// End Message Replies/Forwards preferences
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Should the compose window be closed after saving a draft?'));
+ 'desc' => _("Should the compose window be closed after saving a draft?"));
// save drafts as seen or unseen
$_prefs['unseen_drafts'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Save drafts as unseen?'));
+ 'desc' => _("Save drafts as unseen?"));
// auto-save drafts? value is in minutes, 0 == don't save.
// Only works w/DIMP
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('No'),
- 1 => _('Every minute'),
- 5 => _('Every 5 minutes')
+ 0 => _("No"),
+ 1 => _("Every minute"),
+ 5 => _("Every 5 minutes")
),
- 'desc' => _('Save drafts automatically while composing?'),
+ 'desc' => _("Save drafts automatically while composing?"),
);
// delete draft after resume & send?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Automatically delete draft after successfully resuming and sending message?')
+ 'desc' => _("Automatically delete draft after successfully resuming and sending message?")
);
// End Message Drafts preferences
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Filter message content for profanity?'));
+ 'desc' => _("Filter message content for profanity?"));
// Should we display an icon to strip attachments?
$_prefs['strip_attachments'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Show an icon to allow stripping of attachments from messages?'));
+ 'desc' => _("Show an icon to allow stripping of attachments from messages?"));
// What should we do with spam messages after reporting them?
$_prefs['delete_spam_after_report'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('Nothing'),
- 1 => _('Delete spam messages')
+ 0 => _("Nothing"),
+ 1 => _("Delete spam messages")
),
- 'desc' => _('What should we do with spam messages after they have been reported as spam or innocent?'),
+ 'desc' => _("What should we do with spam messages after they have been reported as spam or innocent?"),
'help' => 'prefs-delete_spam_after_report'
);
if (!$is_pop3) {
$_prefs['delete_spam_after_report']['enum'][2] =
- _('Move spam messages to spam folder and innocent messages to INBOX');
+ _("Move spam messages to spam folder and innocent messages to INBOX");
}
// Replace image tags in inline viewed HTML messages with blank images?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Block images in inline viewed HTML messages unless they are specifically requested?'),
+ 'desc' => _("Block images in inline viewed HTML messages unless they are specifically requested?"),
'help' => 'prefs-html_image_replacement'
);
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Automatically show images in inline viewed HTML messages when the sender is in my address book?'),
+ 'desc' => _("Automatically show images in inline viewed HTML messages when the sender is in my address book?"),
'help' => 'prefs-html_image_addrbook'
);
'locked' => true,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Mark different levels of quoting with different colors?'));
+ 'desc' => _("Mark different levels of quoting with different colors?"));
// should we try to mark simple markup with html tags?
$_prefs['highlight_simple_markup'] = array(
'locked' => true,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Mark simple markup?'));
+ 'desc' => _("Mark simple markup?"));
// should we show large blocks of quoted text or hide them?
$_prefs['show_quoteblocks'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 'shown' => _('Shown'),
- 'thread' => _('Hidden in Thread View'),
- 'list' => _('Hidden in List Messages'),
- 'listthread' => _('Hidden in Thread View and List Messages'),
- 'hidden' => _('Hidden')
+ 'shown' => _("Shown"),
+ 'thread' => _("Hidden in Thread View"),
+ 'list' => _("Hidden in List Messages"),
+ 'listthread' => _("Hidden in Thread View and List Messages"),
+ 'hidden' => _("Hidden")
),
- 'desc' => _('Should large blocks of quoted text be shown or hidden by default? It can be toggled easily whichever you choose.'));
+ 'desc' => _("Should large blocks of quoted text be shown or hidden by default? It can be toggled easily whichever you choose."));
// should we dim signatures?
$_prefs['dim_signature'] = array(
'locked' => true,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Dim signatures?'));
+ 'desc' => _("Dim signatures?"));
// Convert textual emoticons into graphical ones?
$_prefs['emoticons'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Convert textual emoticons into graphical ones?'));
+ 'desc' => _("Convert textual emoticons into graphical ones?"));
// how do we display message parts?
$_prefs['parts_display'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 'all' => _('Show all parts'),
- 'atc' => _('Show attachments only'),
- 'none' => _('Do not show any parts')
+ 'all' => _("Show all parts"),
+ 'atc' => _("Show attachments only"),
+ 'none' => _("Don't show any parts")
),
- 'desc' => _('How do you want to display the parts of a message by default?'));
+ 'desc' => _("How do you want to display the parts of a message by default?"));
// Display custom headers (configured via the identity screen) when viewing
// messages?
'locked' => false,
'shared' => false,
'type' => 'textarea',
- 'desc' => _('Additional headers to display when viewing: <em>(optional, enter each header on a new line)</em>'));
+ 'desc' => _("Additional headers to display when viewing: <em>(optional, enter each header on a new line)</em>"));
// default message character set
$_prefs['default_msg_charset'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array_merge(
- array('' => _('Default (US-ASCII)')), Horde_Nls::$config['encodings']
+ array('' => _("Default (US-ASCII)")), Horde_Nls::$config['encodings']
),
- 'desc' => _('The default charset for messages with no charset information:'),
+ 'desc' => _("The default charset for messages with no charset information:"),
'help' => 'prefs-default_msg_charset');
$_prefs['disposition_send_mdn'] = array(
'locked' => true,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Prompt to send read receipt when requested by the sender?'),
+ 'desc' => _("Prompt to send read receipt when requested by the sender?"),
'help' => 'prefs-disposition_send_mdn'
);
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Return to the mailbox listing after deleting, moving, or copying a message?'));
+ 'desc' => _("Return to the mailbox listing after deleting, moving, or copying a message?"));
// should we move messages to a trash folder instead of just marking
// them as deleted?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('When deleting messages, move them to your Trash folder instead of marking them as deleted?'));
+ 'desc' => _("When deleting messages, move them to your Trash folder instead of marking them as deleted?"));
// use Virtual Trash folder
$_prefs['use_vtrash'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Display the "Empty Trash" link in the menubar?'));
+ 'desc' => _("Display the \"Empty Trash\" link in the menubar?"));
// display the 'Empty Spam' link in the menubar?
$_prefs['empty_spam_menu'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Display the "Empty Spam" link in the menubar?'));
+ 'desc' => _("Display the \"Empty Spam\" link in the menubar?"));
// hide deleted
$_prefs['delhide'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('Never'),
- 30 => _('Every 30 seconds'),
- 60 => _('Every minute'),
- 300 => _('Every 5 minutes'),
- 900 => _('Every 15 minutes'),
- 1800 => _('Every half hour')
+ 0 => _("Never"),
+ 30 => _("Every 30 seconds"),
+ 60 => _("Every minute"),
+ 300 => _("Every 5 minutes"),
+ 900 => _("Every 15 minutes"),
+ 1800 => _("Every half hour")
),
- 'desc' => _('Refresh Folder Views:'),
+ 'desc' => _("Refresh Folder Views:"),
);
// javascript popup if there's new mail?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Display pop-up notification of new mail?'),
+ 'desc' => _("Display pop-up notification of new mail?"),
);
// play a sound on new mail? if so, which one?
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Enable message previews?')
+ 'desc' => _("Enable message previews?")
);
$_prefs['preview_maxlen'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 100 => _('100 characters'),
- 250 => _('250 characters'),
- 500 => _('500 characters'),
- 1000 => _('1000 characters')
+ 100 => _("100 characters"),
+ 250 => _("250 characters"),
+ 500 => _("500 characters"),
+ 1000 => _("1000 characters")
),
- 'desc' => _('Characters to display:')
+ 'desc' => _("Characters to display:")
);
$_prefs['preview_strip_nl'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Strip linebreaks?')
+ 'desc' => _("Strip linebreaks?")
);
$_prefs['preview_show_unread'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Show previews for unread messages only?')
+ 'desc' => _("Show previews for unread messages only?")
);
$_prefs['preview_show_tooltip'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Show previews in tooltips?')
+ 'desc' => _("Show previews in tooltips?")
);
// End Message Preview
'personal' => array(
'a' => '+',
'c' => 'flagPersonal',
- 'l' => _('Personal'),
+ 'l' => _("Personal"),
't' => 'imp'
),
'highpri' => array(
'a' => '^',
'b' => '#ffcccc',
'c' => 'flagHighpriority',
- 'l' => _('High Priority'),
+ 'l' => _("High Priority"),
't' => 'imp'
),
'lowpri' => array(
'a' => 'v',
'c' => 'flagLowpriority',
- 'l' => _('Low Priority'),
+ 'l' => _("Low Priority"),
't' => 'imp'
),
// THESE ENTRIES MUST NOT BE DELETED
'signed' => array(
'c' => 'flagSignedmsg',
- 'l' => _('Message is Signed'),
+ 'l' => _("Message is Signed"),
't' => 'atc'
),
'encrypt' => array(
'c' => 'flagEncryptmsg',
- 'l' => _('Message is Encrypted'),
+ 'l' => _("Message is Encrypted"),
't' => 'atc'
),
'attach' => array(
'c' => 'flagAttachmsg',
- 'l' => _('Message has Attachments'),
+ 'l' => _("Message has Attachments"),
't' => 'atc'
),
'a' => 'N',
'b' => '#eeeeff',
'c' => 'flagUnseen',
- 'l' => _('Unseen'),
+ 'l' => _("Unseen"),
'n' => true,
't' => 'imapu'
),
'a' => 'r',
'b' => '#ccffcc',
'c' => 'flagAnswered',
- 'l' => _('Answered'),
+ 'l' => _("Answered"),
// By default, this flag is not settable by the user - it is
// automatically set when a message is replied to.
't' => 'imap'
'\\draft' => array(
'a' => 'd',
'c' => 'flagDraft',
- 'l' => _('Draft'),
+ 'l' => _("Draft"),
// By default, this flag is not settable by the user - it is
// automatically set/reset when a message is drafted/finished.
't' => 'imap'
'a' => '*',
'b' => '#ffcccc',
'c' => 'flagFlagged',
- 'l' => _('Flagged for Followup'),
+ 'l' => _("Flagged for Followup"),
't' => 'imapu'
),
'\\deleted' => array(
'a' => 'D',
'b' => '#999999',
'c' => 'flagDeleted',
- 'l' => _('Deleted'),
+ 'l' => _("Deleted"),
't' => 'imapu'
),
'a' => 'F',
'b' => '#aadddd',
'c' => 'flagForwarded',
- 'l' => _('Forwarded'),
+ 'l' => _("Forwarded"),
// Pursuant to RFC, this flag SHOULD NOT be changed by the user
't' => 'imap'
)
'type' => 'link',
'url' => 'fetchmailprefs.php',
'img' => 'fetchmail.png',
- 'desc' => _('Edit your preferences for accessing other mail accounts.'));
+ 'desc' => _("Edit your preferences for accessing other mail accounts."));
// Show the Fetch mail icon on the menubar?
$_prefs['fetchmail_menu'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Show the Fetch Mail icon on the menubar?'));
+ 'desc' => _("Show the Fetch Mail icon on the menubar?"));
// Don't change anything here.
$_prefs['fm_accounts'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- IMP::MAILBOX_START_FIRSTUNSEEN => _('Page with the First (oldest) Unseen Message'),
- IMP::MAILBOX_START_LASTUNSEEN => _('Page with the Last (newest) Unseen Message'),
- IMP::MAILBOX_START_FIRSTPAGE => _('First Mailbox Page'),
- IMP::MAILBOX_START_LASTPAGE => _('Last Mailbox Page')
+ IMP::MAILBOX_START_FIRSTUNSEEN => _("Page with the First (oldest) Unseen Message"),
+ IMP::MAILBOX_START_LASTUNSEEN => _("Page with the Last (newest) Unseen Message"),
+ IMP::MAILBOX_START_FIRSTPAGE => _("First Mailbox Page"),
+ IMP::MAILBOX_START_LASTPAGE => _("Last Mailbox Page")
),
- 'desc' => _('When opening a new mailbox for the first time, which page do you want to start on?'),
+ 'desc' => _("When opening a new mailbox for the first time, which page do you want to start on?"),
'help' => 'prefs-mailbox_start');
// default sorting column
'shared' => false,
'type' => 'enum',
'enum' => array(
- Horde_Imap_Client::SORT_ARRIVAL => _('Arrival Time'),
- Horde_Imap_Client::SORT_DATE => _('Message Date'),
- Horde_Imap_Client::SORT_FROM => _('From Address'),
- Horde_Imap_Client::SORT_TO => _('To Address'),
- Horde_Imap_Client::SORT_SUBJECT => _('Subject Field'),
- Horde_Imap_Client::SORT_SIZE => _('Message Size'),
- Horde_Imap_Client::SORT_THREAD => _('Thread View')
+ Horde_Imap_Client::SORT_ARRIVAL => _("Arrival Time"),
+ Horde_Imap_Client::SORT_DATE => _("Message Date"),
+ Horde_Imap_Client::SORT_FROM => _("From Address"),
+ Horde_Imap_Client::SORT_TO => _("To Address"),
+ Horde_Imap_Client::SORT_SUBJECT => _("Subject Field"),
+ Horde_Imap_Client::SORT_SIZE => _("Message Size"),
+ Horde_Imap_Client::SORT_THREAD => _("Thread View")
),
- 'desc' => _('Default sorting criteria:'));
+ 'desc' => _("Default sorting criteria:"));
// default sorting direction
$_prefs['sortdir'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('Ascending'),
- 1 => _('Descending')
+ 0 => _("Ascending"),
+ 1 => _("Descending")
),
- 'desc' => _('Default sorting direction:'));
+ 'desc' => _("Default sorting direction:"));
// sort prefs for individual folders
$_prefs['sortpref'] = array(
'locked' => false,
'shared' => false,
'type' => 'number',
- 'desc' => _('Messages per page in the mailbox view.'));
+ 'desc' => _("Messages per page in the mailbox view."));
// How the from field should be displayed on the mailbox screen
$_prefs['from_link'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('Clicking on the address will compose a new message to the sender'),
- 1 => _('Clicking on the address will open the message to be read'),
- 2 => _('Do not generate a link in the From: column')
+ 0 => _("Clicking on the address will compose a new message to the sender"),
+ 1 => _("Clicking on the address will open the message to be read"),
+ 2 => _("Do not generate a link in the From: column")
),
- 'desc' => _('The From: column of the message should be linked:'));
+ 'desc' => _("The From: column of the message should be linked:"));
// Display attachment information in mailbox list.
// Disabled by default, and not shown to user, because this display requires
'locked' => true,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Display attachment information about a message in the mailbox listing?'));
+ 'desc' => _("Display attachment information about a message in the mailbox listing?"));
// Time format for messages dated today
$_prefs['time_format'] = array(
'%H:%M' => strftime('%H:%M'),
'%I:%M%p' => strftime('%I:%M%p'),
),
- 'desc' => _('Format of message dates in the mailbox view for messages dated today'));
+ 'desc' => _("Format of message dates in the mailbox view for messages dated today"));
// expand folder tree by default
$_prefs['nav_expanded'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('No'),
- 1 => _('Yes'),
- 2 => _('Remember the last view')
+ 0 => _("No"),
+ 1 => _("Yes"),
+ 2 => _("Remember the last view")
),
- 'desc' => _('Expand the entire folder tree by default in the folders view?'));
+ 'desc' => _("Expand the entire folder tree by default in the folders view?"));
// folder tree view style
$_prefs['tree_view'] = array(
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('Combine all namespaces'),
- 1 => _('Show non-private mailboxes in separate folders')
+ 0 => _("Combine all namespaces"),
+ 1 => _("Show non-private mailboxes in separate folders")
),
- 'desc' => _('How should namespaces be displayed in the folder tree view?')
+ 'desc' => _("How should namespaces be displayed in the folder tree view?")
);
// expand folder tree by default in sidebar
'shared' => false,
'type' => 'enum',
'enum' => array(
- 0 => _('No'),
- 1 => _('Yes'),
- 2 => _('Current expanded status in the folders view')
+ 0 => _("No"),
+ 1 => _("Yes"),
+ 2 => _("Current expanded status in the folders view")
),
- 'desc' => _('Expand the entire folder tree by default in the sidebar?'));
+ 'desc' => _("Expand the entire folder tree by default in the sidebar?"));
// poll all folders for new mail?
$_prefs['nav_poll_all'] = array(
'locked' => $is_pop3,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Poll all folders for new mail?'));
+ 'desc' => _("Poll all folders for new mail?"));
// list of folders to expand by default
$_prefs['expanded_folders'] = array(
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Save recipients automatically to the default address book?'));
+ 'desc' => _("Save recipients automatically to the default address book?"));
// By default, display all contacts in the address book when loading
// the contacts screen. If your default address book is large and
'locked' => false,
'shared' => true,
'type' => 'checkbox',
- 'desc' => _('List all contacts when loading the contacts screen? (if disabled, you will only see contacts that you search for explicitly)'));
+ 'desc' => _("List all contacts when loading the contacts screen? (if disabled, you will only see contacts that you search for explicitly)"));
// address book selection widget
$_prefs['sourceselect'] = array('type' => 'special');
'locked' => false,
'shared' => false,
'type' => 'number',
- 'desc' => _('Minutes needed to consider a event as a non-conflicting one in iTip')
+ 'desc' => _("Minutes needed to consider a event as a non-conflicting one in iTip")
);
// End Calendar preferences
'locked' => false,
'shared' => false,
'type' => 'checkbox',
- 'desc' => _('Display only the first 250 characters of a message initially?')
+ 'desc' => _("Display only the first 250 characters of a message initially?")
);
// End MIMP Options
'shared' => false,
'type' => 'enum',
'enum' => array(
- 'portal' => _('Portal'),
- 'inbox' => _('Inbox')
+ 'portal' => _("Portal"),
+ 'inbox' => _("Inbox")
),
- 'desc' => _('The page to view immediately after login in DIMP.')
+ 'desc' => _("The page to view immediately after login in DIMP.")
);
// Other Implicit DIMP preferences
* able to log in to them. The only property these entries need is 'name'.
* This lets you put labels in the list, like this example: */
$servers['_prompt'] = array(
- 'name' => _('Choose a mail server:')
+ 'name' => _("Choose a mail server:")
);
/* Example configurations: */
$template->set('multiple_source', true);
$s_list = array();
foreach ($source_list as $key => $select) {
- $s_list[] = array('val' => $key, 'selected' => ($key == $source), 'label' => htmlspecialchars($select));
+ $s_list[] = array('val' => $key, 'selected' => ($key == $source), 'label' => htmlspecialchars($select));
}
$template->set('source_list', $s_list);
} else {
$template->set('sa', $selected_addresses);
/* Display the form. */
-$title = _('Address Book');
+$title = _("Address Book");
Horde::addScriptFile('prototype.js', 'horde', true);
Horde::addScriptFile('contacts.js', 'imp', true);
require IMP_TEMPLATES . '/common-header.inc';
$id = Horde_Util::getFormData('fm_id');
if (empty($id)) {
- $id = _('Unnamed');
+ $id = _("Unnamed");
}
foreach ($fetchmail->getParameterList() as $val) {
$prefs->setValue('fetchmail_login', (bool)array_sum($fm_account->getAll('loginfetch')));
- $notification->push(sprintf(_('The account "%s" has been saved.'), $id), 'horde.success');
+ $notification->push(sprintf(_("The account \"%s\" has been saved."), $id), 'horde.success');
break;
case 'fetchmail_prefs_delete':
$to_delete = Horde_Util::getFormData('edit_account');
if ($to_delete !== null) {
$deleted_account = $fm_account->delete($to_delete);
- $notification->push(sprintf(_('The account "%s" has been deleted.'), $deleted_account['id']), 'horde.success');
+ $notification->push(sprintf(_("The account \"%s\" has been deleted."), $deleted_account['id']), 'horde.success');
$prefs->setValue('fetchmail_login', (bool)array_sum($fm_account->getAll('loginfetch')));
$actionID = null;
} else {
- $notification->push(_('You must select an account to be deleted.'), 'horde.warning');
+ $notification->push(_("You must select an account to be deleted."), 'horde.warning');
}
break;
}
if (!$menuitem_locked) {
$prefs->setValue('filter_menuitem', Horde_Util::getFormData('filter_menuitem') ? 1 : 0);
}
- $notification->push(_('Preferences successfully updated.'), 'horde.success');
+ $notification->push(_("Preferences successfully updated."), 'horde.success');
break;
}
$t->setOption('gettext', true);
$t->set('navcell', Horde_Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'filters'));
$t->set('prefsurl', IMP::prefsURL(true));
-$t->set('return_text', _('Return to Options'));
+$t->set('return_text', _("Return to Options"));
/* Get filter links. */
$blacklist_link = $whitelist_link = $filters_link = false;
$t->set('app', $app);
$link_array = array(
- array('g' => _('Edit your Filter Rules'), 'l' => $filters_link, 'h' => 'filter-edit-rules'),
- array('g' => _('Edit your Blacklist'), 'l' => $blacklist_link, 'h' => 'filter-edit-blacklist'),
- array('g' => _('Edit your Whitelist'), 'l' => $whitelist_link, 'h' => 'filter-edit-whitelist')
+ array('g' => _("Edit your Filter Rules"), 'l' => $filters_link, 'h' => 'filter-edit-rules'),
+ array('g' => _("Edit your Blacklist"), 'l' => $blacklist_link, 'h' => 'filter-edit-blacklist'),
+ array('g' => _("Edit your Whitelist"), 'l' => $whitelist_link, 'h' => 'filter-edit-whitelist')
);
$links = array();
foreach ($link_array as $key => $val) {
$t->set('links', $links);
$options_array = array(
- 'login' => array('g' => _('Apply filter rules upon logging on?'), 'p' => 'filter_on_login', 'h' => 'filter-on-login', 'l' => $login_locked),
- 'display' => array('g' => _('Apply filter rules whenever Inbox is displayed?'), 'p' => 'filter_on_display', 'h' => 'filter-on-display', 'l' => $display_locked),
- 'sidebar' => array('g' => _('Apply filter rules whenever sidebar is refreshed?'), 'p' => 'filter_on_sidebar', 'h' => 'filter-on-sidebar', 'l' => $sidebar_locked),
- 'any_mailbox' => array('g' => _('Allow filter rules to be applied in any mailbox?'), 'p' => 'filter_any_mailbox', 'h' => 'filter-any-mailbox', 'l' => $anymailbox_locked),
- 'menuitem' => array('g' => _('Show the filter icon on the menubar?'), 'p' => 'filter_menuitem', 'l' => $menuitem_locked));
+ 'login' => array('g' => _("Apply filter rules upon logging on?"), 'p' => 'filter_on_login', 'h' => 'filter-on-login', 'l' => $login_locked),
+ 'display' => array('g' => _("Apply filter rules whenever Inbox is displayed?"), 'p' => 'filter_on_display', 'h' => 'filter-on-display', 'l' => $display_locked),
+ 'sidebar' => array('g' => _("Apply filter rules whenever sidebar is refreshed?"), 'p' => 'filter_on_sidebar', 'h' => 'filter-on-sidebar', 'l' => $sidebar_locked),
+ 'any_mailbox' => array('g' => _("Allow filter rules to be applied in any mailbox?"), 'p' => 'filter_any_mailbox', 'h' => 'filter-any-mailbox', 'l' => $anymailbox_locked),
+ 'menuitem' => array('g' => _("Show the filter icon on the menubar?"), 'p' => 'filter_menuitem', 'l' => $menuitem_locked));
if ($_SESSION['imp']['protocol'] == 'pop') {
unset($options_array['any_mailbox']);
}
}
$t->set('opts', $opts);
if (!empty($opts)) {
- $t->set('save_opts', _('Save Options'));
+ $t->set('save_opts', _("Save Options"));
}
}
/* Redirect back to the mailbox if folder use is not allowed. */
if (empty($conf['user']['allow_folders'])) {
- $notification->push(_('Folder use is not enabled.'), 'horde.error');
+ $notification->push(_("Folder use is not enabled."), 'horde.error');
header('Location: ' . Horde::applicationUrl('mailbox-mimp.php', true));
exit;
}
$selfurl = Horde::applicationUrl('folders-mimp.php');
if ($subscribe) {
- $sub_text = $showAll ? _('Show Subscribed Folders') : _('Show All Folders');
+ $sub_text = $showAll ? _("Show Subscribed Folders") : _("Show All Folders");
$sub_link = Horde_Util::addParameter($selfurl, 'ts', 1);
}
-$title = _('Folders');
+$title = _("Folders");
require IMP_TEMPLATES . '/folders/folders-mimp.inc';
/* Redirect back to the mailbox if folder use is not allowed. */
if (!$conf['user']['allow_folders']) {
- $notification->push(_('Folder use is not enabled.'), 'horde.error');
+ $notification->push(_("Folder use is not enabled."), 'horde.error');
header('Location: ' . Horde::applicationUrl('mailbox.php', true));
exit;
}
case 'import_mbox':
$import_folder = Horde_Util::getFormData('import_folder');
if (!empty($import_folder)) {
- $res = $browser->wasFileUploaded('mbox_upload', _('mailbox file'));
+ $res = $browser->wasFileUploaded('mbox_upload', _("mailbox file"));
if (!$res instanceof PEAR_Error) {
$res = $imp_folder->importMbox(Horde_String::convertCharset($import_folder, $charset, 'UTF7-IMAP'), $_FILES['mbox_upload']['tmp_name']);
$mbox_name = basename(Horde_Util::dispelMagicQuotes($_FILES['mbox_upload']['name']));
if ($res === false) {
- $notification->push(sprintf(_('There was an error importing %s.'), $mbox_name), 'horde.error');
+ $notification->push(sprintf(_("There was an error importing %s."), $mbox_name), 'horde.error');
} else {
- $notification->push(sprintf(_('Imported %d messages from %s.'), $res, $mbox_name), 'horde.success');
+ $notification->push(sprintf(_("Imported %d messages from %s."), $res, $mbox_name), 'horde.success');
}
} else {
$notification->push($res);
$imp_folder->unsubscribe($folder_list);
}
} else {
- $notification->push(_('No folders were specified'), 'horde.message');
+ $notification->push(_("No folders were specified"), 'horde.message');
}
break;
if (($actionID == 'delete_folder_confirm') &&
!empty($conf['server']['fixed_folders']) &&
in_array(IMP::folderPref($val, false), $conf['server']['fixed_folders'])) {
- $notification->push(sprintf(_('The folder "%s" may not be deleted.'), IMP::displayFolder($val)), 'horde.error');
+ $notification->push(sprintf(_("The folder \"%s\" may not be deleted."), IMP::displayFolder($val)), 'horde.error');
continue;
}
$elt_info = $imaptree->getElementInfo($val);
break;
}
- $title = _('Folder Actions - Confirmation');
+ $title = _("Folder Actions - Confirmation");
require IMP_TEMPLATES . '/common-header.inc';
IMP::menu();
if (!empty($folder_list)) {
Horde::addScriptFile('tables.js', 'horde', true);
- $title = _('Folder Sizes');
+ $title = _("Folder Sizes");
require IMP_TEMPLATES . '/common-header.inc';
IMP::menu();
IMP::status();
$data = array(
'class' => (++$rowct % 2) ? 'item0' : 'item1',
'name' => htmlspecialchars(IMP::displayFolder($val)),
- 'size' => sprintf(_('%.2fMB'), $size / (1024 * 1024)),
+ 'size' => sprintf(_("%.2fMB"), $size / (1024 * 1024)),
'sort' => $size
);
$sum += $size;
$template->setOption('gettext', true);
$template->set('folders', $loop);
$template->set('folders_url', $folders_url);
- $template->set('folders_sum', sprintf(_('%.2fMB'), $sum / (1024 * 1024)));
+ $template->set('folders_sum', sprintf(_("%.2fMB"), $sum / (1024 * 1024)));
echo $template->fetch(IMP_TEMPLATES . '/folders/folders_size.html');
require $registry->get('templates', 'horde') . '/common-footer.inc';
$folders_url = Horde_Util::addParameter($folders_url, 'folders_token', $folders_token);
if ($_SESSION['imp']['file_upload'] && ($actionID == 'import_mbox')) {
- $title = _('Folder Navigator');
+ $title = _("Folder Navigator");
require IMP_TEMPLATES . '/common-header.inc';
IMP::menu();
IMP::status();
));
/* Prepare the header template. */
-$refresh_title = _('Reload View');
+$refresh_title = _("Reload View");
$head_template = new Horde_Template();
$head_template->setOption('gettext', true);
$head_template->set('title', $refresh_title);
$refresh_ak = Horde::getAccessKey($refresh_title);
$refresh_title = Horde::stripAccessKey($refresh_title);
if (!empty($refresh_ak)) {
- $refresh_title .= sprintf(_(' (Accesskey %s)'), $refresh_ak);
+ $refresh_title .= sprintf(_(" (Accesskey %s)"), $refresh_ak);
}
-$head_template->set('refresh', Horde::link($folders_url, $refresh_title, '', '', '', $refresh_title, $refresh_ak) . Horde::img('reload.png', _('Refresh'), null, $registry->getImageDir('horde')) . '</a>');
+$head_template->set('refresh', Horde::link($folders_url, $refresh_title, '', '', '', $refresh_title, $refresh_ak) . Horde::img('reload.png', _("Refresh"), null, $registry->getImageDir('horde')) . '</a>');
$head_template->set('folders_token', $folders_token);
/* Prepare the actions template. */
$a_template->set('javascript', $browser->hasFeature('javascript'));
if ($a_template->get('javascript')) {
- $a_template->set('check_ak', Horde::getAccessKeyAndTitle(_('Check _All/None')));
+ $a_template->set('check_ak', Horde::getAccessKeyAndTitle(_("Check _All/None")));
} else {
- $a_template->set('go', _('Go'));
+ $a_template->set('go', _("Go"));
}
$a_template->set('create_folder', !empty($GLOBALS['conf']['hooks']['permsdenied']) || (IMP::hasPermission('create_folders') && IMP::hasPermission('max_folders')));
if ($prefs->getValue('subscribe')) {
$a_template->set('subscribe', true);
- $subToggleText = ($showAll) ? _('Hide Unsubscribed') : _('Show Unsubscribed');
+ $subToggleText = ($showAll) ? _("Hide Unsubscribed") : _("Show Unsubscribed");
$a_template->set('toggle_subscribe', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'toggle_subscribed_view', 'folders_token' => $folders_token)), $subToggleText, 'widget', '', '', $subToggleText, true));
}
$a_template->set('nav_poll', !$prefs->isLocked('nav_poll') && !$prefs->getValue('nav_poll_all'));
$a_template->set('notrash', !$prefs->getValue('use_trash'));
$a_template->set('file_upload', $_SESSION['imp']['file_upload']);
$a_template->set('help', Horde_Help::link('imp', 'folder-options'));
-$a_template->set('expand_all', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'expand_all_folders', 'folders_token' => $folders_token)), _('Expand All Folders'), 'widget', '', '', _('Expand All'), true));
-$a_template->set('collapse_all', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'collapse_all_folders', 'folders_token' => $folders_token)), _('Collapse All Folders'), 'widget', '', '', _('Collapse All'), true));
+$a_template->set('expand_all', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'expand_all_folders', 'folders_token' => $folders_token)), _("Expand All Folders"), 'widget', '', '', _("Expand All"), true));
+$a_template->set('collapse_all', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'collapse_all_folders', 'folders_token' => $folders_token)), _("Collapse All Folders"), 'widget', '', '', _("Collapse All"), true));
/* Check to see if user wants new mail notification */
if (!empty($newmsgs)) {
foreach ($raw_rows as $val) {
$val['nocheckbox'] = !empty($val['vfolder']);
if (!empty($val['vfolder']) && ($val['value'] != $imaptree->VFOLDER_KEY)) {
- $val['delvfolder'] = Horde::link($imp_search->deleteURL($val['value']), _('Delete Virtual Folder')) . _('Delete') . '</a>';
- $val['editvfolder'] = Horde::link($imp_search->editURL($val['value']), _('Edit Virtual Folder')) . _('Edit') . '</a>';
+ $val['delvfolder'] = Horde::link($imp_search->deleteURL($val['value']), _("Delete Virtual Folder")) . _("Delete") . '</a>';
+ $val['editvfolder'] = Horde::link($imp_search->editURL($val['value']), _("Edit Virtual Folder")) . _("Edit") . '</a>';
}
$val['class'] = (++$rowct % 2) ? 'item0' : 'item1';
if (!empty($val['unseen'])) {
$val['name'] = '<strong>' . $val['name'] . '</strong>';
}
- $val['name'] = Horde::link(Horde_Util::addParameter($name_url, 'mailbox', $val['value']), sprintf(_('View messages in %s'), ($val['vfolder']) ? $val['base_elt']['l'] : $val['display'])) . $val['name'] . '</a>';
+ $val['name'] = Horde::link(Horde_Util::addParameter($name_url, 'mailbox', $val['value']), sprintf(_("View messages in %s"), ($val['vfolder']) ? $val['base_elt']['l'] : $val['display'])) . $val['name'] . '</a>';
}
$dir2 = _image($val, null, 'folder');
if (!empty($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
$minus_img = 'rev-' . $minus_img;
}
- $dir = Horde::link($dir, _('Collapse Folder')) . _image($minus_img, _('Collapse'), 'tree') . '</a>' . $dir2;
+ $dir = Horde::link($dir, _("Collapse Folder")) . _image($minus_img, _("Collapse"), 'tree') . "</a>$dir2";
} else {
$dir = Horde_Util::addParameter($dir, 'actionID', 'expand_folder');
if ($val['value'] == 'INBOX') {
if (!empty($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
$plus_img = 'rev-' . $plus_img;
}
- $dir = Horde::link($dir, _('Expand Folder')) . _image($plus_img, _('Expand'), 'tree') . '</a>' . $dir2;
+ $dir = Horde::link($dir, _("Expand Folder")) . _image($plus_img, _("Expand"), 'tree') . "</a>$dir2";
}
} else {
if ($val['value'] == 'INBOX') {
$template->setOption('gettext', true);
$template->set('rows', $rows);
-$title = _('Folder Navigator');
+$title = _("Folder Navigator");
require IMP_TEMPLATES . '/common-header.inc';
IMP::menu();
IMP::status();
} catch (Horde_Imap_Client_Exception $e) {
IMP::loginLogMessage($e->getMessage(), __FILE__, __LINE__);
if ($e->getCode() == Horde_Imap_Client_Exception::SERVER_CONNECT) {
- throw new Horde_Exception(_('Could not connect to the remote server.'));
+ throw new Horde_Exception(_("Could not connect to the remote server."));
}
throw new Horde_Exception('', Horde_Auth::REASON_BADLOGIN);
if (count($newmsgs) == 0 && !empty($this->_params['show_unread'])) {
if (count($folders) == 0) {
- $html = _('No folders are being checked for new mail.');
+ $html = _("No folders are being checked for new mail.");
} elseif (!$anyUnseen) {
- $html = '<em>' . _('No folders with unseen messages') . '</em>';
+ $html = '<em>' . _("No folders with unseen messages") . '</em>';
} elseif ($GLOBALS['prefs']->getValue('nav_popup')) {
- $html = '<em>' . _('No folders with new messages') . '</em>';
+ $html = '<em>' . _("No folders with new messages") . '</em>';
}
}
$html = '<table cellspacing="0" width="100%">';
if (empty($ids)) {
- $html .= '<tr><td><em>' . _('No unread messages') . '</em></td></tr>';
+ $html .= '<tr><td><em>' . _("No unread messages") . '</em></td></tr>';
} else {
$charset = Horde_Nls::getCharset();
$imp_ui = new IMP_UI_Mailbox('INBOX');
$more_msgs = count($ids) - $shown;
$text = ($more_msgs > 0)
- ? sprintf(ngettext('%d more unseen message...', '%d more unseen messages...', $more_msgs), $more_msgs)
- : _('Go to your Inbox...');
+ ? sprintf(ngettext("%d more unseen message...", "%d more unseen messages...", $more_msgs), $more_msgs)
+ : _("Go to your Inbox...");
$html .= '<tr><td colspan="2" style="cursor:pointer" align="right" onclick="DimpBase.go(\'folder:INBOX\');return false;">' . $text . '</td></tr>';
}
* @package Horde_Block
*/
-$block_name = _('Folder Summary');
+$block_name = _("Folder Summary");
class Horde_Block_imp_summary extends Horde_Block
{
function _params()
{
return array('show_unread' => array('type' => 'boolean',
- 'name' => _('Only display folders with unread messages in them?'),
+ 'name' => _("Only display folders with unread messages in them?"),
'default' => 0),
'show_total' => array('type' => 'boolean',
- 'name' => _('Show total number of mails in folder?'),
+ 'name' => _("Show total number of mails in folder?"),
'default' => 0)
);
}
$html = '<table cellspacing="0" width="100%">';
if (!IMP::checkAuthentication(true)) {
- return $html . '<tr><td class="text">' . Horde::link(Horde::applicationUrl('index.php', true), sprintf(_('Log in to %s'), $registry->applications['imp']['name'])) . sprintf(_('Log in to %s'), $registry->applications['imp']['name']) . '</a></td></tr></table>';
+ return $html . '<tr><td class="text">' . Horde::link(Horde::applicationUrl('index.php', true), sprintf(_("Log in to %s"), $registry->applications['imp']['name'])) . sprintf(_("Log in to %s"), $registry->applications['imp']['name']) . '</a></td></tr></table>';
}
/* Filter on INBOX display, if requested. */
}
} elseif (!empty($this->_params['show_unread'])) {
if (count($folders) == 0) {
- $html .= _('No folders are being checked for new mail.');
+ $html .= _("No folders are being checked for new mail.");
} elseif (!$anyUnseen) {
- $html .= '<em>' . _('No folders with unseen messages') . '</em>';
+ $html .= '<em>' . _("No folders with unseen messages") . '</em>';
} elseif ($prefs->getValue('nav_popup')) {
- $html .= '<em>' . _('No folders with new messages') . '</em>';
+ $html .= '<em>' . _("No folders with new messages") . '</em>';
}
}
* @package Horde_Block
*/
-$block_name = _('Menu Folder List');
+$block_name = _("Menu Folder List");
$block_type = 'tree';
class Horde_Block_imp_tree_folders extends Horde_Block
/* Cache some additional values. */
$image_dir = $GLOBALS['registry']->getImageDir();
- $tree->addNode($parent . 'compose', $parent, _('New Message'),
+ $tree->addNode($parent . 'compose', $parent, _("New Message"),
$indent, false,
array('icon' => 'compose.png',
'icondir' => $image_dir,
'target' => $GLOBALS['prefs']->getValue('compose_popup') ? 'horde_menu' : 'horde_main'));
/* Add link to the search page. */
- $tree->addNode($parent . 'search', $parent, _('Search'),
+ $tree->addNode($parent . 'search', $parent, _("Search"),
$indent, false,
array('icon' => 'search.png',
'icondir' => $image_dir,
try {
Horde_Mime::encodeAddress($this->formatAddr($addr), $charset, $_SESSION['imp']['maildomain']);
} catch (Horde_Mime_Exception $e) {
- throw new IMP_Compose_Exception(sprintf(_('Saving the draft failed. The %s header contains an invalid e-mail address: %s.'), $k, $e->getMessage()), $e->getCode());
+ throw new IMP_Compose_Exception(sprintf(_("Saving the draft failed. The %s header contains an invalid e-mail address: %s."), $k, $e->getMessage()), $e->getCode());
}
}
$draft_headers->addHeader($v, $addr);
{
$drafts_mbox = IMP::folderPref($GLOBALS['prefs']->getValue('drafts_folder'), true);
if (empty($drafts_mbox)) {
- throw new IMP_Compose_Exception(_('Saving the draft failed. No draft folder specified.'));
+ throw new IMP_Compose_Exception(_("Saving the draft failed. No draft folder specified."));
}
$imp_folder = IMP_Folder::singleton();
/* Check for access to drafts folder. */
if (!$imp_folder->exists($drafts_mbox) &&
!$imp_folder->create($drafts_mbox, $GLOBALS['prefs']->getValue('subscribe'))) {
- throw new IMP_Compose_Exception(_('Saving the draft failed. Could not create a drafts folder.'));
+ throw new IMP_Compose_Exception(_("Saving the draft failed. Could not create a drafts folder."));
}
$append_flags = array('\\draft');
$ids = $GLOBALS['imp_imap']->ob->append($drafts_mbox, array(array('data' => $data, 'flags' => $append_flags, 'messageid' => $headers->getValue('message-id'))));
$this->_metadata['draft_index'] = reset($ids);
$this->_modified = true;
- return sprintf(_('The draft has been saved to the "%s" folder.'), IMP::displayFolder($drafts_mbox));
+ return sprintf(_("The draft has been saved to the \"%s\" folder."), IMP::displayFolder($drafts_mbox));
} catch (Horde_Imap_Client_Exception $e) {
unset($this->_metadata['draft_index']);
$this->_modified = true;
- return _('The draft was not successfully saved.');
+ return _("The draft was not successfully saved.");
}
}
$sentmail->log(empty($this->_metadata['reply_type']) ? 'new' : $this->_metadata['reply_type'], $headers->getValue('message-id'), $val['recipients'], false);
}
- throw new IMP_Compose_Exception(sprintf(_('There was an error sending your message: %s'), $e->getMessage()));
+ throw new IMP_Compose_Exception(sprintf(_("There was an error sending your message: %s"), $e->getMessage()));
}
/* Store history information. */
}
}
- $entry = sprintf('%s Message sent to %s from %s', $_SERVER['REMOTE_ADDR'], $recipients, $_SESSION['imp']['uniquser']);
+ $entry = sprintf("%s Message sent to %s from %s", $_SERVER['REMOTE_ADDR'], $recipients, $_SESSION['imp']['uniquser']);
Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_INFO);
/* Should we save this message in the sent mail folder? */
((strpos($save_attach, 'prompt') === 0) &&
empty($opts['save_attachments']))) {
$mime_message->buildMimeIds();
- for ($i = 2;; ++$i) {
+ for ($i = 2; ; ++$i) {
if (!($oldPart = $mime_message->getPart($i))) {
break;
}
$replace_part = new Horde_Mime_Part();
$replace_part->setType('text/plain');
$replace_part->setCharset($charset);
- $replace_part->setContents('[' . _('Attachment stripped: Original attachment type') . ': "' . $oldPart->getType() . '", ' . _('name') . ': "' . $oldPart->getName(true) . '"]');
+ $replace_part->setContents('[' . _("Attachment stripped: Original attachment type") . ': "' . $oldPart->getType() . '", ' . _("name") . ': "' . $oldPart->getName(true) . '"]');
$mime_message->alterPart($i, $replace_part);
}
}
try {
$GLOBALS['imp_imap']->ob->append(Horde_String::convertCharset($opts['sent_folder'], Horde_Nls::getCharset(), 'UTF-8'), array(array('data' => $fcc, 'flags' => $flags)));
} catch (Horde_Imap_Client_Exception $e) {
- $notification->push(sprintf(_('Message sent successfully, but not saved to %s'), IMP::displayFolder($opts['sent_folder'])));
+ $notification->push(sprintf(_("Message sent successfully, but not saved to %s"), IMP::displayFolder($opts['sent_folder'])));
$sent_saved = false;
}
}
/* Properly encode the addresses we're sending to. */
try {
- $email = Horde_Mime::encodeAddress($email, $charset, $_SESSION['imp']['maildomain']);
+ $email = Horde_Mime::encodeAddress($email, null, $_SESSION['imp']['maildomain']);
} catch (Horde_Mime_Exception $e) {
throw new IMP_Compose_Exception($e);
}
if ($timelimit !== true) {
if ($conf['sentmail']['driver'] == 'none') {
Horde::logMessage('The permission for the maximum number of recipients per time period has been enabled, but no backend for the sent-mail logging has been configured for IMP.', __FILE__, __LINE__, PEAR_LOG_ERR);
- throw new IMP_Compose_Exception(_('The system is not properly configured. A detailed error description has been logged for the administrator.'));
+ throw new IMP_Compose_Exception(_("The system is not properly configured. A detailed error description has been logged for the administrator."));
}
$sentmail = IMP_Sentmail::factory();
$recipients = $sentmail->numberOfRecipients($conf['sentmail']['params']['limit_period'], true);
throw new IMP_Compose_Exception($e);
}
}
- throw new IMP_Compose_Exception(@htmlspecialchars(sprintf(_('You are not allowed to send messages to more than %d recipients within %d hours.'), $timelimit, $conf['sentmail']['params']['limit_period']), ENT_COMPAT, Horde_Nls::getCharset()));
+ throw new IMP_Compose_Exception(@htmlspecialchars(sprintf(_("You are not allowed to send messages to more than %d recipients within %d hours."), $timelimit, $conf['sentmail']['params']['limit_period']), ENT_COMPAT, Horde_Nls::getCharset()));
}
}
} catch (Horde_Mime_Exception $e) {}
if (empty($r_array)) {
- $notification->push(_('Could not save recipients.'));
+ $notification->push(_("Could not save recipients."));
return;
}
$results = $registry->call('contacts/search', array($emails, array($abook), array($abook => array('email'))));
} catch (Horde_Exception $e) {
Horde::logMessage($e);
- $notification->push(_('Could not save recipients.'));
+ $notification->push(_("Could not save recipients."));
return;
}
try {
$registry->call('contacts/import', array(array('name' => $name, 'email' => $recipient['mailbox'] . '@' . $recipient['host']), 'array', $abook));
- $notification->push(sprintf(_('Entry "%s" was successfully added to the address book'), $name), 'horde.success');
+ $notification->push(sprintf(_("Entry \"%s\" was successfully added to the address book"), $name), 'horde.success');
} catch (Horde_Exception $e) {
if ($e->getCode() == 'horde.error') {
$notification->push($e, $e->getCode());
try {
$obs = Horde_Mime_Address::parseAddressList($email);
} catch (Horde_Mime_Exception $e) {
- throw new IMP_Compose_Exception(sprintf(_('Invalid e-mail address: %s.'), $email));
+ throw new IMP_Compose_Exception(sprintf(_("Invalid e-mail address: %s."), $email));
}
foreach ($obs as $ob) {
}
if (empty($addrlist)) {
- throw new IMP_Compose_Exception(_('You must enter at least one recipient.'));
+ throw new IMP_Compose_Exception(_("You must enter at least one recipient."));
}
/* Count recipients if necessary. We need to split email groups
throw new IMP_Compose_Exception($e);
}
}
- throw new IMP_Compose_Exception(@htmlspecialchars(sprintf(_('You are not allowed to send messages to more than %d recipients.'), $max_recipients), ENT_COMPAT, Horde_Nls::getCharset()));
+ throw new IMP_Compose_Exception(@htmlspecialchars(sprintf(_("You are not allowed to send messages to more than %d recipients."), $max_recipients), ENT_COMPAT, Horde_Nls::getCharset()));
}
}
}
$host = idn_to_ascii(Horde_String::convertCharset($host, Horde_Nls::getCharset(), 'UTF-8'));
error_reporting($old_error);
} elseif (Horde_Mime::is8bit($ob['mailbox'])) {
- throw new IMP_Compose_Exception(sprintf(_('Invalid character in e-mail address: %s.'), $email));
+ throw new IMP_Compose_Exception(sprintf(_("Invalid character in e-mail address: %s."), $email));
}
return Horde_Mime_Address::writeAddress($ob['mailbox'], $host, isset($ob['personal']) ? $ob['personal'] : '');
$htmlBody->setType('text/html');
$htmlBody->setCharset($charset);
$htmlBody->setDisposition('inline');
- $htmlBody->setDescription(Horde_String::convertCharset(_('HTML Version of Message'), $nls_charset, $charset));
+ $htmlBody->setDescription(Horde_String::convertCharset(_("HTML Version of Message"), $nls_charset, $charset));
$htmlBody->setContents(Horde_Text_Filter::filter($msg, 'cleanhtml', array('charset' => $charset)));
- $textBody->setDescription(Horde_String::convertCharset(_('Plaintext Version of Message'), $nls_charset, $charset));
+ $textBody->setDescription(Horde_String::convertCharset(_("Plaintext Version of Message"), $nls_charset, $charset));
$textpart = new Horde_Mime_Part();
$textpart->setType('multipart/alternative');
/* Check to see if we have the user's passphrase yet. */
$passphrase = $imp_pgp->getPassphrase('personal');
if (empty($passphrase)) {
- $e = new IMP_Compose_Exception(_('PGP: Need passphrase for personal private key.'), 'horde.message');
+ $e = new IMP_Compose_Exception(_("PGP: Need passphrase for personal private key."), 'horde.message');
$e->encrypt = 'pgp_passphrase_dialog';
throw $e;
}
* yet. */
$symmetric_passphrase = $imp_pgp->getPassphrase('symmetric', 'imp_compose_' . $this->_cacheid);
if (empty($symmetric_passphrase)) {
- $e = new IMP_Compose_Exception(_('PGP: Need passphrase to encrypt your message with.'), 'horde.message');
+ $e = new IMP_Compose_Exception(_("PGP: Need passphrase to encrypt your message with."), 'horde.message');
$e->encrypt = 'pgp_symmetric_passphrase_dialog';
throw $e;
}
break;
}
} catch (Horde_Exception $e) {
- throw new IMP_Compose_Exception(_('PGP Error: ') . $e->getMessage(), $e->getCode());
+ throw new IMP_Compose_Exception(_("PGP Error: ") . $e->getMessage(), $e->getCode());
}
} elseif ($GLOBALS['prefs']->getValue('use_smime') &&
in_array($encrypt, array(IMP::SMIME_ENCRYPT, IMP::SMIME_SIGN, IMP::SMIME_SIGNENC))) {
if (in_array($encrypt, array(IMP::SMIME_SIGN, IMP::SMIME_SIGNENC))) {
$passphrase = $imp_smime->getPassphrase();
if ($passphrase === false) {
- $e = new IMP_Compose_Exception(_('S/MIME Error: Need passphrase for personal private key.'), 'horde.error');
+ $e = new IMP_Compose_Exception(_("S/MIME Error: Need passphrase for personal private key."), 'horde.error');
$e->encrypt = 'smime_passphrase_dialog';
throw $e;
}
break;
}
} catch (Horde_Exception $e) {
- throw new IMP_Compose_Exception(_('S/MIME Error: ') . $e->getMessage(), $e->getCode());
+ throw new IMP_Compose_Exception(_("S/MIME Error: ") . $e->getMessage(), $e->getCode());
}
}
if ($prefs->getValue('reply_headers') && !empty($h)) {
$msg_pre = '----- ' .
- ($from ? sprintf(_('Message from %s'), $from) : _('Message')) .
+ ($from ? sprintf(_("Message from %s"), $from) : _("Message")) .
/* Extra '-'s line up with "End Message" below. */
" ---------\n" .
$this->_getMsgHeaders($h) . "\n\n";
- $msg_post = "\n\n----- " .
- ($from ? sprintf(_('End message from %s'), $from) : _('End message')) .
+ $msg_post = "\n\n" . '----- ' .
+ ($from ? sprintf(_("End message from %s"), $from) : _("End message")) .
" -----\n";
} else {
$msg_pre = $this->_expandAttribution($prefs->getValue('attrib_text'), $from, $h) . "\n\n";
($msg_post ? $this->text2html($msg_post) : '');
} else {
$msg = empty($msg_text['text'])
- ? '[' . _('No message body text') . ']'
+ ? '[' . _("No message body text") . ']'
: $msg_pre . $msg_text['text'] . $msg_post;
}
$header['subject'] = $h->getValue('subject');
if (!empty($header['subject'])) {
- $header['title'] = _('Forward') . ': ' . $header['subject'];
+ $header['title'] = _("Forward") . ': ' . $header['subject'];
$header['subject'] = 'Fwd: ' . $GLOBALS['imp_imap']->ob->utils->getBaseSubject($header['subject'], array('keepblob' => true));
} else {
- $header['title'] = _('Forward');
+ $header['title'] = _("Forward");
$header['subject'] = 'Fwd:';
}
$from = Horde_Mime_Address::addrArray2String($h->getOb('from'));
$msg_pre = "\n----- " .
- ($from ? sprintf(_('Forwarded message from %s'), $from) : _('Forwarded message')) .
+ ($from ? sprintf(_("Forwarded message from %s"), $from) : _("Forwarded message")) .
" -----\n" . $this->_getMsgHeaders($h) . "\n";
- $msg_post = "\n\n----- " . _('End forwarded message') . " -----\n";
+ $msg_post = "\n\n----- " . _("End forwarded message") . " -----\n";
$compose_html = $GLOBALS['prefs']->getValue('compose_html');
$part = new Horde_Mime_Part();
$part->setCharset(Horde_Nls::getCharset());
$part->setType('message/rfc822');
- $part->setName(_('Forwarded Message'));
+ $part->setName(_("Forwarded Message"));
$part->setContents($contents->fullMessageText(array('stream' => true)));
try {
if ($attached == 1) {
if (!($name = $headerob->getValue('subject'))) {
- $name = _('[No Subject]');
+ $name = _("[No Subject]");
} elseif (Horde_String::length($name) > 80) {
$name = Horde_String::substr($name, 0, 80) . '...';
}
return 'Fwd: ' . $GLOBALS['imp_imap']->ob->utils->getBaseSubject($name, array('keepblob' => true));
} else {
- return 'Fwd: ' . sprintf(_('%u Forwarded Messages'), $attached);
+ return 'Fwd: ' . sprintf(_("%u Forwarded Messages"), $attached);
}
}
$tmp = array();
if (($ob = $h->getValue('date'))) {
- $tmp[_('Date')] = $ob;
+ $tmp[_("Date")] = $ob;
}
if (($ob = Horde_Mime_Address::addrArray2String($h->getOb('from')))) {
- $tmp[_('From')] = $ob;
+ $tmp[_("From")] = $ob;
}
if (($ob = Horde_Mime_Address::addrArray2String($h->getOb('reply-to')))) {
- $tmp[_('Reply-To')] = $ob;
+ $tmp[_("Reply-To")] = $ob;
}
if (($ob = $h->getValue('subject'))) {
- $tmp[_('Subject')] = $ob;
+ $tmp[_("Subject")] = $ob;
}
if (($ob = Horde_Mime_Address::addrArray2String($h->getOb('to')))) {
- $tmp[_('To')] = $ob;
+ $tmp[_("To")] = $ob;
}
if (($ob = Horde_Mime_Address::addrArray2String($h->getOb('cc')))) {
- $tmp[_('Cc')] = $ob;
+ $tmp[_("Cc")] = $ob;
}
$max = max(array_map(array('Horde_String', 'length'), array_keys($tmp))) + 2;
{
global $conf;
- $res = $GLOBALS['browser']->wasFileUploaded($name, _('attachment'));
+ $res = $GLOBALS['browser']->wasFileUploaded($name, _("attachment"));
if (is_a($res, 'PEAR_Error')) {
throw new IMP_Compose_Exception($res);
}
/* Check for filesize limitations. */
if (!empty($conf['compose']['attach_size_limit']) &&
(($conf['compose']['attach_size_limit'] - $this->sizeOfAttachments() - $_FILES[$name]['size']) < 0)) {
- throw new IMP_Compose_Exception(sprintf(_('Attached file "%s" exceeds the attachment size limits. File NOT attached.'), $filename), 'horde.error');
+ throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $filename), 'horde.error');
}
/* Store the data in a Horde_Mime_Part. Some browsers do not send the
} else {
$attachment = Horde::getTempFile('impatt', false);
if (move_uploaded_file($tempfile, $attachment) === false) {
- throw new IMP_Compose_Exception(sprintf(_('The file %s could not be attached.'), $filename), 'horde.error');
+ throw new IMP_Compose_Exception(sprintf(_("The file %s could not be attached."), $filename), 'horde.error');
}
}
$attachment = Horde::getTempFile('impatt', false);
$res = file_put_contents($attachment, $part->getContents());
if ($res === false) {
- throw new IMP_Compose_Exception(sprintf(_('Could not attach %s to the message.'), $part->getName()), 'horde.error');
+ throw new IMP_Compose_Exception(sprintf(_("Could not attach %s to the message."), $part->getName()), 'horde.error');
}
if (($type == 'application/octet-stream') &&
/* Check for filesize limitations. */
if (!empty($conf['compose']['attach_size_limit']) &&
(($conf['compose']['attach_size_limit'] - $this->sizeOfAttachments() - $bytes) < 0)) {
- throw new IMP_Compose_Exception(sprintf(_('Attached file "%s" exceeds the attachment size limits. File NOT attached.'), $part->getName()), 'horde.error');
+ throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $part->getName()), 'horde.error');
}
/* Store the data. */
$message_id = reset($message_id);
}
if (!($subject = $h->getValue('subject'))) {
- $subject = _('[No Subject]');
+ $subject = _("[No Subject]");
}
$udate = strtotime($h->getValue('date'));
'/%r/' => $h->getValue('date'),
/* Date as ddd, dd mmm yyyy. */
- '/%d/' => Horde_String::convertCharset(strftime('%a, %d %b %Y', $udate), Horde_Nls::getExternalCharset()),
+ '/%d/' => Horde_String::convertCharset(strftime("%a, %d %b %Y", $udate), Horde_Nls::getExternalCharset()),
/* Date in locale's default. */
- '/%x/' => Horde_String::convertCharset(strftime('%x', $udate), Horde_Nls::getExternalCharset()),
+ '/%x/' => Horde_String::convertCharset(strftime("%x", $udate), Horde_Nls::getExternalCharset()),
/* Date and time in locale's default. */
- '/%c/' => Horde_String::convertCharset(strftime('%c', $udate), Horde_Nls::getExternalCharset()),
+ '/%c/' => Horde_String::convertCharset(strftime("%c", $udate), Horde_Nls::getExternalCharset()),
/* Message-ID. */
'/%m/' => $message_id,
global $conf, $prefs;
if (!$conf['compose']['link_attachments']) {
- throw new IMP_Compose_Exception(_('Linked attachments are forbidden.'));
+ throw new IMP_Compose_Exception(_("Linked attachments are forbidden."));
}
$vfs = VFS::singleton($conf['vfs']['type'], Horde::getDriverConfig('vfs', $conf['vfs']['type']));
$fullpath = sprintf('%s/%s/%d', self::VFS_LINK_ATTACH_PATH, $auth, $ts);
$charset = $part->getCharset();
- $trailer = Horde_String::convertCharset(_('Attachments'), Horde_Nls::getCharset(), $charset);
+ $trailer = Horde_String::convertCharset(_("Attachments"), Horde_Nls::getCharset(), $charset);
if ($prefs->getValue('delete_attachments_monthly')) {
/* Determine the first day of the month in which the current
* attachments will be ripe for deletion, then subtract 1 second
* to obtain the last day of the previous month. */
$del_time = mktime(0, 0, 0, date('n') + $prefs->getValue('delete_attachments_monthly_keep') + 1, 1, date('Y')) - 1;
- $trailer .= Horde_String::convertCharset(' (' . sprintf(_('Links will expire on %s'), strftime('%x', $del_time)) . ')', Horde_Nls::getCharset(), $charset);
+ $trailer .= Horde_String::convertCharset(' (' . sprintf(_("Links will expire on %s"), strftime('%x', $del_time)) . ')', Horde_Nls::getCharset(), $charset);
}
foreach ($this->getAttachments() as $att) {
if ($part->getPrimaryType() == 'multipart') {
$mixed_part = new Horde_Mime_Part();
$mixed_part->setType('multipart/mixed');
- $mixed_part->addPart($part);
+ $mixed_part->addPart(part);
$link_part = new Horde_Mime_Part();
$link_part->setType('text/plain');
$link_part->setCharset($charset);
$link_part->setDisposition('inline');
$link_part->setContents($trailer);
- $link_part->setDescription(_('Attachment Information'));
+ $link_part->setDescription(_("Attachment Information"));
$mixed_part->addPart($link_part);
return $mixed_part;
!empty($GLOBALS['conf']['compose']['reply_limit'])) {
$limit = $GLOBALS['conf']['compose']['reply_limit'];
if (Horde_String::length($msg) > $limit) {
- $msg = Horde_String::substr($msg, 0, $limit) . "\n" . _('[Truncated Text]');
+ $msg = Horde_String::substr($msg, 0, $limit) . "\n" . _("[Truncated Text]");
}
}
switch ($_FILES[$key]['error']) {
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
- $GLOBALS['notification']->push(sprintf(_('Did not attach "%s" as the maximum allowed upload size has been exceeded.'), $filename), 'horde.warning');
+ $GLOBALS['notification']->push(sprintf(_("Did not attach \"%s\" as the maximum allowed upload size has been exceeded."), $filename), 'horde.warning');
break;
case UPLOAD_ERR_PARTIAL:
- $GLOBALS['notification']->push(sprintf(_('Did not attach "%s" as it was only partially uploaded.'), $filename), 'horde.warning');
+ $GLOBALS['notification']->push(sprintf(_("Did not attach \"%s\" as it was only partially uploaded."), $filename), 'horde.warning');
break;
default:
- $GLOBALS['notification']->push(sprintf(_('Did not attach "%s" as the server configuration did not allow the file to be uploaded.'), $filename), 'horde.warning');
+ $GLOBALS['notification']->push(sprintf(_("Did not attach \"%s\" as the server configuration did not allow the file to be uploaded."), $filename), 'horde.warning');
break;
}
$success = false;
} elseif ($_FILES[$key]['size'] == 0) {
- $GLOBALS['notification']->push(sprintf(_('Did not attach "%s" as the file was empty.'), $filename), 'horde.warning');
+ $GLOBALS['notification']->push(sprintf(_("Did not attach \"%s\" as the file was empty."), $filename), 'horde.warning');
$success = false;
} else {
try {
$result = $this->addUploadAttachment($key);
if ($notify) {
- $GLOBALS['notification']->push(sprintf(_('Added "%s" as an attachment.'), $result), 'horde.success');
+ $GLOBALS['notification']->push(sprintf(_("Added \"%s\" as an attachment."), $result), 'horde.success');
}
} catch (IMP_Compose_Exception $e) {
$GLOBALS['notification']->push($e, 'horde.error');
return;
}
- $GLOBALS['notification']->push(_('The message you were composing has been saved as a draft. The next time you login, you may resume composing your message.'));
+ $GLOBALS['notification']->push(_("The message you were composing has been saved as a draft. The next time you login, you may resume composing your message."));
}
/**
try {
$this->_saveDraftServer($data);
- $GLOBALS['notification']->push(_('A message you were composing when your session expired has been recovered. You may resume composing your message by going to your Drafts folder.'));
+ $GLOBALS['notification']->push(_("A message you were composing when your session expired has been recovered. You may resume composing your message by going to your Drafts folder."));
} catch (IMP_Compose_Exception $e) {}
}
}
static public function expandAddresses($addrString)
{
return preg_match('|[^\s]|', $addrString)
- ? self::getAddressList(reset(array_filter(array_map('trim', Horde_Mime_Address::explode($addrString, ',;')))))
+ ? IMP_Compose::getAddressList(reset(array_filter(array_map('trim', Horde_Mime_Address::explode($addrString, ',;')))))
: '';
}
*/
static public function getAddressList($search = '')
{
- $sparams = self::getAddressSearchParams();
+ $sparams = IMP_Compose::getAddressSearchParams();
try {
$res = $GLOBALS['registry']->call('contacts/search', array($search, $sparams['sources'], $sparams['fields'], true));
} catch (Horde_Exception $e) {
'status' => array(
array(
'text' => array(
- _('This message part cannot be viewed because it is too large.'),
- sprintf(_('Click %s to download the data.'), $this->linkView($mime_part, 'download_attach', _('HERE')))
+ _("This message part cannot be viewed because it is too large."),
+ sprintf(_("Click %s to download the data."), $this->linkView($mime_part, 'download_attach', _("HERE")))
)
)
),
($charset_upper != $default_charset)) {
$ret['status'][] = array(
'text' => array(
- sprintf(_('This message was written in a character set (%s) other than your own.'), htmlspecialchars($charset_upper)),
- sprintf(_('If it is not displayed correctly, %s to open it in a new window.'), $this->linkViewJS($mime_part, 'view_attach', _('click here')))
+ sprintf(_("This message was written in a character set (%s) other than your own."), htmlspecialchars($charset_upper)),
+ sprintf(_("If it is not displayed correctly, %s to open it in a new window."), $this->linkViewJS($mime_part, 'view_attach', _("click here")))
)
);
}
($mask & self::SUMMARY_SIZE)) {
$part['bytes'] = $size = $mime_part->getBytes();
$part['size'] = ($size > 1048576)
- ? sprintf(_('%s MB'), number_format($size / 1048576, 1))
- : sprintf(_('%s KB'), max(round($size / 1024), 1));
+ ? sprintf(_("%s MB"), number_format($size / 1048576, 1))
+ : sprintf(_("%s KB"), max(round($size / 1024), 1));
}
/* Get part's icon. */
/* Get part's description. */
$description = $mime_part->getDescription(true);
if (empty($description)) {
- $description = _('unnamed');
+ $description = _("unnamed");
}
if ($mask & self::SUMMARY_DESCRIP_LINK) {
$part['description'] = $this->canDisplay($id, self::RENDER_FULL)
- ? $this->linkViewJS($mime_part, 'view_attach', htmlspecialchars($description), array('jstext' => sprintf(_('View %s'), $description), 'params' => $param_array))
+ ? $this->linkViewJS($mime_part, 'view_attach', htmlspecialchars($description), array('jstext' => sprintf(_("View %s"), $description), 'params' => $param_array))
: htmlspecialchars($description);
} elseif ($mask & self::SUMMARY_DESCRIP_NOLINK) {
$part['description'] = htmlspecialchars($description);
if ($is_atc &&
(is_null($part['bytes']) || $part['bytes'])) {
if ($mask & self::SUMMARY_DOWNLOAD) {
- $part['download'] = $this->linkView($mime_part, 'download_attach', '', array('class' => 'downloadAtc', 'dload' => true, 'jstext' => _('Download')));
+ $part['download'] = $this->linkView($mime_part, 'download_attach', '', array('class' => 'downloadAtc', 'dload' => true, 'jstext' => _("Download")));
} elseif ($mask & self::SUMMARY_DOWNLOAD_NOJS) {
$part['download'] = $this->urlView($mime_part, 'download_attach', array('dload' => true));
}
$download_zip &&
($part['bytes'] > 204800) &&
!in_array($mime_type, array('application/zip', 'application/x-zip-compressed'))) {
- $part['download_zip'] = $this->linkView($mime_part, 'download_attach', null, array('class' => 'downloadZipAtc', 'dload' => true, 'jstext' => sprintf(_('Download %s in .zip Format'), $mime_part->getDescription(true)), 'params' => array('zip' => 1)));
+ $part['download_zip'] = $this->linkView($mime_part, 'download_attach', null, array('class' => 'downloadZipAtc', 'dload' => true, 'jstext' => sprintf(_("Download %s in .zip Format"), $mime_part->getDescription(true)), 'params' => array('zip' => 1)));
}
/* Display the image save link if the required registry calls are
if (($mask && self::SUMMARY_IMAGE_SAVE) &&
$GLOBALS['registry']->hasMethod('images/selectGalleries') &&
($mime_part->getPrimaryType() == 'image')) {
- $part['img_save'] = Horde::link('#', _('Save Image in Gallery'), 'saveImgAtc', null, IMP::popupIMPString('saveimage.php', array('index' => ($this->_index . IMP::IDX_SEP . $this->_mailbox), 'id' => $id), 450, 200) . 'return false;') . '</a>';
+ $part['img_save'] = Horde::link('#', _("Save Image in Gallery"), 'saveImgAtc', null, IMP::popupIMPString('saveimage.php', array('index' => ($this->_index . IMP::IDX_SEP . $this->_mailbox), 'id' => $id), 450, 200) . "return false;") . '</a>';
}
/* Strip Attachment? Allow stripping of base parts other than the
(strpos($id, '.') === false)) {
$url = Horde_Util::removeParameter(Horde::selfUrl(true), array('actionID', 'imapid', 'index'));
$url = Horde_Util::addParameter($url, array('actionID' => 'strip_attachment', 'imapid' => $id, 'index' => $this->_index, 'message_token' => Horde::getRequestToken('imp.impcontents')));
- $part['strip'] = Horde::link($url, _('Strip Attachment'), 'stripAtc', null, "return window.confirm('" . addslashes(_('Are you sure you wish to PERMANENTLY delete this attachment?')) . '\');') . '</a>';
+ $part['strip'] = Horde::link($url, _("Strip Attachment"), 'stripAtc', null, "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete this attachment?")) . "');") . '</a>';
}
return $part;
}
if (empty($options['jstext'])) {
- $options['jstext'] = sprintf(_('View %s'), $mime_part->getDescription(true));
+ $options['jstext'] = sprintf(_("View %s"), $mime_part->getDescription(true));
}
$url = IMP::popupIMPString('view.php', $this->_urlViewParams($mime_part, $actionID, isset($options['params']) ? $options['params'] : array())) . 'return false;';
/* Make sure the key is valid. */
$key_info = $this->pgpPacketInformation($public_key);
if (!isset($key_info['signature'])) {
- throw new Horde_Exception(_('Not a valid public key.'));
+ throw new Horde_Exception(_("Not a valid public key."));
}
/* Remove the '_SIGNATURE' entry. */
/* If there is a cache driver configured, try to get the public key
* from the cache. */
if (empty($options['nocache']) && ($cache = IMP::getCache())) {
- $result = $cache->get('PGPpublicKey_' . $address . $keyid, 3600);
+ $result = $cache->get("PGPpublicKey_" . $address . $keyid, 3600);
if ($result) {
Horde::logMessage('PGPpublicKey: ' . serialize($result), __FILE__, __LINE__, PEAR_LOG_DEBUG);
return $result;
* object exists, store the retrieved public key in the
* cache. */
if (is_object($cache)) {
- $cache->set('PGPpublicKey_' . $address . $keyid, $result, 3600);
+ $cache->set("PGPpublicKey_" . $address . $keyid, $result, 3600);
}
} catch (Horde_Exception $e) {
/* Return now, if no public key found at all. */
Horde::logMessage('PGPpublicKey: ' . $e->getMessage(), __FILE__, __LINE__, PEAR_LOG_DEBUG);
- throw new Horde_Exception(sprintf(_('Could not retrieve public key for %s.'), $address));
+ throw new Horde_Exception(sprintf(_("Could not retrieve public key for %s."), $address));
}
} else {
$result = '';
global $conf;
if (empty($conf['gnupg']['keyserver'])) {
- throw new Horde_Exception(_('Public PGP keyserver support has been disabled.'));
+ throw new Horde_Exception(_("Public PGP keyserver support has been disabled."));
}
$timeout = empty($conf['gnupg']['timeout'])
return $this->getPublicKeyserver($data, $server, $timeout, $additional);
} catch (Horde_Exception $e) {}
}
- throw new Horde_Exception(_('Could not connect to public PGP keyserver'));
+ throw new Horde_Exception(_("Could not connect to public PGP keyserver"));
}
/**
{
$params = array(
'actionID' => 'save_attachment_public_key',
- 'mailbox' => $mailbox,
'uid' => $uid,
'mime_id' => $id
);
/* Make sure the certificate is valid. */
$key_info = openssl_x509_parse($cert);
if (!is_array($key_info) || !isset($key_info['subject'])) {
- throw new Horde_Exception(_('Not a valid public key.'));
+ throw new Horde_Exception(_("Not a valid public key."));
}
/* Add key to the user's address book. */
$email = $this->getEmailFromKey($cert);
if (is_null($email)) {
- throw new Horde_Exception(_('No email information located in the public key.'));
+ throw new Horde_Exception(_("No email information located in the public key."));
}
/* Get the name corresponding to this key. */
} elseif (isset($key_info['subject']['OU'])) {
$name = $key_info['subject']['OU'];
} else {
- throw new Horde_Exception(_('Not a valid public key.'));
+ throw new Horde_Exception(_("Not a valid public key."));
}
$GLOBALS['registry']->call('contacts/addField', array($email, $name, self::PUBKEY_FIELD, $cert, $GLOBALS['prefs']->getValue('add_source')));
{
$params = array(
'actionID' => 'save_attachment_public_key',
- 'mailbox' => $mailbox,
'uid' => $uid,
'mime_id' => $id
);
if (!empty($changes['a'])) {
$result['a'] = array();
foreach ($changes['a'] as $val) {
- $result['a'][] = self::_createFolderElt(is_array($val) ? $val : $imptree->element($val));
+ $result['a'][] = DIMP::_createFolderElt(is_array($val) ? $val : $imptree->element($val));
}
}
// Skip the base element, since any change there won't ever be
// updated on-screen.
if ($val != IMP_Imap_Tree::BASE_ELT) {
- $result['c'][] = self::_createFolderElt($imptree->element($val));
+ $result['c'][] = DIMP::_createFolderElt($imptree->element($val));
}
}
}
$ob = new stdClass;
if ($elt['children']) {
- $ob->ch = 1;
+ $ob->ch = 1;
}
$ob->m = $elt['value'];
if ($ob->m != $elt['name']) {
foreach ($accounts as $val) {
$params = $fm_account->getAllValues($val);
- $driver = self::factory($params['driver'], $params);
+ $driver = IMP_Fetchmail::factory($params['driver'], $params);
if ($driver === false) {
continue;
}
try {
$res = $driver->getMail();
if ($res == 1) {
- $GLOBALS['notification']->push(_('Fetchmail: ') . sprintf(_('Fetched 1 message from %s'), $fm_account->getValue('id', $val)), 'horde.success');
+ $GLOBALS['notification']->push(_("Fetchmail: ") . sprintf(_("Fetched 1 message from %s"), $fm_account->getValue('id', $val)), 'horde.success');
} elseif ($res >= 0) {
- $GLOBALS['notification']->push(_('Fetchmail: ') . sprintf(_('Fetched %d messages from %s'), $res, $fm_account->getValue('id', $val)), 'horde.success');
+ $GLOBALS['notification']->push(_("Fetchmail: ") . sprintf(_("Fetched %d messages from %s"), $res, $fm_account->getValue('id', $val)), 'horde.success');
} else {
- $GLOBALS['notification']->push(_('Fetchmail: no new messages.'), 'horde.success');
+ $GLOBALS['notification']->push(_("Fetchmail: no new messages."), 'horde.success');
}
} catch (Horde_Exception $e) {
- $GLOBALS['notification']->push(_('Fetchmail: ') . $e->getMessage(), 'horde.warning');
+ $GLOBALS['notification']->push(_("Fetchmail: ") . $e->getMessage(), 'horde.warning');
}
}
}
$form .= '<li><label><input type="checkbox" name="accounts[]" checked="checked" value="' . $key . '" /> ' . htmlspecialchars($fm_account->getValue('id', $key)) . '</label></li>';
}
$form .= '</ul>';
- $text = _('Select accounts to fetch mail from:');
+ $text = _("Select accounts to fetch mail from:");
} else {
- $text = _('You have not configured any external mail accounts.');
+ $text = _("You have not configured any external mail accounts.");
$form = -1;
}
$res->params = array();
$res->text = $text;
$res->form = $form;
- $res->ok_text = ($form == -1) ? '' : _('Fetch Mail');
- $res->cancel_text = _('Cancel');
+ $res->ok_text = ($form == -1) ? '' : _("Fetch Mail");
+ $res->cancel_text = _("Cancel");
return $res;
}
{
/* Check for missing params. */
$paramlist = $this->getParameterList();
-
- /* if (array_diff($paramlist, array_keys($params))) {
+ if (array_diff($paramlist, array_keys($params))) {
// TODO: Error message here
- } */
+ }
$this->_params = $params;
}
{
if (!empty($GLOBALS['conf']['fetchmail']['size_limit']) &&
($size > $GLOBALS['conf']['fetchmail']['size_limit'])) {
- $GLOBALS['notification']->push(sprintf(_('The message "%s" from "%s" (%d bytes) exceeds fetch size limit.'), Horde_Mime::decode($subject), Horde_Mime::decode($from), $size), 'horde.warning');
+ $GLOBALS['notification']->push(sprintf(_("The message \"%s\" from \"%s\" (%d bytes) exceeds fetch size limit."), Horde_Mime::decode($subject), Horde_Mime::decode($from), $size), 'horde.warning');
return false;
}
*/
static public function description()
{
- return _('IMAP/POP3 Mail Servers');
+ return _("IMAP/POP3 Mail Servers");
}
/**
{
return array(
'pop3' => array(
- 'name' => _('POP3'),
+ 'name' => _("POP3"),
'string' => 'pop3',
'port' => 110,
'base' => 'POP3',
'secure' => false
),
'pop3tls' => array(
- 'name' => _('POP3 over TLS'),
+ 'name' => _("POP3 over TLS"),
'string' => 'pop3',
'port' => 110,
'base' => 'POP3',
'secure' => 'tls'
),
'pop3ssl' => array(
- 'name' => _('POP3 over SSL'),
+ 'name' => _("POP3 over SSL"),
'string' => 'pop3',
'port' => 995,
'base' => 'POP3',
'secure' => 'ssl'
),
'imap' => array(
- 'name' => _('IMAP'),
+ 'name' => _("IMAP"),
'string' => 'imap',
'port' => 143,
'base' => 'IMAP',
'secure' => false
),
'imaptls' => array(
- 'name' => _('IMAP'),
+ 'name' => _("IMAP"),
'string' => 'imap over TLS',
'port' => 143,
'base' => 'IMAP',
'secure' => 'tls'
),
'imapsslvalid' => array(
- 'name' => _('IMAP over SSL'),
+ 'name' => _("IMAP over SSL"),
'string' => 'imap',
'port' => 993,
'base' => 'IMAP',
try {
$this->_ob = Horde_Imap_Client::getInstance(($protocols[$this->_params['protocol']]['string'] == 'imap') ? 'Socket' : 'Socket_Pop3', $imap_config);
} catch (Horde_Imap_Client_Exception $e) {
- throw new Horde_Exception(_('Cannot connect to the remote mail server: ') . $e->getMessage());
+ throw new Horde_Exception(_("Cannot connect to the remote mail server: ") . $e->getMessage());
}
}
}
if (!$mbox) {
- throw new Horde_Exception(_('Invalid Remote Mailbox'));
+ throw new Horde_Exception(_("Invalid Remote Mailbox"));
}
$query = new Horde_Imap_Client_Search_Query();
*/
public function blacklistMessage($indices, $show_link = true)
{
- if ($this->_processBWlist($indices, _('your blacklist'), 'blacklistFrom', 'showBlacklist', $show_link)) {
+ if ($this->_processBWlist($indices, _("your blacklist"), 'blacklistFrom', 'showBlacklist', $show_link)) {
$imp_message = IMP_Message::singleton();
if (($msg_count = $imp_message->delete($indices))) {
if ($msg_count == 1) {
- $GLOBALS['notification']->push(_('The message has been deleted.'), 'horde.message');
+ $GLOBALS['notification']->push(_("The message has been deleted."), 'horde.message');
} else {
- $GLOBALS['notification']->push(_('The messages have been deleted.'), 'horde.message');
+ $GLOBALS['notification']->push(_("The messages have been deleted."), 'horde.message');
}
return true;
}
*/
public function whitelistMessage($indices, $show_link = true)
{
- return $this->_processBWlist($indices, _('your whitelist'), 'whitelistFrom', 'showWhitelist', $show_link);
+ return $this->_processBWlist($indices, _("your whitelist"), 'whitelistFrom', 'showWhitelist', $show_link);
}
/**
/* Add link to filter management page. */
if ($link && $GLOBALS['registry']->hasMethod('mail/' . $reg2)) {
- $manage_link = Horde::link(Horde::url($GLOBALS['registry']->link('mail/' . $reg2)), sprintf(_('Filters: %s management page'), $descrip)) . _('HERE') . '</a>';
- $GLOBALS['notification']->push(sprintf(_('Click %s to go to %s management page.'), $manage_link, $descrip), 'horde.message', array('content.raw'));
+ $manage_link = Horde::link(Horde::url($GLOBALS['registry']->link('mail/' . $reg2)), sprintf(_("Filters: %s management page"), $descrip)) . _("HERE") . '</a>';
+ $GLOBALS['notification']->push(sprintf(_("Click %s to go to %s management page."), $manage_link, $descrip), 'horde.message', array('content.raw'));
}
return true;
$inbox_entry = array(
'INBOX' => array(
'val' => 'INBOX',
- 'label' => _('Inbox'),
- 'abbrev' => _('Inbox')
+ 'label' => _("Inbox"),
+ 'abbrev' => _("Inbox")
)
);
if (!$force &&
!empty($conf['server']['fixed_folders']) &&
in_array(IMP::folderPref($folder, false), $conf['server']['fixed_folders'])) {
- $notification->push(sprintf(_('The folder "%s" may not be deleted.'), IMP::displayFolder($folder)), 'horde.error');
+ $notification->push(sprintf(_("The folder \"%s\" may not be deleted."), IMP::displayFolder($folder)), 'horde.error');
continue;
}
try {
$GLOBALS['imp_imap']->ob->deleteMailbox($folder);
- $notification->push(sprintf(_('The folder "%s" was successfully deleted.'), IMP::displayFolder($folder)), 'horde.success');
+ $notification->push(sprintf(_("The folder \"%s\" was successfully deleted."), IMP::displayFolder($folder)), 'horde.success');
$deleted[] = $folder;
} catch (Horde_Imap_Client_Exception $e) {
- $notification->push(sprintf(_('The folder "%s" was not deleted. This is what the server said'), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
+ $notification->push(sprintf(_("The folder \"%s\" was not deleted. This is what the server said"), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
}
}
if (!empty($conf['hooks']['permsdenied'])) {
Horde::callHook('_perms_hook_denied', array('imp:create_folders'), 'horde', $message);
}
- $message = @htmlspecialchars(_('You are not allowed to create folders.'), ENT_COMPAT, Horde_Nls::getCharset());
+ $message = @htmlspecialchars(_("You are not allowed to create folders."), ENT_COMPAT, Horde_Nls::getCharset());
} catch (Horde_Exception $e) {
$message = $e->getMessage();
}
$notification->push($message, 'horde.error', array('content.raw'));
return false;
} elseif (!IMP::hasPermission('max_folders')) {
- $message = @htmlspecialchars(sprintf(_('You are not allowed to create more than %d folders.'), IMP::hasPermission('max_folders', true)), ENT_COMPAT, Horde_Nls::getCharset());
+ $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d folders."), IMP::hasPermission('max_folders', true)), ENT_COMPAT, Horde_Nls::getCharset());
try {
if (!empty($conf['hooks']['permsdenied'])) {
Horde::callHook('_perms_hook_denied', array('imp:max_folders'), 'horde', $message);
/* Make sure we are not trying to create a duplicate folder */
if ($this->exists($folder)) {
- $notification->push(sprintf(_('The folder "%s" already exists'), IMP::displayFolder($folder)), 'horde.warning');
+ $notification->push(sprintf(_("The folder \"%s\" already exists"), IMP::displayFolder($folder)), 'horde.warning');
return false;
}
try {
$GLOBALS['imp_imap']->ob->createMailbox($folder);
} catch (Horde_Imap_Client_Exception $e) {
- $notification->push(sprintf(_('The folder "%s" was not created. This is what the server said'), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
+ $notification->push(sprintf(_("The folder \"%s\" was not created. This is what the server said"), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
return false;
}
- $GLOBALS['notification']->push(sprintf(_('The folder "%s" was successfully created.'), IMP::displayFolder($folder)), 'horde.success');
+ $GLOBALS['notification']->push(sprintf(_("The folder \"%s\" was successfully created."), IMP::displayFolder($folder)), 'horde.success');
/* Subscribe, if requested. */
if ($subscribe) {
if (!$force &&
!empty($GLOBALS['conf']['server']['fixed_folders']) &&
in_array(IMP::folderPref($old, false), $GLOBALS['conf']['server']['fixed_folders'])) {
- $GLOBALS['notification']->push(sprintf(_('The folder "%s" may not be renamed.'), IMP::displayFolder($old)), 'horde.error');
+ $GLOBALS['notification']->push(sprintf(_("The folder \"%s\" may not be renamed."), IMP::displayFolder($old)), 'horde.error');
return false;
}
try {
$GLOBALS['imp_imap']->ob->renameMailbox($old, $new);
} catch (Horde_Imap_Client_Exception $e) {
- $GLOBALS['notification']->push(sprintf(_('Renaming "%s" to "%s" failed. This is what the server said'), IMP::displayFolder($old), IMP::displayFolder($new)) . ': ' . $e->getMessage(), 'horde.error');
+ $GLOBALS['notification']->push(sprintf(_("Renaming \"%s\" to \"%s\" failed. This is what the server said"), IMP::displayFolder($old), IMP::displayFolder($new)) . ': ' . $e->getMessage(), 'horde.error');
return false;
}
- $GLOBALS['notification']->push(sprintf(_('The folder "%s" was successfully renamed to "%s".'), IMP::displayFolder($old), IMP::displayFolder($new)), 'horde.success');
+ $GLOBALS['notification']->push(sprintf(_("The folder \"%s\" was successfully renamed to \"%s\"."), IMP::displayFolder($old), IMP::displayFolder($new)), 'horde.success');
foreach ($all_folders as $folder_old) {
$deleted[] = $folder_old;
$subscribed = array();
if (!is_array($folders)) {
- $notification->push(_('No folders were specified'), 'horde.warning');
+ $notification->push(_("No folders were specified"), 'horde.warning');
return false;
}
foreach (array_filter($folders) as $folder) {
try {
$GLOBALS['imp_imap']->ob->subscribeMailbox($folder, true);
- $notification->push(sprintf(_('You were successfully subscribed to "%s"'), IMP::displayFolder($folder)), 'horde.success');
+ $notification->push(sprintf(_("You were successfully subscribed to \"%s\""), IMP::displayFolder($folder)), 'horde.success');
$subscribed[] = $folder;
} catch (Horde_Imap_Client_Exception $e) {
- $notification->push(sprintf(_('You were not subscribed to "%s". Here is what the server said'), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
+ $notification->push(sprintf(_("You were not subscribed to \"%s\". Here is what the server said"), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
$return_value = false;
}
}
$unsubscribed = array();
if (!is_array($folders)) {
- $notification->push(_('No folders were specified'), 'horde.message');
+ $notification->push(_("No folders were specified"), 'horde.message');
return false;
}
foreach (array_filter($folders) as $folder) {
if (strcasecmp($folder, 'INBOX') == 0) {
- $notification->push(sprintf(_('You cannot unsubscribe from "%s".'), IMP::displayFolder($folder)), 'horde.error');
+ $notification->push(sprintf(_("You cannot unsubscribe from \"%s\"."), IMP::displayFolder($folder)), 'horde.error');
} else {
try {
$GLOBALS['imp_imap']->ob->subscribeMailbox($folder, false);
- $notification->push(sprintf(_('You were successfully unsubscribed from "%s"'), IMP::displayFolder($folder)), 'horde.success');
+ $notification->push(sprintf(_("You were successfully unsubscribed from \"%s\""), IMP::displayFolder($folder)), 'horde.success');
$unsubscribed[] = $folder;
} catch (Horde_Imap_Client_Exception $e) {
- $notification->push(sprintf(_('You were not unsubscribed from \"%s\". Here is what the server said'), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
+ $notification->push(sprintf(_("You were not unsubscribed from \"%s\". Here is what the server said"), IMP::displayFolder($folder)) . ': ' . $e->getMessage(), 'horde.error');
$return_value = false;
}
}
const MAILBOX_START_LASTPAGE = 4;
/* IMP internaltring used to separate indexes. */
- const IDX_SEP = '\0';
+ const IDX_SEP = "\0";
/* Are we currently in "print" mode? */
static public $printMode = false;
error_reporting($old_error);
return (!empty($contact_link) && !$contact_link instanceof PEAR_Error)
- ? Horde::link(Horde::url($contact_link), sprintf(_('Go to address book entry of "%s"'), $newName)) . $escapeName . '</a>'
+ ? Horde::link(Horde::url($contact_link), sprintf(_("Go to address book entry of \"%s\""), $newName)) . $escapeName . '</a>'
: $escapeName;
}
(!empty($GLOBALS['conf']['hooks']['permsdenied']) ||
(self::hasPermission('create_folders') &&
self::hasPermission('max_folders')))) {
- $text .= "<option value=\"\" disabled=\"disabled\">- - - - - - - -</option>\n".
- '<option value="*new*">' . _('New Folder') . "</option>\n" .
- "<option value=\"\" disabled=\"disabled\">- - - - - - - -</option>\n";
+ $text .= '<option value="" disabled="disabled">- - - - - - - -</option>' . "\n";
+ $text .= '<option value="*new*">' . _("New Folder") . "</option>\n";
+ $text .= '<option value="" disabled="disabled">- - - - - - - -</option>' . "\n";
}
/* Add the list of mailboxes to the lists. */
$vfolders = $GLOBALS['imp_search']->listQueries(true);
if (!empty($vfolders)) {
$vfolder_sel = $GLOBALS['imp_search']->searchMboxID();
- $text .= "<option value=\"\" disabled=\"disabled\">- - - - - - - - -</option>\n";
+ $text .= '<option value="" disabled="disabled">- - - - - - - - -</option>' . "\n";
foreach ($vfolders as $id => $val) {
$text .= sprintf('<option value="%s"%s>%s</option>%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Horde_Text_Filter::filter($val, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)), "\n");
}
$tasklists = $GLOBALS['registry']->call('tasks/listTasklists', array(false, PERMS_EDIT));
if (count($tasklists)) {
- $text .= '<option value="" disabled="disabled"> </option><option value="" disabled="disabled">- - ' . _('Task Lists') . ' - -</option>' . "\n";
+ $text .= '<option value="" disabled="disabled"> </option><option value="" disabled="disabled">- - ' . _("Task Lists") . ' - -</option>' . "\n";
foreach ($tasklists as $id => $tasklist) {
$text .= sprintf('<option value="%s">%s</option>%s',
try {
$notepads = $GLOBALS['registry']->call('notes/listNotepads', array(false, PERMS_EDIT));
if (count($notepads)) {
- $text .= '<option value="" disabled="disabled"> </option><option value="" disabled="disabled">- - ' . _('Notepads') . " - -</option>\n";
+ $text .= '<option value="" disabled="disabled"> </option><option value="" disabled="disabled">- - ' . _("Notepads") . ' - -</option>' . "\n";
foreach ($notepads as $id => $notepad) {
$text .= sprintf('<option value="%s">%s</option>%s',
if (isset($args['to'])) {
$args['to'] = addcslashes($args['to'], '\\"');
}
- return 'javascript:' . self::popupIMPString('compose.php', $args);
+ return "javascript:" . self::popupIMPString('compose.php', $args);
}
return Horde_Util::addParameter(Horde::applicationUrl(($view == 'mimp') ? 'compose-mimp.php' : 'compose.php'), $args);
/* Substitute any translated prefix text. */
$sub_array = array(
- 'INBOX' => _('Inbox'),
- $prefs->getValue('sent_mail_folder') => _('Sent'),
- $prefs->getValue('drafts_folder') => _('Drafts'),
- $prefs->getValue('trash_folder') => _('Trash'),
- $prefs->getValue('spam_folder') => _('Spam')
+ 'INBOX' => _("Inbox"),
+ $prefs->getValue('sent_mail_folder') => _("Sent"),
+ $prefs->getValue('drafts_folder') => _("Drafts"),
+ $prefs->getValue('trash_folder') => _("Trash"),
+ $prefs->getValue('spam_folder') => _("Spam")
);
/* Strip namespace information. */
$menu = new Horde_Menu(Horde_Menu::MASK_ALL & ~Horde_Menu::MASK_LOGIN);
- $menu->add(self::generateIMPUrl($menu_mailbox_url, 'INBOX'), _('_Inbox'), 'folders/inbox.png');
+ $menu->add(self::generateIMPUrl($menu_mailbox_url, 'INBOX'), _("_Inbox"), 'folders/inbox.png');
if ($_SESSION['imp']['protocol'] != 'pop') {
if ($prefs->getValue('use_trash') &&
if (!empty($mailbox) && !$GLOBALS['imp_imap']->isReadOnly($mailbox)) {
$menu_trash_url = Horde_Util::addParameter(self::generateIMPUrl($menu_mailbox_url, $mailbox), array('actionID' => 'empty_mailbox', 'mailbox_token' => Horde::getRequestToken('imp.mailbox')));
- $menu->add($menu_trash_url, _('Empty _Trash'), 'empty_trash.png', null, null, "return window.confirm('" . addslashes(_('Are you sure you wish to empty your trash folder?')) . "');", '__noselection');
+ $menu->add($menu_trash_url, _("Empty _Trash"), 'empty_trash.png', null, null, "return window.confirm('" . addslashes(_("Are you sure you wish to empty your trash folder?")) . "');", '__noselection');
}
}
if (!empty($spam_folder) &&
$prefs->getValue('empty_spam_menu')) {
$menu_spam_url = Horde_Util::addParameter(self::generateIMPUrl($menu_mailbox_url, $spam_folder), array('actionID' => 'empty_mailbox', 'mailbox_token' => Horde::getRequestToken('imp.mailbox')));
- $menu->add($menu_spam_url, _('Empty _Spam'), 'empty_spam.png', null, null, "return window.confirm('" . addslashes(_('Are you sure you wish to empty your spam folder?')) . "');", '__noselection');
+ $menu->add($menu_spam_url, _("Empty _Spam"), 'empty_spam.png', null, null, "return window.confirm('" . addslashes(_("Are you sure you wish to empty your spam folder?")) . "');", '__noselection');
}
}
- if (self::canCompose()) {
- $menu->add(self::composeLink(array('mailbox' => $GLOBALS['imp_mbox']['mailbox'])), _('_New Message'), 'compose.png');
+ if (IMP::canCompose()) {
+ $menu->add(self::composeLink(array('mailbox' => $GLOBALS['imp_mbox']['mailbox'])), _("_New Message"), 'compose.png');
}
if ($conf['user']['allow_folders']) {
- $menu->add(Horde_Util::nocacheUrl(Horde::applicationUrl('folders.php')), _('_Folders'), 'folders/folder.png');
+ $menu->add(Horde_Util::nocacheUrl(Horde::applicationUrl('folders.php')), _("_Folders"), 'folders/folder.png');
}
if ($_SESSION['imp']['protocol'] != 'pop') {
- $menu->add($menu_search_url, _('_Search'), 'search.png');
+ $menu->add($menu_search_url, _("_Search"), 'search.png');
}
if (($_SESSION['imp']['protocol'] != 'pop') &&
$js_params = array(
'dialog_load' => Horde::applicationUrl('ajax.php', true, -1) . '/FetchmailDialog'
);
- $menu->add('javascript:IMPDialog.display(\'' . self::escapeJSON($js_params) . '\')', _('Fetch Mail'), 'fetchmail.png');
+ $menu->add('javascript:IMPDialog.display(\'' . IMP::escapeJSON($js_params) . '\')', _("Fetch Mail"), 'fetchmail.png');
}
if ($prefs->getValue('filter_menuitem')) {
- $menu->add(Horde::applicationUrl('filterprefs.php'), _('Fi_lters'), 'filters.png');
+ $menu->add(Horde::applicationUrl('filterprefs.php'), _("Fi_lters"), 'filters.png');
}
/* Logout. If IMP can auto login or IMP is providing authentication,
* session. */
$logout_url = self::getLogoutUrl();
- $id = $menu->add($logout_url, _('_Log out'), 'logout.png', $registry->getImageDir('horde'), $logout_target);
+ $id = $menu->add($logout_url, _("_Log out"), 'logout.png', $registry->getImageDir('horde'), $logout_target);
$menu->setPosition($id, Horde_Menu::POS_LAST);
}
Horde::addScriptFile('imp.js', 'imp', true);
$menu_view = $GLOBALS['prefs']->getValue('menu_view');
$ak = $GLOBALS['prefs']->getValue('widget_accesskey')
- ? Horde::getAccessKey(_('Open Fo_lder'))
+ ? Horde::getAccessKey(_("Open Fo_lder"))
: '';
$t->set('ak', $ak);
$t->set('flist', self::flistSelect(array('selected' => $GLOBALS['imp_mbox']['mailbox'], 'inc_vfolder' => true)));
- $t->set('flink', sprintf('%s%s<br />%s</a>', Horde::link('#'), ($menu_view != 'text') ? Horde::img('folders/open.png', _('Open Folder'), ($menu_view == 'icon') ? array('title' => _('Open Folder')) : array()) : '', ($menu_view != 'icon') ? Horde::highlightAccessKey(_('Open Fo_lder'), $ak) : ''));
+ $t->set('flink', sprintf('%s%s<br />%s</a>', Horde::link('#'), ($menu_view != 'text') ? Horde::img('folders/open.png', _("Open Folder"), ($menu_view == 'icon') ? array('title' => _("Open Folder")) : array()) : '', ($menu_view != 'icon') ? Horde::highlightAccessKey(_("Open Fo_lder"), $ak) : ''));
}
$t->set('menu_string', self::getMenu('string'));
$ret['message'] = $long
? sprintf($strings['long'], $quota['usage'], $unit, $quota['limit'], $unit, $ret['percent'])
: sprintf($strings['short'], $ret['percent'], $quota['limit'], $unit);
- $ret['percent'] = sprintf('%.2f', $ret['percent']);
+ $ret['percent'] = sprintf("%.2f", $ret['percent']);
} else {
// Hide unlimited quota message?
if (!empty($_SESSION['imp']['quota']['hide_when_unlimited'])) {
: sprintf($strings['nolimit_short'], $quota['usage'], $unit);
} else {
$ret['message'] = $long
- ? sprintf(_('Quota status: NO LIMIT'))
- : _('No limit');
+ ? sprintf(_("Quota status: NO LIMIT"))
+ : _("No limit");
}
}
$t->set('vinbox', Horde::link(Horde_Util::addParameter(self::generateIMPUrl('mailbox.php', $GLOBALS['imp_search']->createSearchID($vinbox_id)), 'no_newmail_popup', 1)));
}
} else {
- $t->set('msg', ($var == 1) ? _('You have 1 new message.') : sprintf(_('You have %s new messages.'), $var));
+ $t->set('msg', ($var == 1) ? _("You have 1 new message.") : sprintf(_("You have %s new messages."), $var));
}
$t_html = str_replace("\n", ' ', $t->fetch(IMP_TEMPLATES . '/newmsg/alert.html'));
$default = $GLOBALS['prefs']->getValue('default_encrypt');
}
- $enc_opts = array(self::ENCRYPT_NONE => _('No Encryption'));
+ $enc_opts = array(self::ENCRYPT_NONE => _("No Encryption"));
$output = '';
if (!empty($GLOBALS['conf']['gnupg']['path']) &&
$GLOBALS['prefs']->getValue('use_pgp')) {
$enc_opts += array(
- self::PGP_ENCRYPT => _('PGP Encrypt Message'),
- self::PGP_SIGN => _('PGP Sign Message'),
- self::PGP_SIGNENC => _('PGP Sign/Encrypt Message'),
- self::PGP_SYM_ENCRYPT => _('PGP Encrypt Message with passphrase'),
- self::PGP_SYM_SIGNENC => _('PGP Sign/Encrypt Message with passphrase')
+ self::PGP_ENCRYPT => _("PGP Encrypt Message"),
+ self::PGP_SIGN => _("PGP Sign Message"),
+ self::PGP_SIGNENC => _("PGP Sign/Encrypt Message"),
+ self::PGP_SYM_ENCRYPT => _("PGP Encrypt Message with passphrase"),
+ self::PGP_SYM_SIGNENC => _("PGP Sign/Encrypt Message with passphrase")
);
}
if ($GLOBALS['prefs']->getValue('use_smime')) {
$enc_opts += array(
- self::SMIME_ENCRYPT => _('S/MIME Encrypt Message'),
- self::SMIME_SIGN => _('S/MIME Sign Message'),
- self::SMIME_SIGNENC => _('S/MIME Sign/Encrypt Message')
+ self::SMIME_ENCRYPT => _("S/MIME Encrypt Message"),
+ self::SMIME_SIGN => _("S/MIME Sign Message"),
+ self::SMIME_SIGNENC => _("S/MIME Sign/Encrypt Message")
);
}
}
foreach ($enc_opts as $key => $val) {
- $output .= '<option value="' . $key . '"' . (($default == $key) ? ' selected="selected"' : '') . '>' . $val . "</option>\n";
+ $output .= '<option value="' . $key . '"' . (($default == $key) ? ' selected="selected"' : '') . '>' . $val . '</option>' . "\n";
}
return $output;
static public function popupIMPString($url, $params = array(),
$width = 700, $height = 650)
{
- return 'IMP.popup(\'' . Horde::applicationUrl($url) . '\',' . $width . ',' . $height . ',\'' . $GLOBALS['browser']->escapeJSCode(str_replace('+', '%20', substr(Horde_Util::addParameter('', $params, null, false), 1))) . '\');';
+ return "IMP.popup('" . Horde::applicationUrl($url) . "'," . $width . "," . $height . ",'" . $GLOBALS['browser']->escapeJSCode(str_replace('+', '%20', substr(Horde_Util::addParameter('', $params, null, false), 1))) . "');";
}
/**
}
foreach (array_merge(array($js_url), $js_force) as $val) {
- echo '<script type="text/javascript" src="' . $val . "\"></script>\n";
+ echo '<script type="text/javascript" src="' . $val . '"></script>' . "\n";
}
}
}
foreach ($css_out as $file) {
- echo '<link href="' . $file['u'] . "\" rel=\"stylesheet\" type=\"text/css\" />\n";
+ echo '<link href="' . $file['u'] . '" rel="stylesheet" type="text/css" />' . "\n";
}
}
switch ($type) {
case 'PGPPersonal':
- $text = _('Enter your personal PGP passphrase.');
+ $text = _("Enter your personal PGP passphrase.");
break;
case 'PGPSymmetric':
- $text = _('Enter the passphrase used to encrypt this message.');
+ $text = _("Enter the passphrase used to encrypt this message.");
break;
case 'SMIMEPersonal':
- $text = _('Enter your personal S/MIME passphrase.');
+ $text = _("Enter your personal S/MIME passphrase.");
break;
}
'params' => $params,
'text' => $text,
'password' => true,
- 'ok_text' => _('OK'),
- 'cancel_text' => _('Cancel')
+ 'ok_text' => _("OK"),
+ 'cancel_text' => _("Cancel")
);
- return 'IMPDialog.display(\'' . self::escapeJSON($js_params) . '\')';
+ return 'IMPDialog.display(\'' . IMP::escapeJSON($js_params) . '\')';
}
/**
* Reads all the user's identities from the prefs object or builds
* a new identity from the standard values given in prefs.php.
*/
- public function __construct()
+ function __construct()
{
parent::__construct();
$this->_properties = array_merge(
try {
$ob = Horde_Mime_Address::parseAddressList($address, array('defserver' => $_SESSION['imp']['maildomain']));
} catch (Horde_Mime_Exception $e) {
- throw new Horde_Exception (_('Your From address is not a valid email address. This can be fixed in your Personal Information options page.'));
+ throw new Horde_Exception (_("Your From address is not a valid email address. This can be fixed in your Personal Information options page."));
}
if (empty($name)) {
$sig_dashes = $this->getValue('sig_dashes', $ident);
$val = str_replace("\r\n", "\n", $val);
if ($sig_dashes) {
- $val = "-- \n" . $val;
+ $val = "-- \n$val";
}
if (isset($sig_first) && $sig_first) {
$val = "\n" . $val . "\n\n\n";
}
if ($this->_uidvalid[$mailbox]) {
- throw new Horde_Exception(_('Mailbox structure on server has changed.'));
+ throw new Horde_Exception(_("Mailbox structure on server has changed."));
}
}
protected function __construct()
{
if ($_SESSION['imp']['protocol'] != 'imap') {
- throw new Horde_Exception(_('ACL requires an IMAP server.'));
+ throw new Horde_Exception(_("ACL requires an IMAP server."));
}
$capability = $GLOBALS['imp_imap']->ob->queryCapability('ACL');
if (!$capability) {
- throw new Horde_Exception(_('IMAP server does not support ACLs.'));
+ throw new Horde_Exception(_("IMAP server does not support ACLs."));
}
$rfc4314 = $GLOBALS['imp_imap']->ob->queryCapability('RIGHTS');
$this->_rightsList = array(
'l' => array(
- 'desc' => _('List - user can see the folder'),
- 'title' => _('List')
+ 'desc' => _("List - user can see the folder"),
+ 'title' => _("List")
),
'r' => array(
- 'desc' => _('Read messages'),
- 'title' => _('Read')
+ 'desc' => _("Read messages"),
+ 'title' => _("Read")
),
's' => array(
- 'desc' => _('Mark with Seen/Unseen flags'),
- 'title' => _('Mark (Seen)')
+ 'desc' => _("Mark with Seen/Unseen flags"),
+ 'title' => _("Mark (Seen)")
),
'w' => array(
- 'desc' => _('Mark with other flags (e.g. Important/Answered)'),
- 'title' => _('Mark (Other)')
+ 'desc' => _("Mark with other flags (e.g. Important/Answered)"),
+ 'title' => _("Mark (Other)")
),
'i' => array(
- 'desc' => _('Insert messages'),
- 'title' => _('Insert')
+ 'desc' => _("Insert messages"),
+ 'title' => _("Insert")
),
'p' => array(
- 'desc' => _('Post to this folder (not enforced by IMAP)'),
- 'title' => _('Post')
+ 'desc' => _("Post to this folder (not enforced by IMAP)"),
+ 'title' => _("Post")
),
'a' => array(
- 'desc' => _('Administer - set permissions for other users'),
- 'title' => _('Administer')
+ 'desc' => _("Administer - set permissions for other users"),
+ 'title' => _("Administer")
)
);
// RFC 4314 compliant rights
$this->_rightsList = array_merge($this->_rightsList, array(
'k' => array(
- 'desc' => _('Create sub folders'),
- 'title' => _('Create Folders')
+ 'desc' => _("Create sub folders"),
+ 'title' => _("Create Folders")
),
'x' => array(
- 'desc' => _('Delete sub folders'),
- 'title' => _('Delete Folders')
+ 'desc' => _("Delete sub folders"),
+ 'title' => _("Delete Folders")
),
't' => array(
- 'desc' => _('Delete messages'),
- 'title' => _('Delete')
+ 'desc' => _("Delete messages"),
+ 'title' => _("Delete")
),
'e' => array(
- 'desc' => _('Purge messages'),
- 'title' => _('Purge')
+ 'desc' => _("Purge messages"),
+ 'title' => _("Purge")
)
));
} else {
// RFC 2086 compliant rights
$this->_rightsList = array_merge($this->_rightsList, array(
'c' => array(
- 'desc' =>_('Create sub folders'),
- 'title' => _('Create Folder')
+ 'desc' =>_("Create sub folders"),
+ 'title' => _("Create Folder")
),
'd' => array(
- 'desc' => _('Delete and purge messages'),
- 'title' => _('Delete/Purge')
+ 'desc' => _("Delete and purge messages"),
+ 'title' => _("Delete/Purge")
)
));
}
try {
return $GLOBALS['imp_imap']->ob->getACL($mbox);
} catch (Horde_Imap_Client_Exception $e) {
- throw new Horde_Exception(_('Could not retrieve ACL'));
+ throw new Horde_Exception(_("Could not retrieve ACL"));
}
}
try {
$GLOBALS['imp_imap']->ob->setACL($mbox, $user, array('rights' => $acl));
} catch (Horde_Imap_Client_Exception $e) {
- throw new Horde_Exception(sprintf(_('Could not give user "%s" the following rights for the folder "%s": %s'), $user, $mbox, implode('', $acl)));
+ throw new Horde_Exception(sprintf(_("Couldn't give user \"%s\" the following rights for the folder \"%s\": %s"), $user, $mbox, implode('', $acl)));
}
}
/* Flags are named PREFIX{$i}. Keep incrementing until we find the
* next available flag. */
- for ($i = 0;; ++$i) {
+ for ($i = 0; ; ++$i) {
$curr = self::PREFIX . $i;
if (!isset($this->_flags[$curr])) {
$this->_flags[$curr] = array(
/* Must set these values here because PHP 5 does not allow assignment
* of const's to gettext strings. */
- $this->VFOLDER_LABEL = _('Virtual Folders');
+ $this->VFOLDER_LABEL = _("Virtual Folders");
$this->VFOLDER_KEY = $this->VFOLDER_LABEL . '%';
- $this->SHARED_LABEL = _('Shared Folders');
+ $this->SHARED_LABEL = _("Shared Folders");
$this->SHARED_KEY = $this->SHARED_LABEL . '%';
- $this->OTHER_LABEL = _('Other Users\' Folders');
+ $this->OTHER_LABEL = _("Other Users' Folders");
$this->OTHER_KEY = $this->OTHER_LABEL . '%';
$this->init();
$this->_showunsub = $old_showunsub;
return false;
} else {
- $i = count($this->_currstack);
do {
$old = array_pop($this->_currstack);
$this->_currkey = $old['k'] + 1;
$this->_currparent = $old['p'];
- } while ((($curr = $this->current()) == false) && --$i);
+ } while ((($curr = $this->current()) == false) &&
+ count($this->_currstack));
}
}
*/
public function peek()
{
- for ($i = ($this->_currkey + 1);; ++$i) {
+ for ($i = ($this->_currkey + 1); ; ++$i) {
if (!isset($this->_parent[$this->_currparent][$i])) {
return false;
}
}
}
+
switch ($mailbox['v']) {
case 'INBOX':
$row['icon'] = 'folders/inbox.png';
- $row['alt'] = _('Inbox');
+ $row['alt'] = _("Inbox");
$row['special'] = self::SPECIAL_INBOX;
break;
case $elt['trash']:
if ($GLOBALS['prefs']->getValue('use_vtrash')) {
$row['icon'] = ($this->isOpen($mailbox)) ? 'folders/open.png' : 'folders/folder.png';
- $row['alt'] = _('Mailbox');
+ $row['alt'] = _("Mailbox");
} else {
$row['icon'] = 'folders/trash.png';
- $row['alt'] = _('Trash folder');
+ $row['alt'] = _("Trash folder");
$row['special'] = self::SPECIAL_TRASH;
}
break;
case $elt['draft']:
$row['icon'] = 'folders/drafts.png';
- $row['alt'] = _('Draft folder');
+ $row['alt'] = _("Draft folder");
$row['special'] = self::SPECIAL_DRAFT;
break;
case $elt['spam']:
$row['icon'] = 'folders/spam.png';
- $row['alt'] = _('Spam folder');
+ $row['alt'] = _("Spam folder");
$row['special'] = self::SPECIAL_SPAM;
break;
default:
if (in_array($mailbox['v'], $elt['sent'])) {
$row['icon'] = 'folders/sent.png';
- $row['alt'] = _('Sent mail folder');
+ $row['alt'] = _("Sent mail folder");
$row['special'] = self::SPECIAL_SENT;
} else {
$row['icon'] = ($this->isOpen($mailbox)) ? 'folders/open.png' : 'folders/folder.png';
- $row['alt'] = _('Mailbox');
+ $row['alt'] = _("Mailbox");
}
break;
}
if ($GLOBALS['imp_search']->isVTrashFolder($mailbox['v'])) {
$row['specialvfolder'] = true;
$row['icon'] = 'folders/trash.png';
- $row['alt'] = _('Virtual Trash Folder');
+ $row['alt'] = _("Virtual Trash Folder");
} elseif ($GLOBALS['imp_search']->isVINBOXFolder($mailbox['v'])) {
$row['specialvfolder'] = true;
$row['icon'] = 'folders/inbox.png';
- $row['alt'] = _('Virtual INBOX Folder');
+ $row['alt'] = _("Virtual INBOX Folder");
}
}
} else {
$row['container'] = true;
if ($this->_forceopen && $this->isOpen($mailbox)) {
$row['icon'] = 'folders/open.png';
- $row['alt'] = _('Opened Folder');
+ $row['alt'] = _("Opened Folder");
} else {
$row['icon'] = 'folders/folder.png';
$row['iconopen'] = 'folders/open.png';
- $row['alt'] = ($this->_forceopen) ? _('Closed Folder') : _('Folder');
+ $row['alt'] = ($this->_forceopen) ? _("Closed Folder") : _("Folder");
}
if ($this->isVFolder($mailbox)) {
$row['vfolder'] = true;
return $new;
}
}
- throw new Horde_Exception(_('Cannot directly create mailbox in this folder.'), 'horde.error');
+ throw new Horde_Exception(_("Cannot directly create mailbox in this folder."), 'horde.error');
}
$mbox = $ns_info['name'];
*/
public function describe()
{
- return sprintf(_('All old linked attachments more than %s months old will be deleted.'), $GLOBALS['prefs']->getValue('delete_attachments_monthly_keep'));
+ return sprintf(_("All old linked attachments more than %s months old will be deleted."), $GLOBALS['prefs']->getValue('delete_attachments_monthly_keep'));
}
}
foreach (array_keys($old_folders) as $k) {
foreach ($sent_mail_folders as $folder) {
if (preg_match('/^' . str_replace('/', '\/', $folder) . '-([^-]+)-([0-9]{4})$/i', $k, $regs)) {
- $folder_array[$k] = Horde_String::convertCharset((is_numeric($regs[1])) ? mktime(0, 0, 0, $regs[1], 1, $regs[2]) : strtotime($regs[1] . ' 1, ' . $regs[2]), Horde_Nls::getCharset(), 'UTF7-IMAP');
+ $folder_array[$k] = Horde_String::convertCharset((is_numeric($regs[1])) ? mktime(0, 0, 0,$regs[1], 1, $regs[2]) : strtotime("$regs[1] 1, $regs[2]"), Horde_Nls::getCharset(), 'UTF7-IMAP');
}
}
}
/* See if any folders need to be purged. */
$purge_folders = array_slice(array_keys($folder_array), $GLOBALS['prefs']->getValue('delete_sentmail_monthly_keep'));
if (count($purge_folders)) {
- $GLOBALS['notification']->push(_('Old sent-mail folders being purged.'), 'horde.message');
+ $GLOBALS['notification']->push(_("Old sent-mail folders being purged."), 'horde.message');
/* Delete the old folders now. */
if ($imp_folder->delete($purge_folders, true)) {
*/
public function describe()
{
- return sprintf(_('All old sent-mail folders more than %s months old will be deleted.'), $GLOBALS['prefs']->getValue('delete_sentmail_monthly_keep'));
+ return sprintf(_("All old sent-mail folders more than %s months old will be deleted."), $GLOBALS['prefs']->getValue('delete_sentmail_monthly_keep'));
}
}
if ($imp_message->delete(array($mbox => $msg_ids), array('nuke' => true))) {
$msgcount = count($msg_ids);
if ($msgcount == 1) {
- $GLOBALS['notification']->push(sprintf(_('Purging 1 message from sent-mail folder %s.'), IMP::displayFolder($mbox)), 'horde.message');
+ $GLOBALS['notification']->push(sprintf(_("Purging 1 message from sent-mail folder %s."), IMP::displayFolder($mbox)), 'horde.message');
} else {
- $GLOBALS['notification']->push(sprintf(_('Purging %d messages from sent-mail folder.'), $msgcount, IMP::displayFolder($mbox)), 'horde.message');
+ $GLOBALS['notification']->push(sprintf(_("Purging %d messages from sent-mail folder."), $msgcount, IMP::displayFolder($mbox)), 'horde.message');
}
}
}
{
$mbox_list = array_map(array('IMP', 'displayFolder'), $this->_getFolders());
- return sprintf(_('All messages in the folder(s) "%s" older than %s days will be permanently deleted.'),
+ return sprintf(_("All messages in the folder(s) \"%s\" older than %s days will be permanently deleted."),
implode(', ', $mbox_list),
$GLOBALS['prefs']->getValue('purge_sentmail_keep'));
}
$imp_message = IMP_Message::singleton();
if ($imp_message->delete(array($spam_folder => $msg_ids), array('nuke' => true))) {
$msgcount = count($msg_ids);
- $notification->push(sprintf(ngettext('Purging %d message from Spam folder.', 'Purging %d messages from Spam folder.', $msgcount), $msgcount), 'horde.message');
+ $notification->push(sprintf(ngettext("Purging %d message from Spam folder.", "Purging %d messages from Spam folder.", $msgcount), $msgcount), 'horde.message');
}
return true;
*/
public function describe()
{
- return sprintf(_('All messages in your "%s" folder older than %s days will be permanently deleted.'),
+ return sprintf(_("All messages in your \"%s\" folder older than %s days will be permanently deleted."),
IMP::displayFolder(IMP::folderPref($GLOBALS['prefs']->getValue('spam_folder'), true)),
$GLOBALS['prefs']->getValue('purge_spam_keep'));
}
$imp_message = IMP_Message::singleton();
if ($imp_message->delete(array($trash_folder => $msg_ids), array('nuke' => true))) {
$msgcount = count($msg_ids);
- $notification->push(sprintf(ngettext('Purging %d message from Trash folder.', 'Purging %d messages from Trash folder.', $msgcount), $msgcount), 'horde.message');
+ $notification->push(sprintf(ngettext("Purging %d message from Trash folder.", "Purging %d messages from Trash folder.", $msgcount), $msgcount), 'horde.message');
}
return true;
*/
public function describe()
{
- return sprintf(_('All messages in your "%s" folder older than %s days will be permanently deleted.'),
+ return sprintf(_("All messages in your \"%s\" folder older than %s days will be permanently deleted."),
IMP::displayFolder(IMP::folderPref($GLOBALS['prefs']->getValue('trash_folder'), true)),
$GLOBALS['prefs']->getValue('purge_trash_keep'));
}
Only do this if sent-mail folder currently exists. */
if ($imp_folder->exists($sent_folder)) {
$old_folder = $this->_renameSentmailMonthlyName($sent_folder);
- $GLOBALS['notification']->push(sprintf(_('%s folder being renamed at the start of the month.'), IMP::displayFolder($sent_folder)), 'horde.message');
+ $GLOBALS['notification']->push(sprintf(_("%s folder being renamed at the start of the month."), IMP::displayFolder($sent_folder)), 'horde.message');
if ($imp_folder->exists($old_folder)) {
- $GLOBALS['notification']->push(sprintf(_('%s already exists. Your %s folder was not renamed.'), IMP::displayFolder($old_folder), IMP::displayFolder($sent_folder)), 'horde.warning');
+ $GLOBALS['notification']->push(sprintf(_("%s already exists. Your %s folder was not renamed."), IMP::displayFolder($old_folder), IMP::displayFolder($sent_folder)), 'horde.warning');
$success = false;
} else {
$success =
$new_folders[] = IMP::displayFolder($this->_renameSentmailMonthlyName($folder));
}
- return sprintf(_('The current folder(s) "%s" will be renamed to "%s".'), implode(', ', $old_folders), implode(', ', $new_folders));
+ return sprintf(_("The current folder(s) \"%s\" will be renamed to \"%s\"."), implode(', ', $old_folders), implode(', ', $new_folders));
}
/**
if (!in_array($page, array('mailbox', 'message')) ||
($GLOBALS['imp_mbox']['mailbox'] != 'INBOX')) {
- $items[IMP::generateIMPUrl('mailbox-mimp.php', 'INBOX')] = _('Inbox');
+ $items[IMP::generateIMPUrl('mailbox-mimp.php', 'INBOX')] = _("Inbox");
}
if (($page != 'compose') && IMP::canCompose()) {
- $items[Horde_Util::addParameter(Horde::applicationUrl('compose-mimp.php'), 'u', uniqid(mt_rand()))] = _('New Message');
+ $items[Horde_Util::addParameter(Horde::applicationUrl('compose-mimp.php'), 'u', uniqid(mt_rand()))] = _("New Message");
}
if ($page != 'folders') {
- $items[Horde::applicationUrl('folders-mimp.php')] = _('Folders');
+ $items[Horde::applicationUrl('folders-mimp.php')] = _("Folders");
}
// @TODO - Options for mobile browsers
// if ($options_link = Horde::getServiceLink('options', 'mimp')) {
- // $items[Horde_Util::addParameter($options_link, 'mobile', 1, false)] = _('Options');
+ // $items[Horde_Util::addParameter($options_link, 'mobile', 1, false)] = _("Options");
// }
$logout_link = IMP::getLogoutUrl(Horde_Auth::REASON_LOGOUT);
if (!empty($logout_link)) {
- $items[$logout_link] = _('Log out');
+ $items[$logout_link] = _("Log out");
}
foreach ($items as $link => $label) {
}
} catch (Horde_Imap_Client_Exception $e) {
$this->_sorted = $this->_sortedMbox = array();
- $GLOBALS['notification']->push(_('Mailbox listing failed') . ': ' . $e->getMessage(), 'horde.error');
+ $GLOBALS['notification']->push(_("Mailbox listing failed") . ': ' . $e->getMessage(), 'horde.error');
}
} else {
$sortpref = IMP::getSort($this->_mailbox);
$this->_sorted = $res['sort'];
} catch (Horde_Imap_Client_Exception $e) {
$this->_sorted = array();
- $GLOBALS['notification']->push(_('Mailbox listing failed') . ': ' . $e->getMessage(), 'horde.error');
+ $GLOBALS['notification']->push(_("Mailbox listing failed") . ': ' . $e->getMessage(), 'horde.error');
}
}
}
} else {
switch ($entry['action']) {
case 'forward':
- $msg = sprintf(_('You forwarded this message on %%s to the following recipients: %s.'), $entry['recipients']);
+ $msg = sprintf(_("You forwarded this message on %%s to the following recipients: %s."), $entry['recipients']);
break;
case 'mdn':
break;
case 'redirect':
- $msg = sprintf(_('You redirected this message to %s on %%s.'), $entry['recipients']);
+ $msg = sprintf(_("You redirected this message to %s on %%s."), $entry['recipients']);
break;
case 'reply':
- $msg = _('You replied to this message on %s.');
+ $msg = _("You replied to this message on %s.");
break;
}
}
switch ($action) {
case 'move':
$imap_move = true;
- $message = _('There was an error moving messages from "%s" to "%s". This is what the server said');
+ $message = _("There was an error moving messages from \"%s\" to \"%s\". This is what the server said");
break;
case 'copy':
- $message = _('There was an error copying messages from "%s" to "%s". This is what the server said');
+ $message = _("There was an error copying messages from \"%s\" to \"%s\". This is what the server said");
break;
}
$error = null;
if ($GLOBALS['imp_imap']->isReadOnly($targetMbox)) {
- $error = _('The target directory is read-only.');
+ $error = _("The target directory is read-only.");
}
if (!$error &&
($action == 'move') &&
$GLOBALS['imp_imap']->isReadOnly($mbox)) {
- $error = _('The source directory is read-only.');
+ $error = _("The source directory is read-only.");
}
if (!$error) {
$use_trash = $prefs->getValue('use_trash');
$use_vtrash = $prefs->getValue('use_vtrash');
if ($use_trash && !$use_vtrash && empty($trash)) {
- $notification->push(_('Cannot move messages to Trash - no Trash mailbox set in preferences.'), 'horde.error');
+ $notification->push(_("Cannot move messages to Trash - no Trash mailbox set in preferences."), 'horde.error');
return false;
}
$error = null;
if ($GLOBALS['imp_imap']->isReadOnly($mbox)) {
- $error = _('This folder is read-only.');
+ $error = _("This folder is read-only.");
}
if (!$error) {
}
if ($error) {
- $notification->push(sprintf(_('There was an error deleting messages from the folder "%s".'), IMP::displayFolder($mbox)) . ' ' . $error, 'horde.error');
+ $notification->push(sprintf(_("There was an error deleting messages from the folder \"%s\"."), IMP::displayFolder($mbox)) . ' ' . $error, 'horde.error');
$return_value = false;
continue;
}
if (!$res) {
switch ($type) {
case 'task':
- $notification->push(_('An unknown error occured while creating the new task.'), 'horde.error');
+ $notification->push(_("An unknown error occured while creating the new task."), 'horde.error');
break;
case 'note':
- $notification->push(_('An unknown error occured while creating the new note.'), 'horde.error');
+ $notification->push(_("An unknown error occured while creating the new note."), 'horde.error');
break;
}
} elseif (!is_null($lists)) {
$name = sprintf('<a href="%s">%s</a>', Horde::url($link), $name);
}
- $notification->push(sprintf(_('%s was successfully added to "%s".'), $name, htmlspecialchars($lists[$list]->get('name'))), 'horde.success', array('content.raw'));
+ $notification->push(sprintf(_("%s was successfully added to \"%s\"."), $name, htmlspecialchars($lists[$list]->get('name'))), 'horde.success', array('content.raw'));
} catch (Horde_Exception $e) {}
}
}
{
/* Return error if no index was provided. */
if (!($msgList = IMP::parseIndicesList($indices))) {
- throw new Horde_Exception(_('An error occured while attempting to strip the attachment.'));
+ throw new Horde_Exception(_("An error occured while attempting to strip the attachment."));
}
/* If more than one index provided, return error. */
reset($msgList);
list($mbox, $index) = each($msgList);
if (each($msgList) || (count($index) > 1)) {
- throw new Horde_Exception(_('An error occured while attempting to strip the attachment.'));
+ throw new Horde_Exception(_("An error occured while attempting to strip the attachment."));
}
$index = implode('', $index);
if ($GLOBALS['imp_imap']->isReadOnly($mbox)) {
- throw new Horde_Exception(_('Cannot strip the MIME part as the mailbox is read-only'));
+ throw new Horde_Exception(_("Cannot strip the MIME part as the mailbox is read-only"));
}
$GLOBALS['imp_imap']->checkUidvalidity($mbox);
/* For stripping all parts, it only makes sense to strip base
* parts. Stripping subparts may cause issues with display of the
* parent multipart type. */
- for ($i = 2;; ++$i) {
+ for ($i = 2; ; ++$i) {
$part = $contents->getMIMEPart($i, array('nocontents' => true));
if (!$part) {
break;
/* We need to make sure all text is in the correct charset. */
$newPart->setCharset(Horde_Nls::getCharset());
- $newPart->setContents(sprintf(_('[Attachment stripped: Original attachment type: %s, name: %s]'), $oldPart->getType(), $oldPart->getName(true)));
+ $newPart->setContents(sprintf(_("[Attachment stripped: Original attachment type: %s, name: %s]"), $oldPart->getType(), $oldPart->getName(true)));
$message->alterPart($partid, $newPart);
}
$uid = $GLOBALS['imp_imap']->ob->append($mbox, array(array('data' => $message->toString(array('headers' => $res['headertext'][0], 'stream' => true)), 'flags' => $res['flags'], 'messageid' => $res['envelope']['message-id'])));
} catch (Horde_Imap_Client_Exception $e) {
- throw new Horde_Exception(_('An error occured while attempting to strip the attachment.'));
+ throw new Horde_Exception(_("An error occured while attempting to strip the attachment."));
}
$this->delete($indices, array('nuke' => true, 'keeplog' => true));
$error = null;
if ($GLOBALS['imp_imap']->isReadOnly($mbox)) {
- $error = _('This folder is read-only.');
+ $error = _("This folder is read-only.");
}
if (!$error) {
}
if ($error) {
- $GLOBALS['notification']->push(sprintf(_('There was an error flagging messages in the folder "%s". This folder is read-only.'), IMP::displayFolder($mbox)), 'horde.error');
+ $GLOBALS['notification']->push(sprintf(_("There was an error flagging messages in the folder \"%s\". This folder is read-only."), IMP::displayFolder($mbox)), 'horde.error');
return false;
}
}
$display_mbox = IMP::displayFolder($mbox);
if ($GLOBALS['imp_imap']->isReadOnly($mbox)) {
- $notification->push(sprintf(_('Could not delete messages from %s. This mailbox is read-only.'), $display_mbox), 'horde.error');
+ $notification->push(sprintf(_("Could not delete messages from %s. This mailbox is read-only."), $display_mbox), 'horde.error');
continue;
}
if ($imp_search->isVTrashFolder($mbox)) {
$this->expungeMailbox(array_flip($imp_search->getSearchFolders($mbox)));
- $notification->push(_('Emptied all messages from Virtual Trash Folder.'), 'horde.success');
+ $notification->push(_("Emptied all messages from Virtual Trash Folder."), 'horde.success');
continue;
}
try {
$status = $GLOBALS['imp_imap']->ob->status($mbox, Horde_Imap_Client::STATUS_MESSAGES);
if (empty($status['messages'])) {
- $notification->push(sprintf(_('The mailbox %s is already empty.'), $display_mbox), 'horde.message');
+ $notification->push(sprintf(_("The mailbox %s is already empty."), $display_mbox), 'horde.message');
continue;
}
$this->delete($indices);
}
- $notification->push(sprintf(_('Emptied all messages from %s.'), $display_mbox), 'horde.success');
+ $notification->push(sprintf(_("Emptied all messages from %s."), $display_mbox), 'horde.success');
} catch (Horde_Imap_Client_Exception $e) {}
}
}
$size += $v['size'];
}
return ($formatted)
- ? sprintf(_('%.2fMB'), $size / (1024 * 1024))
+ ? sprintf(_("%.2fMB"), $size / (1024 * 1024))
: $size;
} catch (Horde_Imap_Client_Exception $e) {
return 0;
'data' => '',
'status' => array(
array(
- 'text' => array(_('There are no alternative parts that can be displayed inline.')),
+ 'text' => array(_("There are no alternative parts that can be displayed inline.")),
'type' => 'info'
)
),
$data_name = $data_part->getName(true);
if (empty($data_name)) {
- $data_name = _('unnamed');
+ $data_name = _("unnamed");
}
$status = array(
- 'icon' => Horde::img('apple.png', _('Macintosh File')),
+ 'icon' => Horde::img('apple.png', _("Macintosh File")),
'text' => array(
- sprintf(_('This message contains a Macintosh file (named "%s").'), $data_name),
- sprintf(_('The Macintosh resource fork can be downloaded %s.'), $this->_params['contents']->linkViewJS($applefile_part, 'download_attach', _('HERE'), array('jstext' => _('The Macintosh resource fork'))))
+ sprintf(_("This message contains a Macintosh file (named \"%s\")."), $data_name),
+ sprintf(_("The Macintosh resource fork can be downloaded %s."), $this->_params['contents']->linkViewJS($applefile_part, 'download_attach', _("HERE"), array('jstext' => _("The Macintosh resource fork"))))
)
);
$ret = array();
if ($inline && (($disp = $this->_params['contents']->canDisplay($data_part, IMP_Contents::RENDER_INLINE | IMP_Contents::RENDER_INFO)))) {
$ret = $this->_params['contents']->renderMIMEPart($data_id, $disp, array('params' => $this->_params));
- $status['text'][] = _('The contents of the Macintosh file are below.');
+ $status['text'][] = _("The contents of the Macintosh file are below.");
} else {
- $status['text'][] = sprintf(_('The contents of the Macintosh file can be downloaded %s.'), $this->_params['contents']->linkViewJS($data_part, 'download_attach', _('HERE'), array('jstext' => _('The Macintosh file'))));
+ $status['text'][] = sprintf(_("The contents of the Macintosh file can be downloaded %s."), $this->_params['contents']->linkViewJS($data_part, 'download_attach', _("HERE"), array('jstext' => _("The Macintosh file"))));
}
foreach ($parts_list as $val) {
$cleanhtml['status'][] = array(
'icon' => Horde::img('mime/image.png'),
'text' => array(
- Horde_String::convertCharset(_('Images have been blocked to protect your privacy.'), $charset, $msg_charset),
- Horde::link(Horde_Util::addParameter($url, 'view_html_images', 1), '', 'unblockImageLink') . Horde_String::convertCharset(_('Show Images?'), $charset, $msg_charset) . '</a>'
+ Horde_String::convertCharset(_("Images have been blocked to protect your privacy."), $charset, $msg_charset),
+ Horde::link(Horde_Util::addParameter($url, 'view_html_images', 1), '', 'unblockImageLink') . Horde_String::convertCharset(_("Show Images?"), $charset, $msg_charset) . '</a>'
)
);
/* The browser cannot view this image. Inform the user of this and
* ask user if we should convert to another image type. */
- $status = array(_('Your browser does not support inline display of this image type.'));
+ $status = array(_("Your browser does not support inline display of this image type."));
/* See if we can convert to an inline browser viewable form. */
if ($GLOBALS['browser']->hasFeature('javascript')) {
$img = $this->_getHordeImageOb(false);
if ($img &&
$GLOBALS['browser']->isViewable($img->getContentType())) {
- $convert_link = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _('HERE'), array('params' => array('imp_img_view' => 'load_convert')));
- $status[] = sprintf(_('Click %s to convert the image file into a format your browser can attempt to view.'), $convert_link);
+ $convert_link = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("HERE"), array('params' => array('imp_img_view' => 'load_convert')));
+ $status[] = sprintf(_("Click %s to convert the image file into a format your browser can attempt to view."), $convert_link);
}
}
return array();
}
- $status = array(sprintf(_('An image named %s is attached to this message. A thumbnail is below.'), $this->_mimepart->getName(true)));
+ $status = array(sprintf(_("An image named %s is attached to this message. A thumbnail is below."), $this->_mimepart->getName(true)));
if ($GLOBALS['browser']->hasFeature('javascript')) {
- $status[] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag('view_thumbnail', _('View Attachment')), null, null, null);
+ $status[] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag('view_thumbnail', _("View Attachment")), null, null, null);
} else {
- $status[] = Horde::link($this->_params['contents']->urlView($this->_mimepart, 'view_attach')) . $this->_outputImgTag('view_thumbnail', _('View Attachment')) . '</a>';
+ $status[] = Horde::link($this->_params['contents']->urlView($this->_mimepart, 'view_attach')) . $this->_outputImgTag('view_thumbnail', _("View Attachment")) . '</a>';
}
return array(
'data' => '',
'status' => array(
array(
- 'icon' => Horde::img('mime/image.png', _('Thumbnail of attached image')),
+ 'icon' => Horde::img('mime/image.png', _("Thumbnail of attached image")),
'text' => $status
)
),
*/
protected function _popupImageWindow()
{
- $loading = _('Loading...');
+ $loading = _("Loading...");
$self_url = Horde_Util::addParameter(IMP::selfUrl(), array('imp_img_view' => ((Horde_Util::getFormData('imp_img_view') == 'load_convert') ? 'view_convert' : 'data')));
$title = $this->_mimepart->getName(true);
if (!$vCal->parsevCalendar($data, 'VCALENDAR', $this->_mimepart->getCharset())) {
return array(
$mime_id => array(
- 'data' => '<h1>' . _('The calendar data is invalid') . '</h1>' . '<pre>' . htmlspecialchars($data) . '</pre>',
+ 'data' => '<h1>' . _("The calendar data is invalid") . '</h1>' . '<pre>' . htmlspecialchars($data) . '</pre>',
'status' => array(),
'type' => 'text/html; charset=' . $charset
)
$guid = $components[$key]->getAttribute('UID');
try {
$registry->call('calendar/delete', array('guid' => $guid));
- $msgs[] = array('success', _('Event successfully deleted.'));
+ $msgs[] = array('success', _("Event successfully deleted."));
} catch (Horde_Exception $e) {
- $msgs[] = array('error', _('There was an error deleting the event:') . ' ' . $e->getMessage());
+ $msgs[] = array('error', _("There was an error deleting the event:") . ' ' . $e->getMessage());
}
} else {
- $msgs[] = array('warning', _('This action is not supported.'));
+ $msgs[] = array('warning', _("This action is not supported."));
}
break;
if ($registry->hasMethod('calendar/updateAttendee')) {
try {
$event = $registry->call('calendar/updateAttendee', array('response' => $components[$key], 'sender' => $params[0]->getFromAddress()));
- $msgs[] = array('success', _('Respondent Status Updated.'));
+ $msgs[] = array('success', _("Respondent Status Updated."));
} catch (Horde_Exception $e) {
- $msgs[] = array('error', _('There was an error updating the event:') . ' ' . $e->getMessage());
+ $msgs[] = array('error', _("There was an error updating the event:") . ' ' . $e->getMessage());
}
} else {
- $msgs[] = array('warning', _('This action is not supported.'));
+ $msgs[] = array('warning', _("This action is not supported."));
}
break;
$registry->call('calendar/replace', array('uid' => $guid, 'content' => $components[$key], 'contentType' => $this->mime_part->getType()));
$handled = true;
$url = Horde::url($registry->link('calendar/show', array('uid' => $guid)));
- $msgs[] = array('success', _('The event was updated in your calendar.') .
- ' ' . Horde::link($url, _('View event'), null, '_blank') . Horde::img('mime/icalendar.png', _('View event'), null, $registry->getImageDir('horde')) . '</a>');
+ $msgs[] = array('success', _("The event was updated in your calendar.") .
+ ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . '</a>');
} catch (Horde_Exception $e) {}
// Could be a missing permission.
- $msgs[] = array('warning', _('There was an error updating the event:') . ' ' . $e->getMessage() . '. ' . _('Trying to import the event instead.'));
+ $msgs[] = array('warning', _("There was an error updating the event:") . ' ' . $e->getMessage() . '. ' . _("Trying to import the event instead."));
}
if (!$handled && $registry->hasMethod('calendar/import')) {
try {
$guid = $registry->call('calendar/import', array('content' => $components[$key], 'contentType' => $this->mime_part->getType()));
$url = Horde::url($registry->link('calendar/show', array('uid' => $guid)));
- $msgs[] = array('success', _('The event was added to your calendar.') .
- ' ' . Horde::link($url, _('View event'), null, '_blank') . Horde::img('mime/icalendar.png', _('View event'), null, $registry->getImageDir('horde')) . '</a>');
+ $msgs[] = array('success', _("The event was added to your calendar.") .
+ ' ' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . '</a>');
} catch (Horde_Exception $e) {
- $msgs[] = array('error', _('There was an error importing the event:') . ' ' . $e->getMessage());
+ $msgs[] = array('error', _("There was an error importing the event:") . ' ' . $e->getMessage());
}
}
if (!$handled) {
- $msgs[] = array('warning', _('This action is not supported.'));
+ $msgs[] = array('warning', _("This action is not supported."));
}
break;
if ($registry->hasMethod('calendar/import_vfreebusy')) {
try {
$registry->call('calendar/import_vfreebusy', array($components[$key]));
- $msgs[] = array('success', _('The user\'s free/busy information was sucessfully stored.'));
+ $msgs[] = array('success', _("The user's free/busy information was sucessfully stored."));
} catch (Horde_Exception $e) {
- $msgs[] = array('error', _('There was an error importing user\'s free/busy information:') . ' ' . $e->getMessage());
+ $msgs[] = array('error', _("There was an error importing user's free/busy information:") . ' ' . $e->getMessage());
}
} else {
- $msgs[] = array('warning', _('This action is not supported.'));
+ $msgs[] = array('warning', _("This action is not supported."));
}
break;
try {
$guid = $registry->call('tasks/import', array($components[$key], $this->mime_part->getType()));
$url = Horde::url($registry->link('tasks/show', array('uid' => $guid)));
- $msgs[] = array('success', _('The task has been added to your tasklist.') .
- ' ' . Horde::link($url, _('View task'), null, '_blank') . Horde::img('mime/icalendar.png', _('View task'), null, $registry->getImageDir('horde')) . '</a>');
+ $msgs[] = array('success', _("The task has been added to your tasklist.") .
+ ' ' . Horde::link($url, _("View task"), null, '_blank') . Horde::img('mime/icalendar.png', _("View task"), null, $registry->getImageDir('horde')) . '</a>');
} catch (Horde_Exception $e) {
- $msgs[] = array('error', _('There was an error importing the task:') . ' ' . $e->getMessage());
+ $msgs[] = array('error', _("There was an error importing the task:") . ' ' . $e->getMessage());
}
} else {
- $msgs[] = array('warning', _('This action is not supported.'));
+ $msgs[] = array('warning', _("This action is not supported."));
}
break;
case 'vJournal':
default:
- $msgs[] = array('warning', _('This action is not yet implemented.'));
+ $msgs[] = array('warning', _("This action is not yet implemented."));
}
if ($action != 'accept-import') {
switch ($action) {
case 'accept':
case 'accept-import':
- $message = sprintf(_('%s has accepted.'), $name);
- $subject = _('Accepted: ') . $vEvent->getAttribute('SUMMARY');
+ $message = sprintf(_("%s has accepted."), $name);
+ $subject = _("Accepted: ") . $vEvent->getAttribute('SUMMARY');
$params['PARTSTAT'] = 'ACCEPTED';
break;
case 'deny':
- $message = sprintf(_('%s has declined.'), $name);
- $subject = _('Declined: ') . $vEvent->getAttribute('SUMMARY');
+ $message = sprintf(_("%s has declined."), $name);
+ $subject = _("Declined: ") . $vEvent->getAttribute('SUMMARY');
$params['PARTSTAT'] = 'DECLINED';
break;
case 'tentative':
- $message = sprintf(_('%s has tentatively accepted.'), $name);
- $subject = _('Tentative: ') . $vEvent->getAttribute('SUMMARY');
+ $message = sprintf(_("%s has tentatively accepted."), $name);
+ $subject = _("Tentative: ") . $vEvent->getAttribute('SUMMARY');
$params['PARTSTAT'] = 'TENTATIVE';
break;
}
$mime->send($organizerEmail, $msg_headers,
$mail_driver['driver'],
$mail_driver['params']);
- $msgs[] = array('success', _('Reply Sent.'));
+ $msgs[] = array('success', _("Reply Sent."));
} catch (Horde_Mime_Exception $e) {
- $msgs[] = array('error', sprintf(_('Error sending reply: %s.'), $e->getMessage()));
+ $msgs[] = array('error', sprintf(_("Error sending reply: %s."), $e->getMessage()));
}
} else {
- $msgs[] = array('warning', _('This action is not supported.'));
+ $msgs[] = array('warning', _("This action is not supported."));
}
break;
$vCal->setAttribute('METHOD', 'REPLY');
$vCal->addComponent($vfb_reply);
- $message = _('Attached is a reply to a calendar request you sent.');
+ $message = _("Attached is a reply to a calendar request you sent.");
$body = new Horde_Mime_Part('text/plain',
Horde_String::wrap($message, 76, "\n"),
$charset);
if (!empty($replyto) && ($replyto != $email)) {
$msg_headers->addHeader('Reply-to', $replyto);
}
- $msg_headers->addHeader('Subject', Horde_Mime::encode(_('Free/Busy Request Response'), $charset));
+ $msg_headers->addHeader('Subject', Horde_Mime::encode(_("Free/Busy Request Response"), $charset));
// Send the reply.
$mail_driver = IMP_Compose::getMailDriver();
$mime->send($organizerEmail, $msg_headers,
$mail_driver['driver'],
$mail_driver['params']);
- $msgs[] = array('success', _('Reply Sent.'));
+ $msgs[] = array('success', _("Reply Sent."));
} catch (Horde_Mime_Exception $e) {
- $msgs[] = array('error', sprintf(_('Error sending reply: %s.'), $e->getMessage()));
+ $msgs[] = array('error', sprintf(_("Error sending reply: %s."), $e->getMessage()));
}
} else {
- $msgs[] = array('warning', _('Invalid Action selected for this component.'));
+ $msgs[] = array('warning', _("Invalid Action selected for this component."));
}
break;
case 'nosup':
// vFreebusy request.
default:
- $msgs[] = array('warning', _('This action is not yet implemented.'));
+ $msgs[] = array('warning', _("This action is not yet implemented."));
break;
}
}
// @todo: handle stray vcards here as well.
default:
- $html .= sprintf(_('Unhandled component of type: %s'), $component->getType());
+ $html .= sprintf(_("Unhandled component of type: %s"), $component->getType());
}
}
switch ($method) {
case 'PUBLISH':
- $desc = _('%s has sent you free/busy information.');
+ $desc = _("%s has sent you free/busy information.");
break;
case 'REQUEST':
$sender = $this->_headers->getValue('From');
- $desc = _('%s requests your free/busy information.');
+ $desc = _("%s requests your free/busy information.");
break;
case 'REPLY':
- $desc = _('%s has replied to a free/busy request.');
+ $desc = _("%s has replied to a free/busy request.");
break;
}
$start = $vfb->getAttribute('DTSTART');
if (!is_a($start, 'PEAR_Error')) {
if (is_array($start)) {
- $html .= '<p><strong>' . _('Start:') . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $start['month'], $start['mday'], $start['year'])) . '</p>';
+ $html .= '<p><strong>' . _("Start:") . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $start['month'], $start['mday'], $start['year'])) . '</p>';
} else {
- $html .= '<p><strong>' . _('Start:') . '</strong> ' . strftime($prefs->getValue('date_format'), $start) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $start) . '</p>';
+ $html .= '<p><strong>' . _("Start:") . '</strong> ' . strftime($prefs->getValue('date_format'), $start) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $start) . '</p>';
}
}
$end = $vfb->getAttribute('DTEND');
if (!is_a($end, 'PEAR_Error')) {
if (is_array($end)) {
- $html .= '<p><strong>' . _('End:') . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $end['month'], $end['mday'], $end['year'])) . '</p>';
+ $html .= '<p><strong>' . _("End:") . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $end['month'], $end['mday'], $end['year'])) . '</p>';
} else {
- $html .= '<p><strong>' . _('End:') . '</strong> ' . strftime($prefs->getValue('date_format'), $end) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $end) . '</p>';
+ $html .= '<p><strong>' . _("End:") . '</strong> ' . strftime($prefs->getValue('date_format'), $end) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $end) . '</p>';
}
}
return $html;
}
- $html .= '<h2 class="smallheader">' . _('Actions') . '</h2>' .
+ $html .= '<h2 class="smallheader">' . _("Actions") . '</h2>' .
'<select name="itip_action[' . $id . ']">';
switch ($method) {
case 'PUBLISH':
if ($registry->hasMethod('calendar/import_vfreebusy')) {
- $html .= '<option value="import">' . _('Remember the free/busy information.') . '</option>';
+ $html .= '<option value="import">' . _("Remember the free/busy information.") . '</option>';
} else {
- $html .= '<option value="nosup">' . _('Reply with Not Supported Message') . '</option>';
+ $html .= '<option value="nosup">' . _("Reply with Not Supported Message") . '</option>';
}
break;
case 'REQUEST':
if ($registry->hasMethod('calendar/getFreeBusy')) {
- $html .= '<option value="reply">' . _('Reply with requested free/busy information.') . '</option>' .
- '<option value="reply2m">' . _('Reply with free/busy for next 2 months.') . '</option>';
+ $html .= '<option value="reply">' . _("Reply with requested free/busy information.") . '</option>' .
+ '<option value="reply2m">' . _("Reply with free/busy for next 2 months.") . '</option>';
} else {
- $html .= '<option value="nosup">' . _('Reply with Not Supported Message') . '</option>';
+ $html .= '<option value="nosup">' . _("Reply with Not Supported Message") . '</option>';
}
- $html .= '<option value="deny">' . _('Deny request for free/busy information') . '</option>';
+ $html .= '<option value="deny">' . _("Deny request for free/busy information") . '</option>';
break;
case 'REPLY':
if ($registry->hasMethod('calendar/import_vfreebusy')) {
- $html .= '<option value="import">' . _('Remember the free/busy information.') . '</option>';
+ $html .= '<option value="import">' . _("Remember the free/busy information.") . '</option>';
} else {
- $html .= '<option value="nosup">' . _('Reply with Not Supported Message') . '</option>';
+ $html .= '<option value="nosup">' . _("Reply with Not Supported Message") . '</option>';
}
break;
}
- return $html . '</select> <input type="submit" class="button" value="' . _('Go') . '/>';
+ return $html . '</select> <input type="submit" class="button" value="' . _("Go") . '/>';
}
/**
switch ($method) {
case 'PUBLISH':
- $desc = _('%s wishes to make you aware of \"%s\".');
+ $desc = _("%s wishes to make you aware of \"%s\".");
if ($registry->hasMethod('calendar/import')) {
- $options[] = '<option value="import">' . _('Add this to my calendar') . '</option>';
+ $options[] = '<option value="import">' . _("Add this to my calendar") . '</option>';
}
break;
try {
$registry->call('calendar/export', array($vevent->getAttribute('UID'), 'text/calendar'));
$is_update = true;
- $desc = _('%s wants to notify you about changes of \"%s\".');
+ $desc = _("%s wants to notify you about changes of \"%s\".");
} catch (Horde_Exception $e) {
$is_update = false;
}
$desc = $is_attendee
- ? _('%s requests your presence at \"%s\".')
- : _('%s wishes to make you aware of \"%s\".');
+ ? _("%s requests your presence at \"%s\".")
+ : _("%s wishes to make you aware of \"%s\".");
}
if ($is_update && $registry->hasMethod('calendar/replace')) {
- $options[] = '<option value="accept-import">' . _('Accept and update in my calendar') . '</option>';
- $options[] = '<option value="import">' . _('Update in my calendar') . '</option>';
+ $options[] = '<option value="accept-import">' . _("Accept and update in my calendar") . '</option>';
+ $options[] = '<option value="import">' . _("Update in my calendar") . '</option>';
} elseif ($registry->hasMethod('calendar/import')) {
- $options[] = '<option value="accept-import">' . _('Accept and add to my calendar') . '</option>';
- $options[] = '<option value="import">' . _('Add to my calendar') . '</option>';
+ $options[] = '<option value="accept-import">' . _("Accept and add to my calendar") . '</option>';
+ $options[] = '<option value="import">' . _("Add to my calendar") . '</option>';
}
- $options[] = '<option value="accept">' . _('Accept request') . '</option>';
- $options[] = '<option value="tentative">' . _('Tentatively Accept request') . '</option>';
- $options[] = '<option value="deny">' . _('Deny request') . '</option>';
- // $options[] = '<option value="delegate">' . _('Delegate position') . '</option>';
+ $options[] = '<option value="accept">' . _("Accept request") . '</option>';
+ $options[] = '<option value="tentative">' . _("Tentatively Accept request") . '</option>';
+ $options[] = '<option value="deny">' . _("Deny request") . '</option>';
+ // $options[] = '<option value="delegate">' . _("Delegate position") . '</option>';
break;
case 'ADD':
- $desc = _('%s wishes to ammend \"%s\".');
+ $desc = _("%s wishes to ammend \"%s\".");
if ($registry->hasMethod('calendar/import')) {
- $options[] = '<option value="import">' . _('Update this event on my calendar') . '</option>';
+ $options[] = '<option value="import">' . _("Update this event on my calendar") . '</option>';
}
break;
case 'REFRESH':
- $desc = _('%s wishes to receive the latest information about \"%s\".');
- $options[] = '<option value="send">' . _('Send Latest Information') . '</option>';
+ $desc = _("%s wishes to receive the latest information about \"%s\".");
+ $options[] = '<option value="send">' . _("Send Latest Information") . '</option>';
break;
case 'REPLY':
- $desc = _('%s has replied to the invitation to \"%s\".');
+ $desc = _("%s has replied to the invitation to \"%s\".");
$sender = $this->_headers->getValue('From');
if ($registry->hasMethod('calendar/updateAttendee')) {
- $options[] = '<option value="update">' . _('Update respondent status') . '</option>';
+ $options[] = '<option value="update">' . _("Update respondent status") . '</option>';
}
break;
case 'CANCEL':
if (is_a($instance = $vevent->getAttribute('RECURRENCE-ID'), 'PEAR_Error')) {
- $desc = _('%s has cancelled \"%s\".');
+ $desc = _("%s has cancelled \"%s\".");
if ($registry->hasMethod('calendar/delete')) {
- $options[] = '<option value="delete">' . _('Delete from my calendar') . '</option>';
+ $options[] = '<option value="delete">' . _("Delete from my calendar") . '</option>';
}
} else {
- $desc = _('%s has cancelled an instance of the recurring \"%s\".');
+ $desc = _("%s has cancelled an instance of the recurring \"%s\".");
if ($registry->hasMethod('calendar/replace')) {
- $options[] = '<option value="import">' . _('Update in my calendar') . '</option>';
+ $options[] = '<option value="import">' . _("Update in my calendar") . '</option>';
}
}
break;
$summary = $vevent->getAttribute('SUMMARY');
if (is_a($summary, 'PEAR_Error')) {
- $desc = sprintf($desc, htmlspecialchars($sender), _('Unknown Meeting'));
+ $desc = sprintf($desc, htmlspecialchars($sender), _("Unknown Meeting"));
} else {
$desc = sprintf($desc, htmlspecialchars($sender), htmlspecialchars($summary));
}
$start = $vevent->getAttribute('DTSTART');
if (!is_a($start, 'PEAR_Error')) {
if (is_array($start)) {
- $html .= '<p><strong>' . _('Start:') . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $start['month'], $start['mday'], $start['year'])) . '</p>';
+ $html .= '<p><strong>' . _("Start:") . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $start['month'], $start['mday'], $start['year'])) . '</p>';
} else {
- $html .= '<p><strong>' . _('Start:') . '</strong> ' . strftime($prefs->getValue('date_format'), $start) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $start) . '</p>';
+ $html .= '<p><strong>' . _("Start:") . '</strong> ' . strftime($prefs->getValue('date_format'), $start) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $start) . '</p>';
}
}
$end = $vevent->getAttribute('DTEND');
if (!is_a($end, 'PEAR_Error')) {
if (is_array($end)) {
- $html .= '<p><strong>' . _('End:') . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $end['month'], $end['mday'], $end['year'])) . '</p>';
+ $html .= '<p><strong>' . _("End:") . '</strong> ' . strftime($prefs->getValue('date_format'), mktime(0, 0, 0, $end['month'], $end['mday'], $end['year'])) . '</p>';
} else {
- $html .= '<p><strong>' . _('End:') . '</strong> ' . strftime($prefs->getValue('date_format'), $end) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $end) . '</p>';
+ $html .= '<p><strong>' . _("End:") . '</strong> ' . strftime($prefs->getValue('date_format'), $end) . ' ' . date($prefs->getValue('twentyFour') ? ' G:i' : ' g:i a', $end) . '</p>';
}
}
$sum = $vevent->getAttribute('SUMMARY');
if (!is_a($sum, 'PEAR_Error')) {
- $html .= '<p><strong>' . _('Summary') . ':</strong> ' . htmlspecialchars($sum) . '</p>';
+ $html .= '<p><strong>' . _("Summary") . ':</strong> ' . htmlspecialchars($sum) . '</p>';
} else {
- $html .= '<p><strong>' . _('Summary') . ':</strong> <em>' . _('None') . '</em></p>';
+ $html .= '<p><strong>' . _("Summary") . ':</strong> <em>' . _("None") . '</em></p>';
}
$desc = $vevent->getAttribute('DESCRIPTION');
if (!is_a($desc, 'PEAR_Error')) {
- $html .= '<p><strong>' . _('Description') . ':</strong> ' . nl2br(htmlspecialchars($desc)) . '</p>';
+ $html .= '<p><strong>' . _("Description") . ':</strong> ' . nl2br(htmlspecialchars($desc)) . '</p>';
}
$loc = $vevent->getAttribute('LOCATION');
if (!is_a($loc, 'PEAR_Error')) {
- $html .= '<p><strong>' . _('Location') . ':</strong> ' . htmlspecialchars($loc) . '</p>';
+ $html .= '<p><strong>' . _("Location") . ':</strong> ' . htmlspecialchars($loc) . '</p>';
}
if (!is_a($attendees, 'PEAR_Error') && !empty($attendees)) {
- $html .= '<h2 class="smallheader">' . _('Attendees') . '</h2>';
+ $html .= '<h2 class="smallheader">' . _("Attendees") . '</h2>';
- $html .= '<table><thead class="leftAlign"><tr><th>' . _('Name') . '</th><th>' . _('Role') . '</th><th>' . _('Status') . '</th></tr></thead><tbody>';
+ $html .= '<table><thead class="leftAlign"><tr><th>' . _("Name") . '</th><th>' . _("Role") . '</th><th>' . _("Status") . '</th></tr></thead><tbody>';
foreach ($attendees as $key => $attendee) {
$attendee = parse_url($attendee);
- $attendee = empty($attendee['path']) ? _('Unknown') : $attendee['path'];
+ $attendee = empty($attendee['path']) ? _("Unknown") : $attendee['path'];
if (!empty($attendee_params[$key]['CN'])) {
$attendee = $attendee_params[$key]['CN'];
}
- $role = _('Required Participant');
+ $role = _("Required Participant");
if (isset($attendee_params[$key]['ROLE'])) {
switch ($attendee_params[$key]['ROLE']) {
case 'CHAIR':
- $role = _('Chair Person');
+ $role = _("Chair Person");
break;
case 'OPT-PARTICIPANT':
- $role = _('Optional Participant');
+ $role = _("Optional Participant");
break;
case 'NON-PARTICIPANT':
- $role = _('Non Participant');
+ $role = _("Non Participant");
break;
case 'REQ-PARTICIPANT':
}
}
- $status = _('Awaiting Response');
+ $status = _("Awaiting Response");
if (isset($attendee_params[$key]['PARTSTAT'])) {
$status = $this->_partstatToString($attendee_params[$key]['PARTSTAT'], $status);
}
$events = $registry->call('calendar/listEvents', array($start, $vevent_end, $calendars, false));
if (count($events)) {
- $html .= '<h2 class="smallheader">' . _('Possible Conflicts') . '</h2><table id="itipconflicts">';
+ $html .= '<h2 class="smallheader">' . _("Possible Conflicts") . '</h2><table id="itipconflicts">';
// TODO: Check if there are too many events to show.
foreach ($events as $calendar) {
foreach ($calendar as $event) {
} else {
if ($event->end->compareDateTime($time_span_start) <= -1 ||
$event->start->compareDateTime($time_span_end) >= 1) {
- continue;
+ continue;
}
if ($event->end->compareDateTime($vevent_start) <= -1 ||
$event->start->compareDateTime($vevent_end) >= 1) {
}
if ($options) {
- $html .= '<h2 class="smallheader">' . _('Actions') . '</h2>' .
- '<label for="action_' . $id . '" class="hidden">' . _('Actions') . '</label>' .
+ $html .= '<h2 class="smallheader">' . _("Actions") . '</h2>' .
+ '<label for="action_' . $id . '" class="hidden">' . _("Actions") . '</label>' .
'<select id="action_' . $id . '" name="itip_action[' . $id . ']">' .
implode("\n", $options) .
- '</select> <input type="submit" class="button" value="' . _('Go') . '" />';
+ '</select> <input type="submit" class="button" value="' . _("Go") . '" />';
}
return $html;
$organizer = $vtodo->getAttribute('ORGANIZER', true);
if (is_a($organizer, 'PEAR_Error')) {
- $sender = _('An unknown person');
+ $sender = _("An unknown person");
} else {
if (isset($organizer[0]['CN'])) {
$sender = $organizer[0]['CN'];
switch ($method) {
case 'PUBLISH':
- $desc = _('%s wishes to make you aware of \"%s\".');
+ $desc = _("%s wishes to make you aware of \"%s\".");
if ($registry->hasMethod('tasks/import')) {
- $options[] = '<option value="import">' . _('Add this to my tasklist') . '</option>';
+ $options[] = '<option value="import">' . _("Add this to my tasklist") . '</option>';
}
break;
}
$summary = $vtodo->getAttribute('SUMMARY');
if (is_a($summary, 'PEAR_Error')) {
- $desc = sprintf($desc, htmlspecialchars($sender), _('Unknown Task'));
+ $desc = sprintf($desc, htmlspecialchars($sender), _("Unknown Task"));
} else {
$desc = sprintf($desc, htmlspecialchars($sender), htmlspecialchars($summary));
}
$priority = $vtodo->getAttribute('PRIORITY');
if (!is_a($priority, 'PEAR_Error')) {
- $html .= '<p><strong>' . _('Priority') . ':</strong> ' . (int)$priority . '</p>';
+ $html .= '<p><strong>' . _("Priority") . ':</strong> ' . (int)$priority . '</p>';
}
$sum = $vtodo->getAttribute('SUMMARY');
if (!is_a($sum, 'PEAR_Error')) {
- $html .= '<p><strong>' . _('Summary') . ':</strong> ' . htmlspecialchars($sum) . '</p>';
+ $html .= '<p><strong>' . _("Summary") . ':</strong> ' . htmlspecialchars($sum) . '</p>';
} else {
- $html .= '<p><strong>' . _('Summary') . ':</strong> <em>' . _('None') . '</em></p>';
+ $html .= '<p><strong>' . _("Summary") . ':</strong> <em>' . _("None") . '</em></p>';
}
$desc = $vtodo->getAttribute('DESCRIPTION');
if (!is_a($desc, 'PEAR_Error')) {
- $html .= '<p><strong>' . _('Description') . ':</strong> ' . nl2br(htmlspecialchars($desc)) . '</p>';
+ $html .= '<p><strong>' . _("Description") . ':</strong> ' . nl2br(htmlspecialchars($desc)) . '</p>';
}
$attendees = $vtodo->getAttribute('ATTENDEE');
$params = $vtodo->getAttribute('ATTENDEE', true);
if (!is_a($attendees, 'PEAR_Error') && !empty($attendees)) {
- $html .= '<h2 class="smallheader">' . _('Attendees') . '</h2>';
+ $html .= '<h2 class="smallheader">' . _("Attendees") . '</h2>';
if (!is_array($attendees)) {
$attendees = array($attendees);
}
- $html .= '<table><thead class="leftAlign"><tr><th>' . _('Name') . '</th><th>' . _('Role') . '</th><th>' . _('Status') . '</th></tr></thead><tbody>';
+ $html .= '<table><thead class="leftAlign"><tr><th>' . _("Name") . '</th><th>' . _("Role") . '</th><th>' . _("Status") . '</th></tr></thead><tbody>';
foreach ($attendees as $key => $attendee) {
$attendee = parse_url($attendee);
$attendee = $attendee['path'];
$attendee = $params[$key]['CN'];
}
- $role = _('Required Participant');
+ $role = _("Required Participant");
if (isset($params[$key]['ROLE'])) {
switch ($params[$key]['ROLE']) {
case 'CHAIR':
- $role = _('Chair Person');
+ $role = _("Chair Person");
break;
case 'OPT-PARTICIPANT':
- $role = _('Optional Participant');
+ $role = _("Optional Participant");
break;
case 'NON-PARTICIPANT':
- $role = _('Non Participant');
+ $role = _("Non Participant");
break;
case 'REQ-PARTICIPANT':
}
}
- $status = _('Awaiting Response');
+ $status = _("Awaiting Response");
if (isset($params[$key]['PARTSTAT'])) {
$status = $this->_partstatToString($params[$key]['PARTSTAT'], $status);
}
}
if ($options) {
- $html .= '<h2 class="smallheader">' . _('Actions') . '</h2>' .
+ $html .= '<h2 class="smallheader">' . _("Actions") . '</h2>' .
'<select name="itip_action[' . $id . ']">' .
implode("\n", $options) .
- '</select> <input type="submit" class="button" value="' . _('Go') . '" />';
+ '</select> <input type="submit" class="button" value="' . _("Go") . '" />';
}
return $html;
{
switch ($value) {
case 'ACCEPTED':
- return _('Accepted');
+ return _("Accepted");
case 'DECLINED':
- return _('Declined');
+ return _("Declined");
case 'TENTATIVE':
- return _('Tentatively Accepted');
+ return _("Tentatively Accepted");
case 'DELEGATED':
- return _('Delegated');
+ return _("Delegated");
case 'COMPLETED':
- return _('Completed');
+ return _("Completed");
case 'IN-PROCESS':
- return _('In Process');
+ return _("In Process");
case 'NEEDS-ACTION':
default:
- return is_null($default) ? _('Needs Action') : $default;
+ return is_null($default) ? _("Needs Action") : $default;
}
}
}
$status = array(
array(
- 'icon' => Horde::img('info_icon.png', _('Info'), null, $GLOBALS['registry']->getImageDir('horde')),
- 'text' => array(_('A message you have sent has resulted in a return notification from the recipient.'))
+ 'icon' => Horde::img('info_icon.png', _("Info"), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'text' => array(_("A message you have sent has resulted in a return notification from the recipient."))
)
);
$curr_id = Horde_Mime::mimeIdArithmetic($curr_id, 'next');
$part = $this->_params['contents']->getMIMEPart($curr_id);
if ($part) {
- $status[0]['text'][] = sprintf(_('Additional information can be viewed %s.'), $this->_params['contents']->linkViewJS($part, 'view_attach', _('HERE'), array('jstext' => _('Additional information details'), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))));
+ $status[0]['text'][] = sprintf(_("Additional information can be viewed %s."), $this->_params['contents']->linkViewJS($part, 'view_attach', _("HERE"), array('jstext' => _("Additional information details"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))));
}
/* Display a link to the sent message. Try to download the text of
$curr_id = Horde_Mime::mimeIdArithmetic($curr_id, 'next');
$part = $this->_params['contents']->getMIMEPart($curr_id);
if ($part) {
- $status[0]['text'][] = sprintf(_('The text of the sent message can be viewed %s.'), $this->_params['contents']->linkViewJS($part, 'view_attach', _('HERE'), array('jstext' => _('The text of the sent message'))));
+ $status[0]['text'][] = sprintf(_("The text of the sent message can be viewed %s."), $this->_params['contents']->linkViewJS($part, 'view_attach', _("HERE"), array('jstext' => _("The text of the sent message"))));
}
if (empty($first_part)) {
$data = '';
} else {
- $status[0]['text'][] = _('The mail server generated the following informational message:');
+ $status[0]['text'][] = _("The mail server generated the following informational message:");
$status = array_merge($status, $first_part[$first_id]['status']);
$data = $first_part[$first_id]['data'];
}
$mime_part = new Horde_Mime_Part();
$mime_part->setType('text/plain');
$mime_part->setCharset(Horde_Nls::getCharset());
- $mime_part->setContents(sprintf(_('[Cannot display message - found only %s of %s parts of this message in the current mailbox.]'), count($indices), $total));
+ $mime_part->setContents(sprintf(_("[Cannot display message - found only %s of %s parts of this message in the current mailbox.]"), count($indices), $total));
return array($this->_mimepart->getMimeId() => $mime_part);
}
}
$status = array(
- sprintf(_('A PDF file named %s is attached to this message. A thumbnail is below.'), $this->_mimepart->getName(true)),
+ sprintf(_("A PDF file named %s is attached to this message. A thumbnail is below."), $this->_mimepart->getName(true)),
);
if ($GLOBALS['browser']->hasFeature('javascript')) {
'data' => '',
'status' => array(
array(
- 'icon' => Horde::img('mime/image.png', _('Thumbnail of attached PDF file')),
+ 'icon' => Horde::img('mime/image.png', _("Thumbnail of attached PDF file")),
'text' => $status
)
),
*/
protected function _outputImgTag()
{
- return '<img src="' . $this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('pdf_view_thumbnail' => 1))) . '" alt="' . htmlspecialchars(_('View PDF File'), ENT_COMPAT, Horde_Nls::getCharset()) . '" />';
+ return '<img src="' . $this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('pdf_view_thumbnail' => 1))) . '" alt="' . htmlspecialchars(_("View PDF File"), ENT_COMPAT, Horde_Nls::getCharset()) . '" />';
}
}
/* Is PGP active? */
if (empty($GLOBALS['conf']['gnupg']['path']) ||
!$GLOBALS['prefs']->getValue('use_pgp')) {
- $status[] = _('The message below has been encrypted via PGP, however, PGP support is disabled so the message cannot be decrypted.');
+ $status[] = _("The message below has been encrypted via PGP, however, PGP support is disabled so the message cannot be decrypted.");
return null;
}
if (is_null($symmetric_pass)) {
$js_action = '';
if (!$resymmetric) {
- $status[] = _('The message has been encrypted via PGP.');
+ $status[] = _("The message has been encrypted via PGP.");
}
switch ($_SESSION['imp']['view']) {
case 'imp':
/* Ask for the correct passphrase if this is encrypted
* symmetrically. */
- $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('PGPSymmetric', $js_action, array('symmetricid' => $symmetric_id)) . ';return false;') . _('You must enter the passphrase used to encrypt this message to view it.') . '</a>';
+ $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('PGPSymmetric', $js_action, array('symmetricid' => $symmetric_id)) . ';return false;') . _("You must enter the passphrase used to encrypt this message to view it.") . '</a>';
break;
}
return null;
$literal = !empty($info['literal']);
if ($literal) {
- $status[] = _('The message below has been compressed via PGP.');
+ $status[] = _("The message below has been compressed via PGP.");
} else {
- $status[] = _('The message below has been encrypted via PGP.');
+ $status[] = _("The message below has been encrypted via PGP.");
if (!$symmetric) {
if (!$this->_imppgp->getPersonalPrivateKey()) {
/* Output if there is no personal private key to decrypt
* with. */
- $status[] = _('The message below has been encrypted via PGP, however, no personal private key exists so the message cannot be decrypted.');
+ $status[] = _("The message below has been encrypted via PGP, however, no personal private key exists so the message cannot be decrypted.");
return null;
} else {
$personal_pass = $this->_imppgp->getPassphrase('personal');
if (is_null($personal_pass)) {
$js_action = '';
- $status[] = _('The message has been encrypted via PGP.');
+ $status[] = _("The message has been encrypted via PGP.");
switch ($_SESSION['imp']['view']) {
case 'dimp':
case 'imp':
/* Ask for the private key's passphrase if this is
* encrypted asymmetrically. */
- $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('PGPPersonal', $js_action) . ';return false;') . _('You must enter the passphrase for your PGP private key to view this message.') . '</a>';
+ $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('PGPPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your PGP private key to view this message.") . '</a>';
break;
}
return null;
$decrypted_data = $this->_imppgp->decryptMessage($encrypted_data, 'literal');
}
} catch (Horde_Exception $e) {
- $status[] = _('The message below does not appear to be a valid PGP encrypted message. Error: ') . $e->getMessage();
+ $status[] = _("The message below does not appear to be a valid PGP encrypted message. Error: ") . $e->getMessage();
if (!is_null($symmetric_pass)) {
$this->_imppgp->unsetPassphrase('symmetric', $this->_getSymmetricID());
return $this->_getEmbeddedMimeParts();
$status = array(
'icon' => Horde::img('mime/encryption.png', 'PGP'),
'text' => array(
- _('A PGP Public Key was attached to the message.')
+ _("A PGP Public Key was attached to the message.")
)
);
if ($GLOBALS['prefs']->getValue('use_pgp') &&
$GLOBALS['prefs']->getValue('add_source') &&
$GLOBALS['registry']->hasMethod('contacts/addField')) {
- $status['text'][] = Horde::link('#', '', '', '', $this->_imppgp->savePublicKeyURL($this->_params['contents']->getMailbox(), $this->_params['contents']->getIndex(), $mime_id) . 'return false;') . _('Save the key to your Address book.') . '</a>';
+ $status['text'][] = Horde::link('#', '', '', '', $this->_imppgp->savePublicKeyURL($this->_params['contents']->getMailbox(), $this->_params['contents']->getIndex(), $mime_id) . 'return false;') . _("Save the key to your Address book.") . '</a>';
}
- $status['text'][] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _('View the raw text of the Public Key.'), array('jstext' => _('View Public Key'), 'params' => array('mode' => IMP_Contents::RENDER_INLINE, 'rawpgpkey' => 1)));
+ $status['text'][] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("View the raw text of the Public Key."), array('jstext' => _("View Public Key"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE, 'rawpgpkey' => 1)));
try {
$data = '<span class="fixed">' . nl2br(str_replace(' ', ' ', $this->_imppgp->pgpPrettyKey($this->_mimepart->getContents()))) . '</span>';
empty($GLOBALS['conf']['gnupg']['path'])) {
/* If PGP not active, hide signature data and output status
* information. */
- $status[] = _('The message below has been digitally signed via PGP, but the signature cannot be verified.');
+ $status[] = _("The message below has been digitally signed via PGP, but the signature cannot be verified.");
return $ret;
}
- $status[] = _('The message below has been digitally signed via PGP.');
+ $status[] = _("The message below has been digitally signed via PGP.");
if ($GLOBALS['prefs']->getValue('pgp_verify') ||
Horde_Util::getFormData('pgp_verify_msg')) {
break;
}
- $icon = Horde::img('alerts/success.png', _('Success'), null, $graphicsdir);
+ $icon = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
$sig_text = $sig_result->message;
} catch (Horde_Exception $e) {
- $icon = Horde::img('alerts/warning.png', _('Warning'), null, $graphicsdir);
+ $icon = Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir);
$sig_text = $e->getMessage();
}
} else {
switch ($_SESSION['imp']['view']) {
case 'imp':
- $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), array('pgp_verify_msg' => 1))) . _('Click HERE to verify the message.') . '</a>';
+ $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), array('pgp_verify_msg' => 1))) . _("Click HERE to verify the message.") . '</a>';
break;
case 'dimp':
- $status[] = Horde::link('#', '', 'pgpVerifyMsg') . _('Click HERE to verify the message.') . '</a>';
+ $status[] = Horde::link('#', '', 'pgpVerifyMsg') . _("Click HERE to verify the message.") . '</a>';
break;
}
}
* escape character or else the line will display as being
* quoted. Flowed conversion would have already taken care of this
* for us. */
- $text = preg_replace('/(\n+)> ?From(\s+)/', '$1From$2', $text);
+ $text = preg_replace('/(\n+)> ?From(\s+)/', "$1From$2", $text);
}
$text = IMP::filterText($text);
return array(
$mime_id => array(
- 'data' => "<div class=\"fixed leftAlign\">\n" . $text . '</div>',
+ 'data' => '<div class="fixed leftAlign">' . "\n" . $text . '</div>',
'status' => array(),
'type' => $type
)
/**
* User-defined function callback for start elements.
*
- * @param object $parser Handle to the parser instance (not used).
+ * @param object $parser Handle to the parser instance.
* @param string $name The name of this XML element.
* @param array $attrs List of this element's attributes.
*/
'status' => array(
array(
'icon' => Horde::img('mime/encryption.png', 'S/MIME'),
- 'text' => array(_('This message has been encrypted via S/MIME.'))
+ 'text' => array(_("This message has been encrypted via S/MIME."))
)
),
'type' => 'text/html; charset=' . Horde_Nls::getCharset()
/* Is PGP active? */
$this->_initSMIME();
if (empty($this->_impsmime)) {
- $status[] = _('S/MIME support is not currently enabled so the message is unable to be decrypted.');
+ $status[] = _("S/MIME support is not currently enabled so the message is unable to be decrypted.");
return null;
}
if (!$this->_impsmime->getPersonalPrivateKey()) {
- $status[] = _('No personal private key exists so the message is unable to be decrypted.');
+ $status[] = _("No personal private key exists so the message is unable to be decrypted.");
return null;
}
// Fall through
case 'imp':
- $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('SMIMEPersonal', $js_action) . ';return false;') . _('You must enter the passphrase for your S/MIME private key to view this message.') . '</a>';
+ $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('SMIMEPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your S/MIME private key to view this message.") . '</a>';
break;
}
return null;
'status' => array(
array(
'icon' => Horde::img('mime/encryption.png', 'S/MIME'),
- 'text' => array(_('This message has been digitally signed via S/MIME.'))
+ 'text' => array(_("This message has been digitally signed via S/MIME."))
)
),
'type' => 'text/html; charset=' . Horde_Nls::getCharset()
$status = &$ret[$base_id]['status'][0]['text'];
if (!$GLOBALS['prefs']->getValue('use_smime')) {
- $status[] = _('S/MIME support is not enabled so the digital signature is unable to be verified.');
+ $status[] = _("S/MIME support is not enabled so the digital signature is unable to be verified.");
return $ret;
}
$sig_result = $this->_impsmime->verifySignature($raw_text);
} catch (Horde_Exception $e) {
$ret[$base_id]['status'][0]['icon'] = ($e->getCode() == 'horde.warning')
- ? Horde::img('alerts/warning.png', _('Warning'), null, $graphicsdir)
- : Horde::img('alerts/error.png', _('Error'), null, $graphicsdir);
+ ? Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir)
+ : Horde::img('alerts/error.png', _("Error"), null, $graphicsdir);
$status[] = $e->getMessage();
return $ret;
}
} else {
switch ($_SESSION['imp']['view']) {
case 'imp':
- $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), 'smime_verify_msg', 1)) . _('Click HERE to verify the message.') . '</a>';
+ $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), 'smime_verify_msg', 1)) . _("Click HERE to verify the message.") . '</a>';
break;
case 'dimp':
- $status[] = Horde::link('#', '', 'smimeVerifyMsg') . _('Click HERE to verify the message.') . '</a>';
+ $status[] = Horde::link('#', '', 'smimeVerifyMsg') . _("Click HERE to verify the message.") . '</a>';
break;
}
return $ret;
$graphicsdir = $GLOBALS['registry']->getImageDir('horde');
- $ret[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _('Success'), null, $graphicsdir);
+ $ret[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
/* This message has been verified but there was no output
* from the PGP program. */
$email = (is_array($sig_result->email))
? implode(', ', $sig_result->email)
: $sig_result->email;
- $status[] = sprintf(_('The message has been verified. Sender: %s.'), htmlspecialchars($email));
+ $status[] = sprintf(_("The message has been verified. Sender: %s."), htmlspecialchars($email));
}
if (!empty($sig_result->cert)) {
if (!empty($subject) &&
$GLOBALS['registry']->hasMethod('contacts/addField') &&
$GLOBALS['prefs']->getValue('add_source')) {
- $status[] = sprintf(_('The S/MIME certificate of %s: '), @htmlspecialchars($subject, ENT_COMPAT, Horde_Nls::getCharset())) . $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _('View'), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getIndex(), $sig_id) . ' return false;') . _('Save in your Address Book') . '</a>';
+ $status[] = sprintf(_("The S/MIME certificate of %s: "), @htmlspecialchars($subject, ENT_COMPAT, Horde_Nls::getCharset())) . $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("View"), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getIndex(), $sig_id) . ' return false;') . _("Save in your Address Book") . '</a>';
}
}
case 'delayed':
$status = array(
array(
- 'icon' => Horde::img('alerts/error.png', _('Error'), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('alerts/error.png', _("Error"), null, $GLOBALS['registry']->getImageDir('horde')),
'text' => array(
- _('ERROR: Your message could not be delivered.'),
- sprintf(_('Additional error message details can be viewed %s.'), $this->_params['contents']->linkViewJS($part2, 'view_attach', _('HERE'), array('jstext' => _('Additional message details'), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
+ _("ERROR: Your message could not be delivered."),
+ sprintf(_("Additional error message details can be viewed %s."), $this->_params['contents']->linkViewJS($part2, 'view_attach', _("HERE"), array('jstext' => _("Additional message details"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
)
)
);
- $msg_link = _('The text of the returned message can be viewed %s.');
- $msg_link_status = _('The text of the returned message');
+ $msg_link = _("The text of the returned message can be viewed %s.");
+ $msg_link_status = _("The text of the returned message");
break;
case 'delivered':
case 'relayed':
$status = array(
array(
- 'icon' => Horde::img('alerts/success.png', _('Success'), null, $GLOBALS['registry']->getImageDir('horde')),
+ 'icon' => Horde::img('alerts/success.png', _("Success"), null, $GLOBALS['registry']->getImageDir('horde')),
'text' => array(
- _('Your message was successfully delivered.'),
- sprintf(_('Additional message details can be viewed %s.'), $this->_params['contents']->linkViewJS($part2, 'view_attach', _('HERE'), array('jstext' => _('Additional message details'), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
+ _("Your message was successfully delivered."),
+ sprintf(_("Additional message details can be viewed %s."), $this->_params['contents']->linkViewJS($part2, 'view_attach', _("HERE"), array('jstext' => _("Additional message details"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
)
)
);
- $msg_link = _('The text of the message can be viewed %s.');
- $msg_link_status = _('The text of the message');
+ $msg_link = _("The text of the message can be viewed %s.");
+ $msg_link_status = _("The text of the message");
break;
}
/* Display a link to the returned message, if it exists. */
$part3 = $this->_params['contents']->getMIMEPart($part3_id);
if ($part3) {
- $status[0]['text'][] = sprintf($msg_link, $this->_params['contents']->linkViewJS($part3, 'view_attach', _('HERE'), array('jstext' => $msg_link_status, 'ctype' => 'message/rfc822')));
+ $status[0]['text'][] = sprintf($msg_link, $this->_params['contents']->linkViewJS($part3, 'view_attach', _("HERE"), array('jstext' => $msg_link_status, 'ctype' => 'message/rfc822')));
}
if (empty($first_part)) {
$data = '';
} else {
- $status[0]['text'][] = _('The mail server generated the following informational message:');
+ $status[0]['text'][] = _("The mail server generated the following informational message:");
$status = array_merge($status, $first_part[$part1_id]['status']);
$data = $first_part[$part1_id]['data'];
}
if (!count($tnefData)) {
$status = array(
- 'text' => array(_('No attachments found.'))
+ 'text' => array(_("No attachments found."))
);
} else {
$status = array(
- 'text' => array(_('The following files were attached to this part:'))
+ 'text' => array(_("The following files were attached to this part:"))
);
reset($tnefData);
}
$temp_part->setType($type);
- $link = $this->_params['contents']->linkView($temp_part, 'view_attach', htmlspecialchars($data['name']), array('jstext' => sprintf(_('View %s'), $data['name']), 'params' => array('tnef_attachment' => $key + 1)));
- $text .= _('Attached File:') . ' ' . $link . ' (' . $data['type'] . '/' . $data['subtype'] . ")<br />\n";
+ $link = $this->_params['contents']->linkView($temp_part, 'view_attach', htmlspecialchars($data['name']), array('jstext' => sprintf(_("View %s"), $data['name']), 'params' => array('tnef_attachment' => $key + 1)));
+ $text .= _("Attached File:") . ' ' . $link . ' (' . $data['type'] . '/' . $data['subtype'] . ")<br />\n";
}
}
($val['method'] == 0x0))) {
$mime_part = $this->_mimepart;
$mime_part->setName(basename($name));
- $val['name'] = str_replace($name, $this->_params['contents']->linkView($mime_part, 'download_render', $name, array('jstext' => sprintf(_('View %s'), str_replace(' ', ' ', $name)), 'class' => 'fixed', 'params' => array('zip_attachment' => urlencode($key) + 1))), $val['name']);
+ $val['name'] = str_replace($name, $this->_params['contents']->linkView($mime_part, 'download_render', $name, array('jstext' => sprintf(_("View %s"), str_replace(' ', ' ', $name)), 'class' => 'fixed', 'params' => array('zip_attachment' => urlencode($key) + 1))), $val['name']);
}
return $val;
$image_dir = $GLOBALS['registry']->getImageDir();
- $this->_handles['imp.reply'] = array($image_dir . '/mail_answered.png', _('Reply'));
- $this->_handles['imp.forward'] = array($image_dir . '/mail_forwarded.png', _('Forward'));
- $this->_handles['imp.redirect'] = array($image_dir . '/mail_forwarded.png', _('Redirect'));
+ $this->_handles['imp.reply'] = array($image_dir . '/mail_answered.png', _("Reply"));
+ $this->_handles['imp.forward'] = array($image_dir . '/mail_forwarded.png', _("Reply"));
+ $this->_handles['imp.redirect'] = array($image_dir . '/mail_forwarded.png', _("Redirect"));
}
/**
$sig = hash('md5', serialize(array($driver, $params)));
if (!isset(self::$_instances[$sig])) {
- self::$_instances[$sig] = self::getInstance($driver, $params);
+ self::$_instances[$sig] = IMP_Quota::getInstance($driver, $params);
}
return self::$_instances[$sig];
return array(
'long' => isset($this->_params['format']['long'])
? $this->_params['format']['long']
- : _('Quota status: %.2f %s / %.2f %s (%.2f%%)'),
+ : _("Quota status: %.2f %s / %.2f %s (%.2f%%)"),
'short' => isset($this->_params['format']['short'])
? $this->_params['format']['short']
- : _('%.0f%% of %.0f %s'),
+ : _("%.0f%% of %.0f %s"),
'nolimit_long' => isset($this->_params['format']['nolimit_long'])
? $this->_params['format']['nolimit_long']
- : _('Quota status: %.2f %s / NO LIMIT'),
+ : _("Quota status: %.2f %s / NO LIMIT"),
'nolimit_short' => isset($this->_params['format']['nolimit_short'])
? $this->_params['format']['nolimit_short']
- : _('%.0f %s')
- );
+ : _("%.0f %s")
+ );
}
/**
$cmdline = $this->_params['quota_path'] . ' -u ' . $_SESSION['imp']['user'] . ' | ' . $this->_params['grep_path'] . ' ' . $search_string;
exec($cmdline, $quota_data, $return_code);
if (($return_code == 0) && (count($quota_data) == 1)) {
- $quota = split('[[:blank:]]+', trim($quota_data[0]));
- $blocksize = $this->_blockSize();
- return array('usage' => $quota[1] * $blocksize,
- 'limit' => $quota[2] * $blocksize);
+ $quota = split("[[:blank:]]+", trim($quota_data[0]));
+ $blocksize = $this->_blockSize();
+ return array('usage' => $quota[1] * $blocksize,
+ 'limit' => $quota[2] * $blocksize);
}
- throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+ throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
}
}
if (count($quota) != 2) {
Horde::logMessage('Incorrect number of return values from quota hook.', __FILE__, __LINE__, PEAR_LOG_ERR);
- throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+ throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
}
return array('usage' => $quota[0], 'limit' => $quota[1]);
try {
$quota = $GLOBALS['imp_imap']->ob->getQuotaRoot($GLOBALS['imp_search']->isSearchMbox($GLOBALS['imp_mbox']['mailbox']) ? 'INBOX' : $GLOBALS['imp_mbox']['mailbox']);
} catch (Horde_Imap_Client_Exception $e) {
- throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+ throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
}
$quota_val = reset($quota);
public function getQuota()
{
if (!is_file($this->_params['logfile'])) {
- throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+ throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
}
$full = file($this->_params['logfile']);
$uname = $_SESSION['imp']['user'];
$FTPmail = $this->_params['FTPmail'];
- $virtline = preg_grep('[' . $uname . ': ' . $FTPmail . ']', $tail);
+ $virtline = preg_grep("[$uname: $FTPmail]", $tail);
$virtline = array_values($virtline);
$usage = substr($virtline[0], strpos($virtline[0], $this->_params['beginocc']) + strlen($this->_params['beginocc']), strpos($virtline[0], $this->_params['midocc']));
$storage = substr($virtline[0], strpos($virtline[0], $this->_params['midocc']) + strlen($this->_params['midocc']), strpos($virtline[0], $this->_params['endocc']));
// Read in the quota file and parse it, if possible.
if (!is_file($full)) {
- throw new Horde_Exception(_('Unable to retrieve quota'));
+ throw new Horde_Exception(_("Unable to retrieve quota"));
}
// Read in maildir quota file.
}
}
- throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+ throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
}
/**
{
$contents = file_get_contents($path . '\imap.mrk');
- $csize = strlen($contents);
$pointer = 36;
$size = 0;
-
- while ($pointer < $csize) {
+ while ($pointer < strlen($contents)) {
$details = unpack('a17Filename/a11Crap/VSize', substr($contents, $pointer, 36));
$size += $details['Size'];
$pointer += 36;
}
}
- throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+ throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
}
}
array('persistent' => !empty($this->_params['persistent']),
'ssl' => !empty($this->_params['ssl'])));
if ($this->_db instanceof PEAR_Error) {
- throw new Horde_Exception(_('Unable to connect to SQL server.'));
+ throw new Horde_Exception(_("Unable to connect to SQL server."));
}
}
* 'id' -- The ID of the search query in use.
* </pre>
*/
- public function __construct($params = array())
+ function __construct($params = array())
{
if (!empty($params['id'])) {
$this->_id = $this->_strip($params['id']);
$query = new Horde_Imap_Client_Search_Query();
$query->flag('\\deleted', true);
- $label = _('Virtual Trash');
+ $label = _("Virtual Trash");
$this->_saveVFolder = false;
if (empty($vtrash_id)) {
$query = new Horde_Imap_Client_Search_Query();
$query->flag('\\seen', false);
$query->flag('\\deleted', false);
- $label = _('Virtual INBOX');
+ $label = _("Virtual INBOX");
$this->_saveVFolder = false;
if (empty($vinbox_id)) {
$uiinfo = $this->retrieveUIQuery($id);
if (!empty($uiinfo['field'])) {
- $text = _('Search') . ' ';
+ $text = _("Search") . ' ';
$text_array = array();
foreach ($uiinfo['field'] as $key2 => $val2) {
if (isset($flagfields[$val2])) {
} else {
switch ($searchfields[$val2]['type']) {
case self::DATE:
- $text_array[] = sprintf("%s '%s'", $searchfields[$val2]['label'], strftime('%x', mktime(0, 0, 0, $uiinfo['date'][$key2]['month'], $uiinfo['date'][$key2]['day'], $uiinfo['date'][$key2]['year'])));
+ $text_array[] = sprintf("%s '%s'", $searchfields[$val2]['label'], strftime("%x", mktime(0, 0, 0, $uiinfo['date'][$key2]['month'], $uiinfo['date'][$key2]['day'], $uiinfo['date'][$key2]['year'])));
break;
case self::SIZE:
break;
default:
- $text_array[] = sprintf("%s for '%s'", $searchfields[$val2]['label'], ((!empty($uiinfo['text_not'][$key2])) ? _('not') . ' ' : '') . $uiinfo['text'][$key2]);
+ $text_array[] = sprintf("%s for '%s'", $searchfields[$val2]['label'], ((!empty($uiinfo['text_not'][$key2])) ? _("not") . ' ' : '') . $uiinfo['text'][$key2]);
break;
}
}
}
- $text .= implode(' ' . (($uiinfo['match'] == 'and') ? _('and') : _('or')) . ' ', $text_array);
+ $text .= implode(' ' . (($uiinfo['match'] == 'and') ? _("and") : _("or")) . ' ', $text_array);
}
- return $text . ' ' . _('in') . ' ' . implode(', ', $uiinfo['folders']);
+ return $text . ' ' . _("in") . ' ' . implode(', ', $uiinfo['folders']);
}
/**
*/
static public function isSearchMbox($id)
{
- return (strpos($id, '\0') !== false);
+ return (strpos($id, "\0") !== false);
}
/**
*/
public function createSearchID($id)
{
- return 'impsearch\0' . $this->_strip($id);
+ return 'impsearch' . "\0" . $this->_strip($id);
}
/**
{
return array(
'from' => array(
- 'label' => _('From'),
+ 'label' => _("From"),
'type' => self::HEADER,
'not' => true
),
'to' => array(
- 'label' => _('To'),
+ 'label' => _("To"),
'type' => self::HEADER,
'not' => true
),
'cc' => array(
- 'label' => _('Cc'),
+ 'label' => _("Cc"),
'type' => self::HEADER,
'not' => true
),
'bcc' => array(
- 'label' => _('Bcc'),
+ 'label' => _("Bcc"),
'type' => self::HEADER,
'not' => true
),
'subject' => array(
- 'label' => _('Subject'),
+ 'label' => _("Subject"),
'type' => self::HEADER,
'not' => true
),
'body' => array(
- 'label' => _('Body'),
- 'type' => self::BODY,
+ 'label' => _("Body"),
+ 'type' => self::BODY,
'not' => true
),
'text' => array(
- 'label' => _('Entire Message'),
- 'type' => self::TEXT,
+ 'label' => _("Entire Message"),
+ 'type' => self::TEXT,
'not' => true
),
'date_on' => array(
- 'label' => _('Date ='),
+ 'label' => _("Date ="),
'type' => self::DATE,
'not' => true
),
'date_until' => array(
- 'label' => _('Date <'),
+ 'label' => _("Date <"),
'type' => self::DATE,
'not' => true
),
'date_since' => array(
- 'label' => _('Date >='),
+ 'label' => _("Date >="),
'type' => self::DATE,
'not' => true
),
// Displayed in KB, but stored internally in bytes
'size_smaller' => array(
- 'label' => _('Size (KB) <'),
+ 'label' => _("Size (KB) <"),
'type' => self::SIZE,
'not' => false
),
// Displayed in KB, but stored internally in bytes
'size_larger' => array(
- 'label' => _('Size (KB) >'),
+ 'label' => _("Size (KB) >"),
'type' => self::SIZE,
'not' => false
),
return array(
'seen' => array(
'flag' => '\\seen',
- 'label' => _('Seen messages'),
+ 'label' => _("Seen messages"),
'type' => self::FLAG_HAS
),
'unseen' => array(
'flag' => '\\seen',
- 'label' => _('Unseen messages'),
+ 'label' => _("Unseen messages"),
'type' => self::FLAG_NOT
),
'answered' => array(
'flag' => '\\answered',
- 'label' => _('Answered messages'),
+ 'label' => _("Answered messages"),
'type' => self::FLAG_HAS
),
'unanswered' => array(
'flag' => '\\answered',
- 'label' => _('Unanswered messages'),
+ 'label' => _("Unanswered messages"),
'type' => self::FLAG_NOT
),
'flagged' => array(
'flag' => '\\flagged',
- 'label' => _('Flagged messages'),
+ 'label' => _("Flagged messages"),
'type' => self::FLAG_HAS
),
'unflagged' => array(
'flag' => '\\flagged',
- 'label' => _('Unflagged messages'),
+ 'label' => _("Unflagged messages"),
'type' => self::FLAG_NOT
),
'deleted' => array(
'flag' => '\\deleted',
- 'label' => _('Deleted messages'),
+ 'label' => _("Deleted messages"),
'type' => self::FLAG_HAS
),
'undeleted' => array(
'flag' => '\\deleted',
- 'label' => _('Undeleted messages'),
+ 'label' => _("Undeleted messages"),
'type' => self::FLAG_NOT
),
);
* @param string $action Why the message was sent, i.e. "new",
* "reply", "forward", etc.
* @param string $message_id The Message-ID.
- * @param string $recipient A message recipient.
+ * @param string $recipients A message recipient.
* @param boolean $success Whether the attempt was successful.
*/
protected function _log($action, $message_id, $recipient, $success)
$prog = str_replace(array('%u','%l', '%d'),
array(
escapeshellarg(Horde_Auth::getAuth()),
- escapeshellarg(Horde_Auth::getBareAuth()),
+ escapeshellarg(Horde_Auth::getBareAuth()),
escapeshellarg(Horde_Auth::getAuthDomain())
), $GLOBALS['conf'][$action]['program']);
$proc = proc_open($prog,
if (!is_null($from_line)) {
$spam_headers->addHeader('From', $from_line);
}
- $spam_headers->addHeader('Subject', sprintf(_('%s report from %s'), $action, $_SESSION['imp']['uniquser']));
+ $spam_headers->addHeader('Subject', sprintf(_("%s report from %s"), $action, $_SESSION['imp']['uniquser']));
/* Send the message. */
try {
switch ($action) {
case 'spam':
- $msg = sprintf(_('The message "%s" has been reported as spam.'), $subject);
+ $msg = sprintf(_("The message \"%s\" has been reported as spam."), $subject);
break;
case 'notspam':
- $msg = sprintf(_('The message "%s" has been reported as spam.'), $subject);
+ $msg = sprintf(_("The message \"%s\" has been reported as spam."), $subject);
break;
}
} elseif ($action == 'spam') {
- $msg = sprintf(_('%d messages have been reported as spam.'), $report_count);
+ $msg = sprintf(_("%d messages have been reported as spam."), $report_count);
} else {
- $msg = sprintf(_('%d messages have been reported as not spam.'), $report_count);
+ $msg = sprintf(_("%d messages have been reported as not spam."), $report_count);
}
$notification->push($msg, 'horde.message');
$delete_spam = 0;
} else {
if ($msg_count == 1) {
- $notification->push(_('The message has been deleted.'), 'horde.message');
+ $notification->push(_("The message has been deleted."), 'horde.message');
} else {
- $notification->push(sprintf(_('%d messages have been deleted.'), $msg_count), 'horde.message');
+ $notification->push(sprintf(_("%d messages have been deleted."), $msg_count), 'horde.message');
}
}
}
$delete_spam = 0;
}
} else {
- $notification->push(_('Could not move message to spam mailbox - no spam mailbox defined in preferences.'), 'horde.error');
+ $notification->push(_("Could not move message to spam mailbox - no spam mailbox defined in preferences."), 'horde.error');
$delete_spam = 0;
}
break;
$result = $imp_compose->expandAddresses($this->getAddressList($input));
if (is_array($result)) {
- $GLOBALS['notification']->push(_('Please resolve ambiguous or invalid addresses.'), 'horde.warning');
+ $GLOBALS['notification']->push(_("Please resolve ambiguous or invalid addresses."), 'horde.warning');
}
return $result;
throw new Horde_Exception($e);
}
- $entry = sprintf('%s Redirected message sent to %s from %s',
+ $entry = sprintf("%s Redirected message sent to %s from %s",
$_SERVER['REMOTE_ADDR'], $recipients, $_SESSION['imp']['uniquser']);
Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_INFO);
{
$fwd_msg = $imp_compose->forwardMessage($imp_contents);
$subject_header = $imp_compose->attachIMAPMessage(array($index), $fwd_msg['headers']);
- if ($subject_header !== false) {
+ if ($subject_header === false) {
+ // TODO: notification
+ } else {
$fwd_msg['headers']['subject'] = $subject_header;
}
'targetId' => 'message',
'triggerId' => 'spellcheck',
'states' => array(
- 'CheckSpelling' => $spell_img . ($show_text ? $br . _('Check Spelling') : ''),
- 'Checking' => $spell_img . $br . _('Checking ...'),
- 'ResumeEdit' => $spell_img . $br . _('Resume Editing'),
- 'Error' => $spell_img . $br . _('Spell Check Failed')
+ 'CheckSpelling' => $spell_img . ($show_text ? $br . _("Check Spelling") : ''),
+ 'Checking' => $spell_img . $br . _("Checking ..."),
+ 'ResumeEdit' => $spell_img . $br . _("Resume Editing"),
+ 'Error' => $spell_img . $br . _("Spell Check Failed")
)
);
$clean_to .= $val . (($val[Horde_String::length($val) - 1] == ';') ? ' ' : ', ');
}
if ($expand) {
- return $clean_to;
+ return $clean_to;
} else {
- return IMP_Compose::formatAddr($clean_to);
+ return IMP_Compose::formatAddr($clean_to);
}
}
$ret = array('error' => false, 'to' => false);
if (empty($ob['from'])) {
- $ret['from'] = $ret['fullfrom'] = _('Invalid Address');
+ $ret['from'] = $ret['fullfrom'] = _("Invalid Address");
$ret['error'] = true;
return $ret;
}
$from = reset($from);
if (empty($from)) {
- $ret['from'] = _('Invalid Address');
+ $ret['from'] = _("Invalid Address");
$ret['error'] = true;
} else {
$identity = Identity::singleton(array('imp', 'imp'));
/* This message was sent by one of the user's identity
* addresses - show To: information instead. */
if (empty($ob['to'])) {
- $ret['from'] = _('Undisclosed Recipients');
+ $ret['from'] = _("Undisclosed Recipients");
$ret['error'] = true;
} else {
$to = Horde_Mime_Address::getAddressesFromObject($ob['to']);
$first_to = reset($to);
if (empty($first_to)) {
- $ret['from'] = _('Undisclosed Recipients');
+ $ret['from'] = _("Undisclosed Recipients");
$ret['error'] = true;
} else {
$ret['from'] = empty($first_to['personal'])
}
}
if (!$this->_cache['drafts_sm_folder']) {
- $ret['from'] = _('To') . ': ' . $ret['from'];
+ $ret['from'] = _("To") . ': ' . $ret['from'];
}
$ret['to'] = true;
} else {
? $from['inner']
: $from['personal'];
if ($this->_cache['drafts_sm_folder']) {
- $ret['from'] = _('From') . ': ' . $ret['from'];
+ $ret['from'] = _("From") . ': ' . $ret['from'];
}
if (!empty($options['fullfrom'])) {
$ret['fullfrom'] = $from['display'];
$size = $size / 1024;
return ($size > 1024)
- ? sprintf(_('%s MB'), number_format($size / 1024, 1, $this->_cache['localeinfo']['decimal_point'], $this->_cache['localeinfo']['thousands_sep']))
- : sprintf(_('%s KB'), number_format($size, 0, $this->_cache['localeinfo']['decimal_point'], $this->_cache['localeinfo']['thousands_sep']));
+ ? sprintf(_("%s MB"), number_format($size / 1024, 1, $this->_cache['localeinfo']['decimal_point'], $this->_cache['localeinfo']['thousands_sep']))
+ : sprintf(_("%s KB"), number_format($size, 0, $this->_cache['localeinfo']['decimal_point'], $this->_cache['localeinfo']['thousands_sep']));
}
/**
} catch (Exception $e) {
/* Bug #5717 - Check for UT vs. UTC. */
if (substr(rtrim($date), -3) != ' UT') {
- return _('Unknown Date');
+ return _("Unknown Date");
}
try {
$d = new DateTime($date . 'C');
} catch (Exception $e) {
- return _('Unknown Date');
+ return _("Unknown Date");
}
}
$udate = $d->format('U');
{
$subject = Horde_Mime::decode($subject);
if (empty($subject)) {
- return _('[No Subject]');
+ return _("[No Subject]");
}
- $new_subject = $subject = IMP::filterText(preg_replace('/\s+/', ' ', $subject));
+ $new_subject = $subject = IMP::filterText(preg_replace("/\s+/", ' ', $subject));
if ($htmlspaces) {
$new_subject = Horde_Text_Filter::filter($subject, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true));
public function basicHeaders()
{
return array(
- 'date' => _('Date'),
- 'from' => _('From'),
- 'to' => _('To'),
- 'cc' => _('Cc'),
- 'bcc' => _('Bcc'),
- 'reply-to' => _('Reply-To'),
- 'subject' => _('Subject')
+ 'date' => _("Date"),
+ 'from' => _("From"),
+ 'to' => _("To"),
+ 'cc' => _("Cc"),
+ 'bcc' => _("Bcc"),
+ 'reply-to' => _("Reply-To"),
+ 'subject' => _("Subject")
);
}
*
* @return boolean True if the MDN request needs to be confirmed.
*/
- public function mdnCheck($mailbox, $uid, $headers, $confirmed = false)
+ public function MDNCheck($mailbox, $uid, $headers, $confirmed = false)
{
if (!$GLOBALS['prefs']->getValue('disposition_send_mdn') ||
$GLOBALS['imp_imap']->isReadOnly($mailbox)) {
$msg_id = $headers->getValue('message-id');
$mdn_flag = $mdn_sent = false;
- /* See if we have already processed this message.
- * 1st test: $MDNSent keyword (RFC 3503 [3.1]). */
+ /* See if we have already processed this message. */
+ /* 1st test: $MDNSent keyword (RFC 3503 [3.1]). */
try {
$status = $GLOBALS['imp_imap']->ob->status($mailbox, Horde_Imap_Client::STATUS_PERMFLAGS);
if (in_array('\\*', $status['permflags']) ||
}
/* Else, it's today, use the time only. */
- return sprintf(_('Today, %s %s'), $time_str, $tz);
+ return sprintf(_("Today, %s %s"), $time_str, $tz);
}
/**
$output = '';
/* Split the incoming data by the ',' character. */
- foreach (preg_split('/,/', $data) as $entry) {
+ foreach (preg_split("/,/", $data) as $entry) {
/* Get the data inside of the brackets. If there is no brackets,
* then return the raw text. */
- if (!preg_match('/\<([^\>]+)\>/', $entry, $matches)) {
+ if (!preg_match("/\<([^\>]+)\>/", $entry, $matches)) {
return trim($entry);
}
/* Remove all whitespace from between brackets (RFC 2369 [2]). */
- $match = preg_replace('/\s+/', '', $matches[1]);
+ $match = preg_replace("/\s+/", '', $matches[1]);
/* Determine if there are any comments. */
- preg_match('/(\(.+\))/', $entry, $comments);
+ preg_match("/(\(.+\))/", $entry, $comments);
/* RFC 2369 [2] states that we should only show the *FIRST* URL
* that appears in a header that we can adequately handle. */
: htmlspecialchars($ad['display']);
if ($link) {
- $ret = Horde::link(IMP::composeLink(array('to' => $ad['address'])), sprintf(_('New Message to %s'), $ad['inner'])) . htmlspecialchars($ad['display']) . '</a>';
+ $ret = Horde::link(IMP::composeLink(array('to' => $ad['address'])), sprintf(_("New Message to %s"), $ad['inner'])) . htmlspecialchars($ad['display']) . '</a>';
}
/* Append the add address icon to every address if contact
* manager is available. */
if ($add_link) {
$curr_link = Horde_Util::addParameter($add_link, array('name' => $ad['personal'], 'address' => $ad['inner']));
- $ret .= Horde::link($curr_link, sprintf(_('Add %s to my Address Book'), $ad['inner'])) .
- Horde::img('addressbook_add.png', sprintf(_('Add %s to my Address Book'), $ad['inner'])) . '</a>';
+ $ret .= Horde::link($curr_link, sprintf(_("Add %s to my Address Book"), $ad['inner'])) .
+ Horde::img('addressbook_add.png', sprintf(_("Add %s to my Address Book"), $ad['inner'])) . '</a>';
}
$group_array[] = $ret;
* anything. */
if (stristr($ob['host'], 'UNKNOWN') === false) {
if ($link) {
- $ret = Horde::link(IMP::composeLink(array('to' => $ob['address'])), sprintf(_('New Message to %s'), $ob['inner'])) . htmlspecialchars($ob['display']) . '</a>';
+ $ret = Horde::link(IMP::composeLink(array('to' => $ob['address'])), sprintf(_("New Message to %s"), $ob['inner'])) . htmlspecialchars($ob['display']) . '</a>';
}
/* Append the add address icon to every address if contact
* manager is available. */
if ($add_link) {
$curr_link = Horde_Util::addParameter($add_link, array('name' => $ob['personal'], 'address' => $ob['inner']));
- $ret .= Horde::link($curr_link, sprintf(_('Add %s to my Address Book'), $ob['inner'])) .
- Horde::img('addressbook_add.png', sprintf(_('Add %s to my Address Book'), $ob['inner'])) . '</a>';
+ $ret .= Horde::link($curr_link, sprintf(_("Add %s to my Address Book"), $ob['inner'])) .
+ Horde::img('addressbook_add.png', sprintf(_("Add %s to my Address Book"), $ob['inner'])) . '</a>';
}
}
/* If left with an empty address list ($ret), inform the user that the
* recipient list is purposely "undisclosed". */
if (empty($addr_array)) {
- $ret = _('Undisclosed Recipients');
+ $ret = _("Undisclosed Recipients");
} else {
/* Build the address line. */
$addr_count = count($addr_array);
Horde::addScriptFile('prototype.js', 'horde', true);
$ret = '<span>' .
- '<span onclick="[ this, this.next(), this.next(1) ].invoke(\'toggle\')" class="widget largeaddrlist">' . sprintf(_('[Show Addresses - %d recipients]'), $addr_count) . '</span>' .
- '<span onclick="[ this, this.previous(), this.next() ].invoke(\'toggle\')" class="widget largeaddrlist" style="display:none">' . _('[Hide Addresses]') . '</span>' .
+ '<span onclick="[ this, this.next(), this.next(1) ].invoke(\'toggle\')" class="widget largeaddrlist">' . sprintf(_("[Show Addresses - %d recipients]"), $addr_count) . '</span>' .
+ '<span onclick="[ this, this.previous(), this.next() ].invoke(\'toggle\')" class="widget largeaddrlist" style="display:none">' . _("[Hide Addresses]") . '</span>' .
'<span style="display:none">' .
$ret . '</span></span>';
}
*
* @return array TODO
*/
- public function listMessages($args)
+ public function ListMessages($args)
{
$mbox = $args['mbox'];
$is_search = false;
$query->text($args['qsearch'], false);
/* Set the search in the IMP session. */
- $GLOBALS['imp_search']->createSearchQuery($query, array($args['qsearchmbox']), array(), _('Search Results'), $mbox);
+ $GLOBALS['imp_search']->createSearchQuery($query, array($args['qsearchmbox']), array(), _("Search Results"), $mbox);
$is_search = true;
}
if (empty($msgcount) && !$is_search) {
$imp_folder = IMP_Folder::singleton();
if (!$imp_folder->exists($mbox)) {
- $GLOBALS['notification']->push(sprintf(_('Mailbox %s does not exist.'), $label), 'horde.error');
+ $GLOBALS['notification']->push(sprintf(_("Mailbox %s does not exist."), $label), 'horde.error');
}
$result->data = $result->rowlist = array();
$preview = !empty($args['preview']);
$mailbox = $args['mailbox'];
$index = $args['index'];
- $error_msg = _('Requested message not found.');
+ $error_msg = _("Requested message not found.");
$result = array(
'index' => $index,
if (!empty($tmp)) {
$result[$val] = $tmp;
} elseif ($val == 'to') {
- $result[$val] = array(array('raw' => _('Undisclosed Recipients')));
+ $result[$val] = array(array('raw' => _("Undisclosed Recipients")));
}
if ($preview) {
unset($headers_list[$val]);
$imp_mailbox_ui = new IMP_UI_Mailbox();
$minidate = $imp_mailbox_ui->getDate($envelope['date']);
if (empty($minidate)) {
- $minidate = _('Unknown Date');
+ $minidate = _("Unknown Date");
}
$result['minidate'] = htmlspecialchars($minidate);
} else {
/* Process the subject. */
$result['subject'] = ($subject = $mime_headers->getValue('subject'))
? $imp_ui->getDisplaySubject($subject)
- : htmlspecialchars(_('[No Subject]'));
+ : htmlspecialchars(_("[No Subject]"));
/* Get X-Priority. */
if (!$preview) {
}
/* Do MDN processing now. */
- if ($imp_ui->mdnCheck($mailbox, $index, $mime_headers)) {
- $result['msgtext'] .= $imp_ui->formatStatusMsg(array('text' => array(_('The sender of this message is requesting a Message Disposition Notification from you when you have read this message.'), sprintf(_('Click %s to send the notification message.'), Horde::link('', '', '', '', 'DimpCore.doAction(\'SendMDN\',{folder:\'' . $mailbox . '\',index:' . $index . '}); return false;', '', '') . _('HERE') . '</a>'))));
+ if ($imp_ui->MDNCheck($mailbox, $index, $mime_headers)) {
+ $result['msgtext'] .= $imp_ui->formatStatusMsg(array('text' => array(_("The sender of this message is requesting a Message Disposition Notification from you when you have read this message."), sprintf(_("Click %s to send the notification message."), Horde::link('', '', '', '', 'DimpCore.doAction(\'SendMDN\',{folder:\'' . $mailbox . '\',index:' . $index . '}); return false;', '', '') . _("HERE") . '</a>'))));
}
/* Build body text. This needs to be done before we build the
}
if (!strlen($result['msgtext'])) {
- $result['msgtext'] = $imp_ui->formatStatusMsg(array('text' => array(_('There are no parts that can be shown inline.'))));
+ $result['msgtext'] = $imp_ui->formatStatusMsg(array('text' => array(_("There are no parts that can be shown inline."))));
}
if (count($atc_parts) || (count($display_ids) > 2)) {
$result['atc_label'] = ($show_parts == 'all')
- ? _('Parts')
- : sprintf(ngettext('%d Attachment', '%d Attachments', count($atc_parts)), count($atc_parts));
+ ? _("Parts")
+ : sprintf(ngettext("%d Attachment", "%d Attachments", count($atc_parts)), count($atc_parts));
$result['atc_download'] = (count($display_ids) > 2)
- ? Horde::link($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all')) . '[' . _('Save All') . ']</a>'
+ ? Horde::link($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all')) . '[' . _("Save All") . ']</a>'
: '';
}
),
),
'title' => array(
- 'imp:create_folders' => _('Allow Folder Creation?'),
- 'imp:max_folders' => _('Maximum Number of Folders'),
- 'imp:max_recipients' => _('Maximum Number of Recipients per Message'),
- 'imp:max_timelimit' => _('Maximum Number of Recipients per Time Period'),
+ 'imp:create_folders' => _("Allow Folder Creation?"),
+ 'imp:max_folders' => _("Maximum Number of Folders"),
+ 'imp:max_recipients' => _("Maximum Number of Recipients per Message"),
+ 'imp:max_timelimit' => _("Maximum Number of Recipients per Time Period"),
),
'type' => array(
'imp:create_folders' => 'boolean',
$credentials = array(
'username' => array(
- 'desc' => sprintf(_('%s for %s'), _('Username'), $app_name),
+ 'desc' => sprintf(_("%s for %s"), _("Username"), $app_name),
'type' => 'text'
),
'password' => array(
- 'desc' => sprintf(_('%s for %s'), _('Password'), $app_name),
+ 'desc' => sprintf(_("%s for %s"), _("Password"), $app_name),
'type' => 'password'
),
'server' => array(
- 'desc' => sprintf(_('%s for %s'), _('Server'), $app_name),
+ 'desc' => sprintf(_("%s for %s"), _("Server"), $app_name),
'type' => 'enum',
'enum' => $server_list,
'value' => key($server_list)
case 'fckeditor':
return array(
'data' =>
- 'FCKConfig.ToolbarSets["ImpToolbar"] = ' . $GLOBALS['prefs']->getValue('fckeditor_buttons') . ";\n" .
+ 'FCKConfig.ToolbarSets["ImpToolbar"] = ' . $GLOBALS['prefs']->getValue('fckeditor_buttons') . ';' . "\n" .
// To more closely match "normal" textarea behavior,
// send <BR> on enter instead of <P>.
- "FCKConfig.EnterMode = \'br\';\n" .
+ 'FCKConfig.EnterMode = \'br\';' . "\n" .
'FCKConfig.ShiftEnterMode = \'p\';',
'type' => 'text/javascript'
);
$prefs->getValue('use_trash') &&
!$prefs->getValue('trash_folder') &&
!$prefs->getValue('use_vtrash')) {
- $GLOBALS['notification']->push(_('You have activated move to Trash but no Trash folder is defined. You will be unable to delete messages until you set a Trash folder in the preferences.'), 'horde.warning');
+ $GLOBALS['notification']->push(_("You have activated move to Trash but no Trash folder is defined. You will be unable to delete messages until you set a Trash folder in the preferences."), 'horde.warning');
}
if ($prefs->isDirty('use_vtrash') || $prefs->isDirty('use_vinbox')) {
Horde::addScriptFile('flagmanagement.js', 'imp', true);
Horde::addInlineScript(array(
- 'ImpFlagmanagement.new_prompt = ' . Horde_Serialize::serialize(_('Please enter the label for the new flag:'), Horde_Serialize::JSON, Horde_Nls::getCharset())
+ 'ImpFlagmanagement.new_prompt = ' . Horde_Serialize::serialize(_("Please enter the label for the new flag:"), Horde_Serialize::JSON, Horde_Nls::getCharset())
));
break;
}
exit;
}
-$title = sprintf(_('Welcome to %s'), $registry->get('name', ($imp_auth) ? 'horde' : null));
+$title = sprintf(_("Welcome to %s"), $registry->get('name', ($imp_auth) ? 'horde' : null));
if ($logout_reason) {
$notification->push(str_replace('<br />', ' ', Horde_Auth::getLogoutReasonString()), 'horde.message');
array(
'sel' => $view_cookie == 'imp',
'val' => 'imp',
- 'name' => _('Traditional')
+ 'name' => _("Traditional")
),
array(
'val' => 'dimp',
- 'name' => _('Dynamic'),
+ 'name' => _("Dynamic"),
'hide' => true
),
array(
'sel' => $view_cookie == 'mimp',
'val' => 'mimp',
- 'name' => _('Minimalist')
+ 'name' => _("Minimalist")
)
);
/* Build the <select> widget for the servers list. */
if ($show_list) {
- $server_select = new Horde_Mobile_select('server', 'popup', _('Server:'));
+ $server_select = new Horde_Mobile_select('server', 'popup', _("Server:"));
foreach ($servers_list as $val) {
$server_select->add($val['name'], $val['val'], $val['sel']);
}
/* Build the <select> widget containing the available languages. */
if ($choose_language) {
// Language names are already encoded.
- $lang_select = new Horde_Mobile_select('new_lang', 'popup', _('Language:'));
+ $lang_select = new Horde_Mobile_select('new_lang', 'popup', _("Language:"));
$lang_select->set('htmlchars', true);
foreach ($langs as $val) {
$lang_select->add($val['name'], $val['val'], $val['sel']);
/* Build the <select> widget containing the available views. */
if (!empty($views)) {
- $view_select = new Horde_Mobile_select('select_view', 'popup', _('Mode:'));
+ $view_select = new Horde_Mobile_select('select_view', 'popup', _("Mode:"));
foreach ($views as $val) {
$view_select->add($val['name'], $val['val'], $val['sel']);
}
$menu = new Horde_Menu(Horde_Menu::MASK_NONE);
$t->set('menu', $menu->render());
-$t->set('title', sprintf(_('Welcome to %s'), $registry->get('name', ($imp_auth) ? 'horde' : null)));
+$t->set('title', sprintf(_("Welcome to %s"), $registry->get('name', ($imp_auth) ? 'horde' : null)));
ob_start();
$notification->notify(array('listeners' => 'status'));
}
$t->set('login_tabindex', ++$tabindex);
-$t->set('login', _('Login'));
+$t->set('login', _("Login"));
$t->set('signup_link', false);
if ($conf['signup']['allow'] && isset($auth) && $auth->hasCapability('add')) {
- $t->set('signup_text', _('Do not have an account? Sign up.'));
+ $t->set('signup_text', _("Don't have an account? Sign up."));
$t->set('signup_link', Horde::link(Horde_Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/signup.php'), 'url', $url_param), $t->get('signup_text'), 'light'));
}
switch ($actionID) {
// 'm' = message missing
case 'm':
- $notification->push(_('There was an error viewing the requested message.'), 'horde.error');
+ $notification->push(_("There was an error viewing the requested message."), 'horde.error');
break;
// 'e' = expunge mailbox
/* Generate page links. */
$pages_first = $pages_prev = $pages_last = $pages_next = null;
if ($pageOb['page'] != 1) {
- $pages_first = new Horde_Mobile_link(_('First Page'), Horde_Util::addParameter($mailbox_url, 'p', 1));
- $pages_prev = new Horde_Mobile_link(_('Previous Page'), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page'] - 1));
+ $pages_first = new Horde_Mobile_link(_("First Page"), Horde_Util::addParameter($mailbox_url, 'p', 1));
+ $pages_prev = new Horde_Mobile_link(_("Previous Page"), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page'] - 1));
}
if ($pageOb['page'] != $pageOb['pagecount']) {
- $pages_next = new Horde_Mobile_link(_('Next Page'), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page'] + 1));
- $pages_last = new Horde_Mobile_link(_('Last Page'), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['pagecount']));
+ $pages_next = new Horde_Mobile_link(_("Next Page"), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page'] + 1));
+ $pages_last = new Horde_Mobile_link(_("Last Page"), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['pagecount']));
}
/* Generate mailbox summary string. */
}
$mailbox = Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page']);
-$items = array($mailbox => _('Refresh'));
+$items = array($mailbox => _("Refresh"));
/* Determine if we are going to show the Purge Deleted link. */
if (!$readonly &&
!$prefs->getValue('use_trash') &&
!$imp_search->isVINBOXFolder()) {
- $items[Horde_Util::addParameter($mailbox, array('a' => 'e'))] = _('Purge Deleted');
+ $items[Horde_Util::addParameter($mailbox, array('a' => 'e'))] = _("Purge Deleted");
}
/* Create sorting links. */
$sort = array();
$sort_list = array(
Horde_Imap_Client::SORT_ARRIVAL => '#',
- Horde_Imap_Client::SORT_FROM => _('From'),
- Horde_Imap_Client::SORT_SUBJECT => _('Subject')
+ Horde_Imap_Client::SORT_FROM => _("From"),
+ Horde_Imap_Client::SORT_SUBJECT => _("Subject")
);
foreach ($sort_list as $key => $val) {
if ($sortpref['limit']) {
if (($key == Horde_Imap_Client::SORT_SUBJECT) &&
IMP::threadSortAvailable($mailbox)) {
if (is_null($threadob)) {
- $items[Horde_Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_THREAD, 'sd' => $sortdir))] = _('Sort by Thread');
+ $items[Horde_Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_THREAD, 'sd' => $sortdir))] = _("Sort by Thread");
} else {
$sortkey = Horde_Imap_Client::SORT_THREAD;
- $items[Horde_Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_SUBJECT, 'sd' => $sortdir))] = _('Do Not Sort by Thread');
+ $items[Horde_Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_SUBJECT, 'sd' => $sortdir))] = _("Do Not Sort by Thread");
}
}
if ($sortpref['by'] == $key) {
}
/* Create mailbox menu. */
-$menu = new Horde_Mobile_card('o', _('Menu'));
+$menu = new Horde_Mobile_card('o', _("Menu"));
$mset = &$menu->add(new Horde_Mobile_linkset());
foreach ($items as $link => $label) {
* @author Michael Slusarz <slusarz@horde.org>
*/
-function _outputSummaries($msgs)
+function _outputSummaries($msgs, $mbox)
{
static $template;
break;
case 'message_missing':
- $notification->push(_('Requested message not found.'), 'horde.error');
+ $notification->push(_("Requested message not found."), 'horde.error');
break;
case 'fwd_digest':
/* Generate folder options list. */
if ($conf['user']['allow_folders']) {
- $folder_options = IMP::flistSelect(array('heading' => _('Messages to'), 'new_folder' => true, 'inc_tasklists' => true, 'inc_notepads' => true));
+ $folder_options = IMP::flistSelect(array('heading' => _("Messages to"), 'new_folder' => true, 'inc_tasklists' => true, 'inc_notepads' => true));
}
/* Build the list of messages in the mailbox. */
/* If search results are empty, return to the search page if this is
* not a virtual folder. */
if ($search_mbox && !$pageOb['msgcount'] && !$vfolder) {
- $notification->push(_('No messages matched your search.'), 'horde.warning');
+ $notification->push(_("No messages matched your search."), 'horde.warning');
header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('search.php', true), array('no_match' => 1, 'mailbox' => $imp_mbox['mailbox']), null, false));
exit;
}
}
if ($showdelete['hide'] && !$prefs->isLocked('delhide')) {
if ($prefs->getValue('delhide')) {
- $deleted_prompt = _('Show Deleted');
+ $deleted_prompt = _("Show Deleted");
} else {
- $deleted_prompt = _('Hide Deleted');
+ $deleted_prompt = _("Hide Deleted");
}
}
if ($readonly) {
/* Generate mailbox summary string. */
if (!empty($pageOb['end'])) {
- $msg_count = sprintf(_('%d to %d of %d Messages'), $pageOb['begin'], $pageOb['end'], $pageOb['msgcount']);
+ $msg_count = sprintf(_("%d to %d of %d Messages"), $pageOb['begin'], $pageOb['end'], $pageOb['msgcount']);
} else {
- $msg_count = sprintf(_('No Messages'));
+ $msg_count = sprintf(_("No Messages"));
}
/* Generate paging links. */
$pages_prev = Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', null, null, $graphicsdir);
} else {
$first_url = Horde_Util::addParameter($mailbox_imp_url, 'page', 1);
- $pages_first = Horde::link($first_url, _('First Page')) . Horde::img($rtl ? 'nav/last.png' : 'nav/first.png', $rtl ? '>>' : '<<', null, $graphicsdir) . '</a>';
+ $pages_first = Horde::link($first_url, _("First Page")) . Horde::img($rtl ? 'nav/last.png' : 'nav/first.png', $rtl ? '>>' : '<<', null, $graphicsdir) . '</a>';
$prev_url = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['page'] - 1);
- $pages_prev = Horde::link($prev_url, _('Previous Page')) . Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', null, $graphicsdir) . '</a>';
+ $pages_prev = Horde::link($prev_url, _("Previous Page")) . Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', null, $graphicsdir) . '</a>';
}
if ($pageOb['page'] == $pageOb['pagecount']) {
$pages_next = Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png', null, null, $graphicsdir);
} else {
$next_url = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['page'] + 1);
- $pages_next = Horde::link($next_url, _('Next Page')) . Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', null, $graphicsdir) . '</a>';
+ $pages_next = Horde::link($next_url, _("Next Page")) . Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', null, $graphicsdir) . '</a>';
$last_url = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['pagecount']);
- $pages_last = Horde::link($last_url, _('Last Page')) . Horde::img($rtl ? 'nav/first.png' : 'nav/last.png', $rtl ? '<<' : '>>', null, $graphicsdir) . '</a>';
+ $pages_last = Horde::link($last_url, _("Last Page")) . Horde::img($rtl ? 'nav/first.png' : 'nav/last.png', $rtl ? '<<' : '>>', null, $graphicsdir) . '</a>';
}
}
}
$pagetitle = $rawtitle = $title = IMP::getLabel($imp_mbox['mailbox']);
-$refresh_title = sprintf(_('_Refresh %s'), $title);
+$refresh_title = sprintf(_("_Refresh %s"), $title);
$refresh_ak = Horde::getAccessKey($refresh_title);
$refresh_title = Horde::stripAccessKey($refresh_title);
if (!empty($refresh_ak)) {
- $refresh_title .= sprintf(_(' (Accesskey %s)'), $refresh_ak);
+ $refresh_title .= sprintf(_(" (Accesskey %s)"), $refresh_ak);
}
if ($unread) {
if ($vfolder || $search_mbox) {
$query_text = htmlspecialchars(wordwrap($imp_search->searchQueryText($imp_search->searchMboxID())));
if ($vfolder) {
- $pagetitle .= ' [' . Horde::linkTooltip('#', $query_text, '', '', '', $query_text) . _('Virtual Folder') . '</a>]';
- $title .= ' [' . _('Virtual Folder') . ']';
+ $pagetitle .= ' [' . Horde::linkTooltip('#', $query_text, '', '', '', $query_text) . _("Virtual Folder") . '</a>]';
+ $title .= ' [' . _("Virtual Folder") . ']';
} else {
$pagetitle = Horde::linkTooltip('#', $query_text, '', '', '', $query_text) . $pagetitle . '</a>';
}
$hdr_template->set('title', $title);
$hdr_template->set('pagetitle', $pagetitle);
if ($readonly) {
- $hdr_template->set('readonly', Horde::img('locked.png', _('Read-Only')));
+ $hdr_template->set('readonly', Horde::img('locked.png', _("Read-Only")));
}
-$hdr_template->set('refresh', Horde::link($refresh_url, $refresh_title, '', '', '', '', $refresh_ak) . Horde::img('reload.png', _('Reload'), '', $graphicsdir) . '</a>');
+$hdr_template->set('refresh', Horde::link($refresh_url, $refresh_title, '', '', '', '', $refresh_ak) . Horde::img('reload.png', _("Reload"), '', $graphicsdir) . '</a>');
if (isset($filter_url)) {
- $hdr_template->set('filter', Horde::link($filter_url, sprintf(_('Apply Filters to %s'), $rawtitle)) . Horde::img('filters.png', _('Apply Filters')) . '</a>');
+ $hdr_template->set('filter', Horde::link($filter_url, sprintf(_("Apply Filters to %s"), $rawtitle)) . Horde::img('filters.png', _("Apply Filters")) . '</a>');
}
$hdr_template->set('search', false);
if ($_SESSION['imp']['protocol'] != 'pop') {
if (!$search_mbox) {
- $hdr_template->set('search', Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_mailbox', $imp_mbox['mailbox']), sprintf(_('Search %s'), $rawtitle)) . Horde::img('search.png', _('Search')) . '</a>');
+ $hdr_template->set('search', Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_mailbox', $imp_mbox['mailbox']), sprintf(_("Search %s"), $rawtitle)) . Horde::img('search.png', _("Search")) . '</a>');
if (!$readonly) {
- $hdr_template->set('empty', Horde::link(Horde_Util::addParameter($mailbox_imp_url, array('actionID' => 'empty_mailbox', 'mailbox' => $imp_mbox['mailbox'], 'mailbox_token' => $mailbox_token)), _('Empty folder'), '', '', "ImpMailbox.confirmDialog(this.href, '" . addslashes(_('Are you sure you wish to delete all mail in this folder?')) . '\'); return false;') . Horde::img('empty_spam.png', _('Empty folder')) . '</a>');
+ $hdr_template->set('empty', Horde::link(Horde_Util::addParameter($mailbox_imp_url, array('actionID' => 'empty_mailbox', 'mailbox' => $imp_mbox['mailbox'], 'mailbox_token' => $mailbox_token)), _("Empty folder"), '', '', "ImpMailbox.confirmDialog(this.href, '" . addslashes(_("Are you sure you wish to delete all mail in this folder?")) . "'); return false;") . Horde::img('empty_spam.png', _("Empty folder")) . '</a>');
}
} else {
if ($imp_search->isEditableVFolder()) {
- $edit_search = sprintf(_('Edit Virtual Folder Definition for %s'), htmlspecialchars($rawtitle));
- $hdr_template->set('delete_vfolder', Horde::link($imp_search->deleteURL(), sprintf(_('Delete Virtual Folder Definition for %s'), htmlspecialchars($rawtitle)), null, null, "if (confirm('" . addslashes(_('Are you sure you want to delete this Virtual Folder Definition?')) . '\')) { return true; } else { return false; }') . Horde::img('delete.png', sprintf(_('Delete Virtual Folder Definition for %s'), $rawtitle), '', $graphicsdir) . '</a>');
+ $edit_search = sprintf(_("Edit Virtual Folder Definition for %s"), htmlspecialchars($rawtitle));
+ $hdr_template->set('delete_vfolder', Horde::link($imp_search->deleteURL(), sprintf(_("Delete Virtual Folder Definition for %s"), htmlspecialchars($rawtitle)), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this Virtual Folder Definition?")) . "')) { return true; } else { return false; }") . Horde::img('delete.png', sprintf(_("Delete Virtual Folder Definition for %s"), $rawtitle), '', $graphicsdir) . '</a>');
} else {
if (!$vfolder) {
- $edit_search = _('Edit Search Query');
+ $edit_search = _("Edit Search Query");
}
}
if (isset($edit_search)) {
}
$hdr_template->set('msgcount', $msg_count);
if ($pageOb['pagecount'] > 1) {
- $hdr_template->set('page', sprintf(_('Page %d of %d'), $pageOb['page'], $pageOb['pagecount']));
+ $hdr_template->set('page', sprintf(_("Page %d of %d"), $pageOb['page'], $pageOb['pagecount']));
}
echo $hdr_template->fetch(IMP_TEMPLATES . '/mailbox/header.html');
$del_template = new Horde_Template();
$del_template->set('hide', Horde::widget(Horde_Util::addParameter($refresh_url, array('actionID' => 'hide_deleted', 'mailbox_token' => $mailbox_token)), $deleted_prompt, 'widget hideAction', '', '', $deleted_prompt));
if (!$readonly) {
- $del_template->set('purge', Horde::widget(Horde_Util::addParameter($refresh_url, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _('Purge Deleted'), 'widget purgeAction', '', '', _('Pur_ge Deleted')));
+ $del_template->set('purge', Horde::widget(Horde_Util::addParameter($refresh_url, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _("Purge Deleted"), 'widget purgeAction', '', '', _("Pur_ge Deleted")));
}
echo $del_template->fetch(IMP_TEMPLATES . '/mailbox/actions_deleted.html');
}
$n_template->set('flaglist_unset', $tmp['unset']);
if ($n_template->get('use_folders')) {
- $n_template->set('move', Horde::widget('#', _('Move to folder'), 'widget moveAction', '', '', _('Move'), true));
- $n_template->set('copy', Horde::widget('#', _('Copy to folder'), 'widget copyAction', '', '', _('Copy'), true));
+ $n_template->set('move', Horde::widget('#', _("Move to folder"), 'widget moveAction', '', '', _("Move"), true));
+ $n_template->set('copy', Horde::widget('#', _("Copy to folder"), 'widget copyAction', '', '', _("Copy"), true));
$n_template->set('folder_options', $folder_options);
}
}
$del_class = ($use_trash && (($imp_mbox['mailbox'] == (IMP::folderPref($prefs->getValue('trash_folder'), true))) || !is_null($vtrash)))
? 'permdeleteAction'
: 'deleteAction';
- $a_template->set('delete', Horde::widget('#', _('Delete'), 'widget ' . $del_class, '', '', _('_Delete')));
+ $a_template->set('delete', Horde::widget('#', _("Delete"), 'widget ' . $del_class, '', '', _("_Delete")));
}
if ($showdelete['purge'] || !is_null($vtrash)) {
- $a_template->set('undelete', Horde::widget('#', _('Undelete'), 'widget undeleteAction', '', '', _('_Undelete')));
+ $a_template->set('undelete', Horde::widget('#', _("Undelete"), 'widget undeleteAction', '', '', _("_Undelete")));
}
if ($showdelete['purge']) {
if (isset($deleted_prompt)) {
$a_template->set('hide_deleted', Horde::widget(Horde_Util::addParameter($mailbox_link, array('actionID' => 'hide_deleted', 'mailbox_token' => $mailbox_token)), $deleted_prompt, 'widget hideAction', '', '', $deleted_prompt));
}
- $a_template->set('purge_deleted', Horde::widget(Horde_Util::addParameter($mailbox_link, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _('Purge Deleted'), 'widget purgeAction', '', '', _('Pur_ge Deleted')));
+ $a_template->set('purge_deleted', Horde::widget(Horde_Util::addParameter($mailbox_link, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _("Purge Deleted"), 'widget purgeAction', '', '', _("Pur_ge Deleted")));
}
if ($registry->hasMethod('mail/blacklistFrom')) {
- $a_template->set('blacklist', Horde::widget('#', _('Blacklist'), 'widget blacklistAction', '', '', _('_Blacklist')));
+ $a_template->set('blacklist', Horde::widget('#', _("Blacklist"), 'widget blacklistAction', '', '', _("_Blacklist")));
}
if ($registry->hasMethod('mail/whitelistFrom')) {
- $a_template->set('whitelist', Horde::widget('#', _('Whitelist'), 'widget whitelistAction', '', '', _('_Whitelist')));
+ $a_template->set('whitelist', Horde::widget('#', _("Whitelist"), 'widget whitelistAction', '', '', _("_Whitelist")));
}
if (IMP::canCompose()) {
- $a_template->set('forward', Horde::widget('#', _('Forward'), 'widget forwardAction', '', '', _('Fo_rward')));
+ $a_template->set('forward', Horde::widget('#', _("Forward"), 'widget forwardAction', '', '', _("Fo_rward")));
}
if ($conf['spam']['reporting'] &&
($conf['spam']['spamfolder'] ||
($imp_mbox['mailbox'] != IMP::folderPref($prefs->getValue('spam_folder'), true)))) {
- $a_template->set('spam', Horde::widget('#', _('Report as Spam'), 'widget spamAction', '', '', _('Report as Spam')));
+ $a_template->set('spam', Horde::widget('#', _("Report as Spam"), 'widget spamAction', '', '', _("Report as Spam")));
}
if ($conf['notspam']['reporting'] &&
(!$conf['notspam']['spamfolder'] ||
($imp_mbox['mailbox'] == IMP::folderPref($prefs->getValue('spam_folder'), true)))) {
- $a_template->set('notspam', Horde::widget('#', _('Report as Innocent'), 'widget notspamAction', '', '', _('Report as Innocent')));
+ $a_template->set('notspam', Horde::widget('#', _("Report as Innocent"), 'widget notspamAction', '', '', _("Report as Innocent")));
}
- $a_template->set('view_messages', Horde::widget('#', _('View Messages'), 'widget viewAction', '', '', _('View Messages')));
+ $a_template->set('view_messages', Horde::widget('#', _("View Messages"), 'widget viewAction', '', '', _("View Messages")));
echo $a_template->fetch(IMP_TEMPLATES . '/mailbox/actions.html');
}
$sortText = ($sortpref['dir']) ? '\/' : '/\\';
$headers = array(
Horde_Imap_Client::SORT_ARRIVAL => array(
- 'stext' => _('Sort by Arrival'),
- 'text' => _('#'),
+ 'stext' => _("Sort by Arrival"),
+ 'text' => _("#"),
'width' => '4%'
),
Horde_Imap_Client::SORT_DATE => array(
- 'stext' => _('Sort by Date'),
- 'text' => _('Dat_e'),
+ 'stext' => _("Sort by Date"),
+ 'text' => _("Dat_e"),
'width' => '10%'
),
Horde_Imap_Client::SORT_TO => array(
- 'stext' => _('Sort by To Address'),
- 'text' => _('To'),
+ 'stext' => _("Sort by To Address"),
+ 'text' => _("To"),
'width' => '20%'
),
Horde_Imap_Client::SORT_FROM => array(
- 'stext' => _('Sort by From Address'),
- 'text' => _('Fro_m'),
+ 'stext' => _("Sort by From Address"),
+ 'text' => _("Fro_m"),
'width' => '20%'
),
Horde_Imap_Client::SORT_THREAD => array(
- 'stext' => _('Sort by Thread'),
- 'text' => _('_Thread'),
+ 'stext' => _("Sort by Thread"),
+ 'text' => _("_Thread"),
'width' => '52%'
),
Horde_Imap_Client::SORT_SUBJECT => array(
- 'stext' => _('Sort by Subject'),
- 'text' => _('Sub_ject'),
+ 'stext' => _("Sort by Subject"),
+ 'text' => _("Sub_ject"),
'width' => '52%'
),
Horde_Imap_Client::SORT_SIZE => array(
- 'stext' => _('Sort by Message Size'),
- 'text' => _('Si_ze'),
+ 'stext' => _("Sort by Message Size"),
+ 'text' => _("Si_ze"),
'width' => '6%'
)
);
/* Prepare the message headers template. */
$mh_template = new Horde_Template();
$mh_template->setOption('gettext', true);
- $mh_template->set('check_all', Horde::getAccessKeyAndTitle(_('Check _All/None')));
+ $mh_template->set('check_all', Horde::getAccessKeyAndTitle(_("Check _All/None")));
$mh_template->set('form_tag', true);
$mh_template->set('mailbox_url', $mailbox_url);
$mh_template->set('mailbox', htmlspecialchars($imp_mbox['mailbox']));
if ($search_mbox) {
if (empty($lastMbox) || ($ob['mailbox'] != $lastMbox)) {
if (!empty($lastMbox)) {
- _outputSummaries($msgs);
+ _outputSummaries($msgs, $lastMbox);
$msgs = array();
}
$folder_link = Horde::url(Horde_Util::addParameter('mailbox.php', 'mailbox', $ob['mailbox']));
- $folder_link = Horde::link($folder_link, sprintf(_('View messages in %s'), IMP::displayFolder($ob['mailbox'])), 'smallheader') . IMP::displayFolder($ob['mailbox']) . '</a>';
+ $folder_link = Horde::link($folder_link, sprintf(_("View messages in %s"), IMP::displayFolder($ob['mailbox'])), 'smallheader') . IMP::displayFolder($ob['mailbox']) . '</a>';
if (is_null($search_template)) {
$search_template = new Horde_Template();
}
/* Show message preview? */
if ($show_preview && isset($ob['preview'])) {
if (empty($ob['preview'])) {
- $ptext = '[[' . _('No Preview Text') . ']]';
+ $ptext = '[[' . _("No Preview Text") . ']]';
} else {
if (!empty($strip_preview)) {
$ptext = preg_replace(array('/\n/', '/(\s)+/'), array(' ', '$1'), str_replace("\r", "\n", $ob['preview']));
if (Horde_String::length($ptext) > $maxlen) {
$ptext = Horde_String::substr($ptext, 0, $maxlen) . ' ...';
} elseif (empty($ob['previewcut'])) {
- $ptext .= '[[' . _('END') . ']]';
+ $ptext .= '[[' . _("END") . ']]';
}
}
$msg['preview'] = $ptext;
switch ($fromlinkstyle) {
case 0:
if (!$getfrom['error']) {
- $msg['from'] = Horde::link(IMP::composeLink(array(), array('actionID' => 'mailto', 'thismailbox' => $ob['mailbox'], 'index' => $ob['uid'], 'mailto' => $getfrom['to'])), sprintf(_('New Message to %s'), $msg['fullfrom'])) . $msg['from'] . '</a>';
+ $msg['from'] = Horde::link(IMP::composeLink(array(), array('actionID' => 'mailto', 'thismailbox' => $ob['mailbox'], 'index' => $ob['uid'], 'mailto' => $getfrom['to'])), sprintf(_("New Message to %s"), $msg['fullfrom'])) . $msg['from'] . '</a>';
}
break;
$msgs[$ob['uid']] = $msg;
}
-_outputSummaries($msgs);
+_outputSummaries($msgs, $lastMbox);
/* Prepare the message footers template. */
$mf_template = new Horde_Template();
if (($actionID == 'c') && !is_null($atc_id)) {
$summary = $imp_contents->getSummary($atc_id, IMP_Contents::SUMMARY_SIZE | IMP_Contents::SUMMARY_DESCRIP_NOLINK_NOHTMLSPECCHARS | IMP_Contents::SUMMARY_DOWNLOAD_NOJS);
- $mimp_render->set('title', _('Verify Download'));
+ $mimp_render->set('title', _("Verify Download"));
$null = null;
$hb = &$mimp_render->add(new Horde_Mobile_block($null));
- $hb->add(new Horde_Mobile_text(_('Click to verify download of attachment') . ': '));
+ $hb->add(new Horde_Mobile_text(_("Click to verify download of attachment") . ': '));
$hb->add(new Horde_Mobile_link($summary['description'], $summary['download']));
$t = &$hb->add(new Horde_Mobile_text(sprintf(' [%s] %s', $summary['type'], $summary['size']) . "\n"));
$t->set('linebreaks', true);
$hb = &$mimp_render->add(new Horde_Mobile_block($null));
- $hb->add(new Horde_Mobile_link(_('Return to message view'), $self_link));
+ $hb->add(new Horde_Mobile_link(_("Return to message view"), $self_link));
$mimp_render->display();
exit;
$subject = Horde_String::substr($subject, 0, $conf['mimp']['mailbox']['max_subj_chars']) . '...';
}
} else {
- $subject = _('[No Subject]');
+ $subject = _("[No Subject]");
}
$display_headers['subject'] = $subject;
switch ($imp_ui->getXpriority($xpriority)) {
case 'high':
case 'low':
- $basic_headers['priority'] = _('Priority');
+ $basic_headers['priority'] = _("Priority");
$display_headers['priority'] = $xpriority;
break;
}
!Horde_Util::getFormData('fullmsg') &&
(strlen($msg_text) > 250)) {
$msg_text = Horde_String::substr(trim($msg_text), 0, 250) . " [...]\n";
- $fullmsg_link = new Horde_Mobile_link(_('View Full Message'), Horde_Util::addParameter($self_link, array('fullmsg' => 1)));
+ $fullmsg_link = new Horde_Mobile_link(_("View Full Message"), Horde_Util::addParameter($self_link, array('fullmsg' => 1)));
} else {
$fullmsg_link = null;
}
/* Create message menu. */
-$menu = new Horde_Mobile_card('o', _('Menu'));
+$menu = new Horde_Mobile_card('o', _("Menu"));
$mset = &$menu->add(new Horde_Mobile_linkset());
if (!$readonly) {
if (in_array('\\deleted', $flags)) {
- $mset->add(new Horde_Mobile_link(_('Undelete'), Horde_Util::addParameter($self_link, array('a' => 'u'))));
+ $mset->add(new Horde_Mobile_link(_("Undelete"), Horde_Util::addParameter($self_link, array('a' => 'u'))));
} else {
- $mset->add(new Horde_Mobile_link(_('Delete'), Horde_Util::addParameter($self_link, array('a' => 'd', 'mt' => Horde::getRequestToken('imp.message-mimp')))));
+ $mset->add(new Horde_Mobile_link(_("Delete"), Horde_Util::addParameter($self_link, array('a' => 'd', 'mt' => Horde::getRequestToken('imp.message-mimp')))));
}
}
/* Add compose actions (Reply, Reply List, Reply All, Forward, Redirect). */
if (IMP::canCompose()) {
- $items = array(IMP::composeLink(array(), array('a' => 'r') + $compose_params) => _('Reply'));
+ $items = array(IMP::composeLink(array(), array('a' => 'r') + $compose_params) => _("Reply"));
if ($list_info['reply_list']) {
- $items[IMP::composeLink(array(), array('a' => 'rl') + $compose_params)] = _('Reply to List');
+ $items[IMP::composeLink(array(), array('a' => 'rl') + $compose_params)] = _("Reply to List");
}
if (Horde_Mime_Address::addrArray2String(array_merge($envelope['to'], $envelope['cc']), array('filter' => array_keys($user_identity->getAllFromAddresses(true))))) {
- $items[IMP::composeLink(array(), array('a' => 'ra') + $compose_params)] = _('Reply All');
+ $items[IMP::composeLink(array(), array('a' => 'ra') + $compose_params)] = _("Reply All");
}
- $items[IMP::composeLink(array(), array('a' => 'f') + $compose_params)] = _('Forward');
- $items[IMP::composeLink(array(), array('a' => 'rc') + $compose_params)] = _('Redirect');
+ $items[IMP::composeLink(array(), array('a' => 'f') + $compose_params)] = _("Forward");
+ $items[IMP::composeLink(array(), array('a' => 'rc') + $compose_params)] = _("Redirect");
}
foreach ($items as $link => $label) {
}
if (isset($next_link)) {
- $mset->add(new Horde_Mobile_link(_('Next'), $next_link));
+ $mset->add(new Horde_Mobile_link(_("Next"), $next_link));
}
if (isset($prev_link)) {
- $mset->add(new Horde_Mobile_link(_('Prev'), $prev_link));
+ $mset->add(new Horde_Mobile_link(_("Prev"), $prev_link));
}
-$mset->add(new Horde_Mobile_link(sprintf(_('To %s'), IMP::getLabel($mailbox_name)), $mailbox_link));
+$mset->add(new Horde_Mobile_link(sprintf(_("To %s"), IMP::getLabel($mailbox_name)), $mailbox_link));
MIMP::addMIMPMenu($mset, 'message');
$mimp_render->set('title', $display_headers['subject']);
-$c = &$mimp_render->add(new Horde_Mobile_card('m', ($status ? $status . ' | ' : '') . $display_headers['subject'] . ' ' . sprintf(_('(%d of %d)'), $msgindex, $msgcount)));
-$c->softkey('#o', _('Menu'));
+$c = &$mimp_render->add(new Horde_Mobile_card('m', ($status ? $status . ' | ' : '') . $display_headers['subject'] . ' ' . sprintf(_("(%d of %d)"), $msgindex, $msgcount)));
+$c->softkey('#o', _("Menu"));
$imp_notify->setMobileObject($c);
$notification->notify(array('listeners' => 'status'));
}
$t = &$hb->add(new Horde_Mobile_text($val . (($all_to) ? ' ' : "\n")));
if ($all_to) {
- $hb->add(new Horde_Mobile_link('[' . _('Show All') . ']', Horde_Util::addParameter($self_link, array('allto' => 1))));
+ $hb->add(new Horde_Mobile_link('[' . _("Show All") . ']', Horde_Util::addParameter($self_link, array('allto' => 1))));
$t = &$hb->add(new Horde_Mobile_text("\n"));
}
$t->set('linebreaks', true);
foreach ($atc_parts as $key) {
$summary = $imp_contents->getSummary($key, IMP_Contents::SUMMARY_SIZE | IMP_Contents::SUMMARY_DESCRIP_NOLINK_NOHTMLSPECCHARS | IMP_Contents::SUMMARY_DOWNLOAD_NOJS);
- $hb->add(new Horde_Mobile_text(_('Attachment') . ': ', array('b')));
+ $hb->add(new Horde_Mobile_text(_("Attachment") . ': ', array('b')));
if (empty($summary['download'])) {
$hb->add(new Horde_Mobile_text($summary['description']));
} else {
case 'add_address':
try {
$contact_link = IMP::addAddress(Horde_Util::getFormData('address'), Horde_Util::getFormData('name'));
- $notification->push(sprintf(_('Entry "%s" was successfully added to the address book'), $contact_link), 'horde.success', array('content.raw'));
+ $notification->push(sprintf(_("Entry \"%s\" was successfully added to the address book"), $contact_link), 'horde.success', array('content.raw'));
} catch (Horde_Exception $e) {
$notification->push($e, 'horde.error');
}
/* Process the subject now. */
if ($subject = $mime_headers->getValue('subject')) {
$display_headers['subject'] = $imp_ui->getDisplaySubject($subject);
- $title = sprintf(_('%s: %s'), $page_label, $subject);
+ $title = sprintf(_("%s: %s"), $page_label, $subject);
$shortsub = htmlspecialchars($subject);
if (strlen($shortsub) > 97) {
$shortsub = substr($shortsub, 0, 97) . '...';
}
} else {
- $display_headers['subject'] = $shortsub = _('[No Subject]');
- $title = sprintf(_('%s: %s'), $page_label, $shortsub);
+ $display_headers['subject'] = $shortsub = _("[No Subject]");
+ $title = sprintf(_("%s: %s"), $page_label, $shortsub);
}
/* See if the 'X-Priority' header has been set. */
$xpriority = $mime_headers->getValue('x-priority');
switch ($imp_ui->getXpriority($xpriority)) {
case 'high':
- $basic_headers['priority'] = _('Priority');
- $display_headers['priority'] = '<div class="msgflags flagHighpriority" title="' . htmlspecialchars(_('High Priority')) . '"></div> ' . $xpriority;
+ $basic_headers['priority'] = _("Priority");
+ $display_headers['priority'] = '<div class="msgflags flagHighpriority" title="' . htmlspecialchars(_("High Priority")) . '"></div>' . ' ' . $xpriority;
break;
case 'low':
- $basic_headers['priority'] = _('Priority');
- $display_headers['priority'] = '<div class="msgflags flagLowpriority" title="' . htmlspecialchars(_('Low Priority')) . '"></div> ' . $xpriority;
+ $basic_headers['priority'] = _("Priority");
+ $display_headers['priority'] = '<div class="msgflags flagLowpriority" title="' . htmlspecialchars(_("Low Priority")) . '"></div>' . ' ' . $xpriority;
break;
}
$t_template->set('thismailbox', htmlspecialchars($mailbox_name));
$t_template->set('start', htmlspecialchars($msgindex));
$t_template->set('index', htmlspecialchars($index));
- $t_template->set('label', sprintf(_('%s: %s'), $header_label, $shortsub));
- $t_template->set('msg_count', sprintf(_('(%d of %d)'), $msgindex, $imp_mailbox->getMessageCount()));
+ $t_template->set('label', sprintf(_("%s: %s"), $header_label, $shortsub));
+ $t_template->set('msg_count', sprintf(_("(%d of %d)"), $msgindex, $imp_mailbox->getMessageCount()));
$t_template->set('status', $status);
$t_template->set('message_token', $message_token);
$n_template->set('flaglist_unset', $tmp['unset']);
if ($conf['user']['allow_folders']) {
- $n_template->set('move', Horde::widget('#', _('Move to folder'), 'widget moveAction', '', '', _('Move'), true));
- $n_template->set('copy', Horde::widget('#', _('Copy to folder'), 'widget copyAction', '', '', _('Copy'), true));
- $n_template->set('options', IMP::flistSelect(array('heading' => _('This message to'), 'new_folder' => true, 'inc_tasklists' => true, 'inc_notepads' => true)));
+ $n_template->set('move', Horde::widget('#', _("Move to folder"), 'widget moveAction', '', '', _("Move"), true));
+ $n_template->set('copy', Horde::widget('#', _("Copy to folder"), 'widget copyAction', '', '', _("Copy"), true));
+ $n_template->set('options', IMP::flistSelect(array('heading' => _("This message to"), 'new_folder' => true, 'inc_tasklists' => true, 'inc_notepads' => true)));
}
}
- $n_template->set('back_to', Horde::widget($mailbox_url, sprintf(_('Back to %s'), $h_page_label), 'widget', '', '', sprintf(_('Bac_k to %s'), $h_page_label), true));
+ $n_template->set('back_to', Horde::widget($mailbox_url, sprintf(_("Back to %s"), $h_page_label), 'widget', '', '', sprintf(_("Bac_k to %s"), $h_page_label), true));
$rtl = !empty(Horde_Nls::$config['rtl'][$language]);
if (Horde_Util::nonInputVar('prev_url')) {
- $n_template->set('prev', Horde::link($prev_url, _('Previous Message')));
+ $n_template->set('prev', Horde::link($prev_url, _("Previous Message")));
$n_template->set('prev_img', Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', '', $registry->getImageDir('horde')));
} else {
$n_template->set('prev_img', Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', '', '', $registry->getImageDir('horde')));
}
if (Horde_Util::nonInputVar('next_url')) {
- $n_template->set('next', Horde::link($next_url, _('Next Message')));
+ $n_template->set('next', Horde::link($next_url, _("Next Message")));
$n_template->set('next_img', Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', '', $registry->getImageDir('horde')));
} else {
$n_template->set('next_img', Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png', '', '', $registry->getImageDir('horde')));
if (!$readonly) {
if (in_array('\\deleted', $flags)) {
- $a_template->set('delete', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'undelete_message'), _('Undelete'), 'widget', '', '', _('Undelete'), true));
+ $a_template->set('delete', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'undelete_message'), _("Undelete"), 'widget', '', '', _("Undelete"), true));
} else {
- $a_template->set('delete', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'delete_message'), _('Delete'), 'widget', '', ($use_pop) ? "return window.confirm('" . addslashes(_('Are you sure you wish to PERMANENTLY delete these messages?')) . "');" : '', _('_Delete'), true));
+ $a_template->set('delete', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'delete_message'), _("Delete"), 'widget', '', ($use_pop) ? "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete these messages?")) . "');" : '', _("_Delete"), true));
}
}
$disable_compose = !IMP::canCompose();
if (!$disable_compose) {
- $a_template->set('reply', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply') + $compose_params), _('Reply'), 'widget hasmenu', '', '', _('_Reply'), true));
- $a_template->set('reply_sender', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply') + $compose_params), _('To Sender'), 'widget', '', '', _('To Sender'), true));
+ $a_template->set('reply', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply') + $compose_params), _("Reply"), 'widget hasmenu', '', '', _("_Reply"), true));
+ $a_template->set('reply_sender', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply') + $compose_params), _("To Sender"), 'widget', '', '', _("To Sender"), true));
if ($list_info['reply_list']) {
- $a_template->set('reply_list', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply_list') + $compose_params), _('To List'), 'widget', '', '', _('To _List'), true));
+ $a_template->set('reply_list', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply_list') + $compose_params), _("To List"), 'widget', '', '', _("To _List"), true));
}
if (Horde_Mime_Address::addrArray2String(array_merge($envelope['to'], $envelope['cc']), array('filter' => array_keys($user_identity->getAllFromAddresses(true))))) {
- $a_template->set('show_reply_all', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply_all') + $compose_params), _('To All'), 'widget', '', '', _('To _All'), true));
+ $a_template->set('show_reply_all', Horde::widget(IMP::composeLink(array(), array('actionID' => 'reply_all') + $compose_params), _("To All"), 'widget', '', '', _("To _All"), true));
}
- $a_template->set('forward', Horde::widget(IMP::composeLink(array(), array('actionID' => 'forward') + $compose_params), _('Forward'), 'widget', '', '', _('Fo_rward'), true));
+ $a_template->set('forward', Horde::widget(IMP::composeLink(array(), array('actionID' => 'forward') + $compose_params), _("Forward"), 'widget', '', '', _("Fo_rward"), true));
- $a_template->set('redirect', Horde::widget(IMP::composeLink(array(), array('actionID' => 'redirect_compose') + $compose_params), _('Redirect'), 'widget', '', '', _('Redirec_t'), true));
+ $a_template->set('redirect', Horde::widget(IMP::composeLink(array(), array('actionID' => 'redirect_compose') + $compose_params), _("Redirect"), 'widget', '', '', _("Redirec_t"), true));
}
if (IMP::threadSortAvailable($imp_mbox['mailbox'])) {
- $a_template->set('show_thread', Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], $index, $mailbox_name), array('start' => $msgindex)), _('View Thread'), 'widget', '', '', _('_View Thread'), true));
+ $a_template->set('show_thread', Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], $index, $mailbox_name), array('start' => $msgindex)), _("View Thread"), 'widget', '', '', _("_View Thread"), true));
}
if ($registry->hasMethod('mail/blacklistFrom')) {
- $a_template->set('blacklist', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'blacklist'), _('Blacklist'), 'widget', '', '', _('_Blacklist'), true));
+ $a_template->set('blacklist', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'blacklist'), _("Blacklist"), 'widget', '', '', _("_Blacklist"), true));
}
if ($registry->hasMethod('mail/whitelistFrom')) {
- $a_template->set('whitelist', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'whitelist'), _('Whitelist'), 'widget', '', '', _('_Whitelist'), true));
+ $a_template->set('whitelist', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'whitelist'), _("Whitelist"), 'widget', '', '', _("_Whitelist"), true));
}
if (!empty($conf['user']['allow_view_source'])) {
- $a_template->set('view_source', $imp_contents->linkViewJS($imp_contents->getMIMEMessage(), 'view_source', _('_Message Source'), array('jstext' => _('Message Source'), 'css' => 'widget', 'widget' => true)));
+ $a_template->set('view_source', $imp_contents->linkViewJS($imp_contents->getMIMEMessage(), 'view_source', _("_Message Source"), array('jstext' => _("Message Source"), 'css' => 'widget', 'widget' => true)));
}
if (!$disable_compose &&
(!empty($conf['user']['allow_resume_all_in_drafts']) &&
$mailbox_name == IMP::folderPref($prefs->getValue('drafts_folder'), true)) ||
in_array('\\draft', $flags))) {
- $a_template->set('resume', Horde::widget(IMP::composeLink(array(), array('actionID' => 'draft') + $compose_params), _('Resume'), 'widget', '', '', _('Resume'), true));
+ $a_template->set('resume', Horde::widget(IMP::composeLink(array(), array('actionID' => 'draft') + $compose_params), _("Resume"), 'widget', '', '', _("Resume"), true));
}
$imp_params = IMP::getIMPMboxParameters($imp_mbox['mailbox'], $index, $mailbox_name);
- $a_template->set('save_as', Horde::widget(Horde::downloadUrl($subject, array_merge(array('actionID' => 'save_message'), $imp_params)), _('Save as'), 'widget', '', '', _('Sa_ve as'), 2));
+ $a_template->set('save_as', Horde::widget(Horde::downloadUrl($subject, array_merge(array('actionID' => 'save_message'), $imp_params)), _("Save as"), 'widget', '', '', _("Sa_ve as"), 2));
$print_params = array_merge(array('actionID' => 'print_message'), $imp_params);
- $a_template->set('print', Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox']), $print_params), _('Print'), 'widget', '_blank', IMP::popupIMPString('message.php', $print_params) . 'return false;', _('_Print'), true));
+ $a_template->set('print', Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox']), $print_params), _("Print"), 'widget', '_blank', IMP::popupIMPString('message.php', $print_params) . 'return false;', _("_Print"), true));
if ($conf['spam']['reporting'] &&
($conf['spam']['spamfolder'] ||
($mailbox_name != IMP::folderPref($prefs->getValue('spam_folder'), true)))) {
- $a_template->set('spam', Horde::widget('#', _('Report as Spam'), 'widget spamAction', '', '', _('Report as Spam'), true));
+ $a_template->set('spam', Horde::widget('#', _("Report as Spam"), 'widget spamAction', '', '', _("Report as Spam"), true));
}
if ($conf['notspam']['reporting'] &&
(!$conf['notspam']['spamfolder'] ||
($mailbox_name == IMP::folderPref($prefs->getValue('spam_folder'), true)))) {
- $a_template->set('notspam', Horde::widget('#', _('Report as Innocent'), 'widget notspamAction', '', '', _('Report as Innocent'), true));
+ $a_template->set('notspam', Horde::widget('#', _("Report as Innocent"), 'widget notspamAction', '', '', _("Report as Innocent"), true));
}
- $a_template->set('redirect', Horde::widget(IMP::composeLink(array(), array('actionID' => 'redirect_compose') + $compose_params), _('Redirect'), 'widget', '', '', _('Redirec_t'), true));
+ $a_template->set('redirect', Horde::widget(IMP::composeLink(array(), array('actionID' => 'redirect_compose') + $compose_params), _("Redirect"), 'widget', '', '', _("Redirec_t"), true));
- $a_template->set('headers', Horde::widget('#', _('Headers'), 'widget hasmenu', '', '', _('Headers'), true));
+ $a_template->set('headers', Horde::widget('#', _("Headers"), 'widget hasmenu', '', '', _("Headers"), true));
if ($all_headers || $list_headers) {
- $a_template->set('common_headers', Horde::widget($headersURL, _('Show Common Headers'), 'widget', '', '', _('Show Common Headers'), true));
+ $a_template->set('common_headers', Horde::widget($headersURL, _("Show Common Headers"), 'widget', '', '', _("Show Common Headers"), true));
}
if (!$all_headers) {
- $a_template->set('all_headers', Horde::widget(Horde_Util::addParameter($headersURL, 'show_all_headers', 1), _('Show All Headers'), 'widget', '', '', _('Show All Headers'), true));
+ $a_template->set('all_headers', Horde::widget(Horde_Util::addParameter($headersURL, 'show_all_headers', 1), _("Show All Headers"), 'widget', '', '', _("Show All Headers"), true));
}
if ($list_info['exists'] && !$list_headers) {
- $a_template->set('list_headers', Horde::widget(Horde_Util::addParameter($headersURL, 'show_list_headers', 1), _('Show Mailing List Information'), 'widget', '', '', _('Show Mailing List Information'), true));
+ $a_template->set('list_headers', Horde::widget(Horde_Util::addParameter($headersURL, 'show_list_headers', 1), _("Show Mailing List Information"), 'widget', '', '', _("Show Mailing List Information"), true));
}
}
/* Do MDN processing now. */
if (!IMP::$printMode &&
- $imp_ui->mdnCheck($imp_mbox['mailbox'], $index, $mime_headers, Horde_Util::getFormData('mdn_confirm'))) {
- $msgtext .= $imp_ui->formatStatusMsg(array('text' => array(_('The sender of this message is requesting a Message Disposition Notification from you when you have read this message.'), sprintf(_('Click %s to send the notification message.'), Horde::link(htmlspecialchars(Horde_Util::addParameter($selfURL, 'mdn_confirm', 1))) . _('HERE') . '</a>'))));
+ $imp_ui->MDNCheck($imp_mbox['mailbox'], $index, $mime_headers, Horde_Util::getFormData('mdn_confirm'))) {
+ $msgtext .= $imp_ui->formatStatusMsg(array('text' => array(_("The sender of this message is requesting a Message Disposition Notification from you when you have read this message."), sprintf(_("Click %s to send the notification message."), Horde::link(htmlspecialchars(Horde_Util::addParameter($selfURL, 'mdn_confirm', 1))) . _("HERE") . '</a>'))));
}
$show_parts = Horde_Util::getFormData('show_parts', $prefs->getValue('parts_display'));
}
if (!strlen($msgtext)) {
- $msgtext = $imp_ui->formatStatusMsg(array('text' => array(_('There are no parts that can be shown inline.'))));
+ $msgtext = $imp_ui->formatStatusMsg(array('text' => array(_("There are no parts that can be shown inline."))));
}
/* Build the Attachments menu. */
if (!IMP::$printMode) {
- $a_template->set('atc', Horde::widget('#', _('Attachments'), 'widget hasmenu', '', '', _('Attachments'), true));
+ $a_template->set('atc', Horde::widget('#', _("Attachments"), 'widget hasmenu', '', '', _("Attachments"), true));
if ($show_parts != 'all') {
- $a_template->set('show_parts_all', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'all')), _('Show All Message Parts'), 'widget', '', '', _('Show All Message Parts'), true));
+ $a_template->set('show_parts_all', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'all')), _("Show All Message Parts"), 'widget', '', '', _("Show All Message Parts"), true));
}
if ($show_parts != 'atc') {
- $a_template->set('show_parts_atc', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'atc')), _('Show Attachments Only'), 'widget', '', '', _('Show Attachments Only'), true));
+ $a_template->set('show_parts_atc', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'atc')), _("Show Attachments Only"), 'widget', '', '', _("Show Attachments Only"), true));
}
if (count($display_ids) > 2) {
- $a_template->set('download_all', Horde::widget($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all'), _('Download All Attachments (in .zip file)'), 'widget', '', '', _('Download All Attachments (in .zip file)'), true));
+ $a_template->set('download_all', Horde::widget($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all'), _("Download All Attachments (in .zip file)"), 'widget', '', '', _("Download All Attachments (in .zip file)"), true));
if ($strip_atc) {
- $a_template->set('strip_all', Horde::widget(htmlspecialchars(html_entity_decode(Horde_Util::addParameter(Horde_Util::removeParameter(Horde::selfUrl(true), array('actionID')), array('actionID' => 'strip_all', 'message_token' => $message_token)))), _('Strip All Attachments'), 'widget', '', "return window.confirm('" . addslashes(_('Are you sure you wish to PERMANENTLY delete all attachments?')) . "');", _('Strip All Attachments'), true));
+ $a_template->set('strip_all', Horde::widget(htmlspecialchars(html_entity_decode(Horde_Util::addParameter(Horde_Util::removeParameter(Horde::selfUrl(true), array('actionID')), array('actionID' => 'strip_all', 'message_token' => $message_token)))), _("Strip All Attachments"), 'widget', '', "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete all attachments?")) . "');", _("Strip All Attachments"), true));
}
}
}
$tmp[] = '</tr>';
}
- $hdrs[] = array('name' => ($show_parts == 'all') ? _('Parts') : _('Attachments'), 'val' => '<table>' . implode('', $tmp) . '</table>', 'i' => (++$i % 2));
+ $hdrs[] = array('name' => ($show_parts == 'all') ? _("Parts") : _("Attachments"), 'val' => '<table>' . implode('', $tmp) . '</table>', 'i' => (++$i % 2));
}
if (IMP::$printMode && !empty($conf['print']['add_printedby'])) {
- $hdrs[] = array('name' => _('Printed By'), 'val' => $user_identity->getFullname() ? $user_identity->getFullname() : Horde_Auth::getAuth(), 'i' => (++$i % 2));
+ $hdrs[] = array('name' => _("Printed By"), 'val' => $user_identity->getFullname() ? $user_identity->getFullname() : Horde_Auth::getAuth(), 'i' => (++$i % 2));
}
$m_template->set('headers', $hdrs);
function _importKeyDialog($target)
{
- $title = _('Import PGP Key');
+ $title = _("Import PGP Key");
require IMP_TEMPLATES . '/common-header.inc';
IMP::status();
return $key;
}
- $res = $GLOBALS['browser']->wasFileUploaded('upload_key', _('key'));
+ $res = $GLOBALS['browser']->wasFileUploaded('upload_key', _("key"));
if (!is_a($res, 'PEAR_Error')) {
return file_get_contents($_FILES['upload_key']['tmp_name']);
} else {
$passphrase2 = Horde_Util::getFormData('generate_passphrase2');
if (empty($realname) || empty($email)) {
- $notification->push(_('Name and/or email cannot be empty'), 'horde.error');
+ $notification->push(_("Name and/or email cannot be empty"), 'horde.error');
} elseif (empty($passphrase1) || empty($passphrase2)) {
- $notification->push(_('Passphrases cannot be empty'), 'horde.error');
+ $notification->push(_("Passphrases cannot be empty"), 'horde.error');
} elseif ($passphrase1 !== $passphrase2) {
- $notification->push(_('Passphrases do not match'), 'horde.error');
+ $notification->push(_("Passphrases do not match"), 'horde.error');
} else {
try {
$imp_pgp->generatePersonalKeys($realname, $email, $passphrase1, $comment, $keylength);
- $notification->push(_('Personal PGP keypair generated successfully.'), 'horde.success');
+ $notification->push(_("Personal PGP keypair generated successfully."), 'horde.success');
} catch (Horde_Exception $e) {
$notification->push($e);
}
case 'delete_key':
$imp_pgp->deletePersonalKeys();
- $notification->push(_('Personal PGP keys deleted successfully.'), 'horde.success');
+ $notification->push(_("Personal PGP keys deleted successfully."), 'horde.success');
break;
case 'import_public_key':
case 'process_import_public_key':
$publicKey = _getImportKey();
if (empty($publicKey)) {
- $notification->push(_('No PGP public key imported.'), 'horde.error');
+ $notification->push(_("No PGP public key imported."), 'horde.error');
$actionID = 'import_public_key';
_importKeyDialog('process_import_public_key');
} else {
try {
$key_info = $imp_pgp->addPublicKey($publicKey);
foreach ($key_info['signature'] as $sig) {
- $notification->push(sprintf(_('PGP Public Key for "%s (%s)" was successfully added.'), $sig['name'], $sig['email']), 'horde.success');
+ $notification->push(sprintf(_("PGP Public Key for \"%s (%s)\" was successfully added."), $sig['name'], $sig['email']), 'horde.success');
}
_reloadWindow();
} catch (Horde_Exception $e) {
if (isset($key_info['secret_key'])) {
/* Key contains private key too, don't allow to add this
* as public key. */
- $notification->push(_('Imported key contains your PGP private key. Only add your public key in the first step!'), 'horde.error');
+ $notification->push(_("Imported key contains your PGP private key. Only add your public key in the first step!"), 'horde.error');
_importKeyDialog('process_import_personal_public_key');
} else {
/* Success in importing public key - Move on to private
* key now. */
$imp_pgp->addPersonalPublicKey($publicKey);
- $notification->push(_('PGP public key successfully added.'), 'horde.success');
+ $notification->push(_("PGP public key successfully added."), 'horde.success');
$actionID = 'import_personal_private_key';
_importKeyDialog('process_import_personal_private_key');
}
} else {
/* Invalid public key imported - Redo public key import
* screen. */
- $notification->push(_('Invalid personal PGP public key.'), 'horde.error');
+ $notification->push(_("Invalid personal PGP public key."), 'horde.error');
_importKeyDialog('process_import_personal_public_key');
}
} catch (Horde_Exception $e) {
}
} else {
/* No public key imported - Redo public key import screen. */
- $notification->push(_('No personal PGP public key imported.'), 'horde.error');
+ $notification->push(_("No personal PGP public key imported."), 'horde.error');
_importKeyDialog('process_import_personal_public_key');
}
exit;
/* Personal public and private keys have been imported
* successfully - close the import popup window. */
$imp_pgp->addPersonalPrivateKey($privateKey);
- $notification->push(_('PGP private key successfully added.'), 'horde.success');
+ $notification->push(_("PGP private key successfully added."), 'horde.success');
_reloadWindow();
} else {
/* Invalid private key imported - Redo private key import
* screen. */
- $notification->push(_('Invalid personal PGP private key.'), 'horde.error');
+ $notification->push(_("Invalid personal PGP private key."), 'horde.error');
_importKeyDialog('process_import_personal_private_key');
}
} catch (Horde_Exception $e) {
}
} else {
/* No private key imported - Redo private key import screen. */
- $notification->push(_('No personal PGP private key imported.'), 'horde.error');
+ $notification->push(_("No personal PGP private key imported."), 'horde.error');
_importKeyDialog('process_import_personal_private_key');
}
exit;
case 'delete_public_key':
try {
$imp_pgp->deletePublicKey(Horde_Util::getFormData('email'));
- $notification->push(sprintf(_('PGP Public Key for "%s" was successfully deleted.'), Horde_Util::getFormData('email')), 'horde.success');
+ $notification->push(sprintf(_("PGP Public Key for \"%s\" was successfully deleted."), Horde_Util::getFormData('email')), 'horde.success');
} catch (Horde_Exception $e) {
$notification->push($e);
}
$prefs->setValue('pgp_attach_pubkey', Horde_Util::getFormData('pgp_attach_pubkey') ? 1 : 0);
$prefs->setValue('pgp_scan_body', Horde_Util::getFormData('pgp_scan_body') ? 1 : 0);
$prefs->setValue('pgp_verify', Horde_Util::getFormData('pgp_verify') ? 1 : 0);
- $notification->push(_('Preferences successfully updated.'), 'horde.success');
+ $notification->push(_("Preferences successfully updated."), 'horde.success');
break;
case 'save_attachment_public_key':
case 'unset_passphrase':
$imp_pgp->unsetPassphrase('personal');
- $notification->push(_('Passphrase successfully unloaded.'), 'horde.success');
+ $notification->push(_("Passphrase successfully unloaded."), 'horde.success');
break;
case 'send_public_key':
try {
$imp_pgp->sendToPublicKeyserver($imp_pgp->getPersonalPublicKey());
- $notification->push(_('Key successfully sent to the public keyserver.'), 'horde.success');
+ $notification->push(_("Key successfully sent to the public keyserver."), 'horde.success');
} catch (Horde_Exception $e) {
$notification->push($e);
}
$plist[] = array(
'name' => $val['name'],
'email' => $val['email'],
- 'view' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_('View %s Public Key'), $val['name']), null, 'view_key'),
- 'info' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_('Information on %s Public Key'), $val['name']), null, 'info_key'),
- 'delete' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_('Delete %s Public Key'), $val['name']), null, null, 'if (confirm(\'' . addslashes(_('Are you sure you want to delete this public key?')) . '\')) { return true; } else { return false; }')
+ 'view' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'),
+ 'info' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'),
+ 'delete' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')) { return true; } else { return false; }")
);
}
$t->set('pubkey_list', $plist);
if ($secure_check) {
$t->set('has_key', $prefs->getValue('pgp_public_key') && $prefs->getValue('pgp_private_key'));
if ($t->get('has_key')) {
- $t->set('viewpublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _('View Personal Public Key'), null, 'view_key'));
- $t->set('infopublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _('Information on Personal Public Key'), null, 'info_key'));
- $t->set('sendkey', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'send_public_key'), _('Send Key to Public Keyserver')));
+ $t->set('viewpublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _("View Personal Public Key"), null, 'view_key'));
+ $t->set('infopublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _("Information on Personal Public Key"), null, 'info_key'));
+ $t->set('sendkey', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'send_public_key'), _("Send Key to Public Keyserver")));
$t->set('personalkey-public-help', Horde_Help::link('imp', 'pgp-personalkey-public'));
$passphrase = $imp_pgp->getPassphrase('personal');
- $t->set('passphrase', (empty($passphrase)) ? Horde::link('#', _('Enter Passphrase'), null, null, IMP::passphraseDialogJS('PGPPersonal') . ';return false;') . _('Enter Passphrase') : Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _('Unload Passphrase')) . _('Unload Passphrase'));
- $t->set('viewprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _('View Personal Private Key'), null, 'view_key'));
- $t->set('infoprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_private_key'), _('Information on Personal Private Key'), null, 'info_key'));
+ $t->set('passphrase', (empty($passphrase)) ? Horde::link('#', _("Enter Passphrase"), null, null, IMP::passphraseDialogJS('PGPPersonal') . ';return false;') . _("Enter Passphrase") : Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _("Unload Passphrase")) . _("Unload Passphrase"));
+ $t->set('viewprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'));
+ $t->set('infoprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_private_key'), _("Information on Personal Private Key"), null, 'info_key'));
$t->set('personalkey-private-help', Horde_Help::link('imp', 'pgp-personalkey-private'));
- $t->set('deletekeypair', addslashes(_('Are you sure you want to delete your keypair? (This is NOT recommended!)')));
+ $t->set('deletekeypair', addslashes(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")));
$t->set('personalkey-delete-help', Horde_Help::link('imp', 'pgp-personalkey-delete'));
} else {
$imp_identity = Identity::singleton(array('imp', 'imp'));
$t->set('personalkey-create-email-help', Horde_Help::link('imp', 'pgp-personalkey-create-email'));
$t->set('personalkey-create-keylength-help', Horde_Help::link('imp', 'pgp-personalkey-create-keylength'));
$t->set('personalkey-create-passphrase-help', Horde_Help::link('imp', 'pgp-personalkey-create-passphrase'));
- $t->set('keygen', addslashes(_('Key generation may take a long time to complete. Continue with key generation?')));
+ $t->set('keygen', addslashes(_("Key generation may take a long time to complete. Continue with key generation?")));
$t->set('personal_import_url', Horde_Util::addParameter($selfURL, 'actionID', 'import_personal_public_key'));
$t->set('personalkey-create-actions-help', Horde_Help::link('imp', 'pgp-personalkey-create-actions'));
}
} else {
$t->set('use_pgp_locked', $prefs->isLocked('use_pgp'));
if (!$t->get('use_pgp_locked')) {
- $t->set('use_pgp_label', Horde::label('use_pgp', _('Enable PGP functionality?')));
+ $t->set('use_pgp_label', Horde::label('use_pgp', _("Enable PGP functionality?")));
$t->set('use_pgp_help', Horde_Help::link('imp', 'pgp-overview'));
}
}
}
$description = ($total_num == 0)
- ? _('No Messages')
- : sprintf(_('%u of %u messages in %s unread.'), $unseen_num, $total_num, IMP::getLabel($mailbox));
+ ? _("No Messages")
+ : sprintf(_("%u of %u messages in %s unread."), $unseen_num, $total_num, IMP::getLabel($mailbox));
$t = new Horde_Template();
$t->set('charset', Horde_Nls::getCharset());
$t->set('action', Horde::applicationUrl('saveimage.php'));
$t->set('id', htmlspecialchars($id));
$t->set('index', htmlspecialchars($index));
-$t->set('image_img', Horde::img('mime/image.png', _('Image'), null, $registry->getImageDir('horde')));
+$t->set('image_img', Horde::img('mime/image.png', _("Image"), null, $registry->getImageDir('horde')));
/* Build the list of galleries. */
$t->set('gallerylist', $registry->call('images/selectGalleries', array(null, PERMS_EDIT)));
-$title = _('Save Image');
+$title = _("Save Image");
require IMP_TEMPLATES . '/common-header.inc';
IMP::status();
echo $t->fetch(IMP_TEMPLATES . '/saveimage/saveimage.html');
/* Redirect back to the mailbox if searching is not allowed. */
if ($_SESSION['imp']['protocol'] == 'pop') {
- $notification->push(_('Searching is not available with a POP3 server.'), 'horde.error');
+ $notification->push(_("Searching is not available with a POP3 server."), 'horde.error');
header('Location: ' . Horde::applicationUrl('mailbox.php', true));
exit;
}
} elseif (($edit_query !== null) && $imp_search->isSearchMbox($edit_query)) {
if ($imp_search->isVFolder($edit_query)) {
if (!$imp_search->isEditableVFolder($edit_query)) {
- $notification->push(_('Special Virtual Folders cannot be edited.'), 'horde.error');
+ $notification->push(_("Special Virtual Folders cannot be edited."), 'horde.error');
header('Location: ' . Horde::applicationUrl('mailbox.php', true));
exit;
}
/* Save the search as a virtual folder if requested. */
if (!empty($search['save_vfolder'])) {
if (empty($search['vfolder_label'])) {
- $notification->push(_('Virtual Folders require a label.'), 'horde.error');
+ $notification->push(_("Virtual Folders require a label."), 'horde.error');
break;
}
$id = $imp_search->addVFolder($query, $search['folders'], $search, $search['vfolder_label'], (empty($edit_query_vfolder) ? null : $edit_query_vfolder));
- $notification->push(sprintf(_('Virtual Folder "%s" created succesfully.'), $search['vfolder_label']), 'horde.success');
+ $notification->push(sprintf(_("Virtual Folder \"%s\" created succesfully."), $search['vfolder_label']), 'horde.success');
} else {
/* Set the search in the IMP session. */
- $id = $imp_search->createSearchQuery($query, $search['folders'], $search, _('Search Results'));
+ $id = $imp_search->createSearchQuery($query, $search['folders'], $search, _("Search Results"));
}
/* Redirect to the Mailbox Screen. */
$t->set('edit_query_vfolder', htmlspecialchars($edit_query_vfolder));
if (!$edit_query_vfolder) {
if (empty($search['mbox'])) {
- $t->set('search_title', _('Search'));
+ $t->set('search_title', _("Search"));
} else {
$t->set('search_title',
sprintf(
- _('Search %s'),
+ _("Search %s"),
Horde::link(
Horde::url(Horde_Util::addParameter('mailbox.php',
'mailbox',
}
$t->set('search_help', Horde_Help::link('imp', 'search'));
$t->set('match_or', $search['match'] == 'or');
-$t->set('label_or', Horde::label('search_match_or', _('Match Any Query')));
+$t->set('label_or', Horde::label('search_match_or', _("Match Any Query")));
$t->set('match_and', ($search['match'] == null) || ($search['match'] == 'and'));
-$t->set('label_and', Horde::label('search_match_and', _('Match All Queries')));
+$t->set('label_and', Horde::label('search_match_and', _("Match All Queries")));
$saved_searches = $imp_search->getSearchQueries();
if (!empty($saved_searches)) {
$years = -20;
$startyear = (($year_default < $curr_year) && ($years > 0)) ? $year_default : $curr_year;
$startyear = min($startyear, $startyear + $years);
- for ($j = 0, $totyears = abs($years); $j <= $years; ++$j) {
+ for ($j = 0; $j <= abs($years); $j++) {
$yearlist[] = $startyear++;
}
if ($years < 0) {
if ($browser->hasFeature('javascript')) {
Horde::addScriptFile('open_calendar.js', 'horde');
$fields[$i]['js_calendar_first'] = !$js_first++;
- $fields[$i]['js_calendar'] = Horde::link('#', _('Select a date'), '', '', 'openCalendar(\'dateimg' . $i . '\', \'search_date_' . $i . '\'); return false;');
- $fields[$i]['js_calendar_img'] = Horde::img('calendar.png', _('Calendar'), 'align="top" id="dateimg' . $i . '"', $GLOBALS['registry']->getImageDir('horde'));
+ $fields[$i]['js_calendar'] = Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'dateimg' . $i . '\', \'search_date_' . $i . '\'); return false;');
+ $fields[$i]['js_calendar_img'] = Horde::img('calendar.png', _("Calendar"), 'align="top" id="dateimg' . $i . '"', $GLOBALS['registry']->getImageDir('horde'));
}
}
}
}
$t->set('fields', array_values($fields));
$t->set('delete_img', $registry->getImageDir('horde') . '/delete.png');
-$t->set('remove', _('Remove Field From Search'));
+$t->set('remove', _("Remove Field From Search"));
if ($subscribe) {
$t->set('inverse_subscribe', ($shown == IMP_Search::SHOW_UNSUBSCRIBED) ? IMP_Search::SHOW_SUBSCRIBED_ONLY : IMP_Search::SHOW_UNSUBSCRIBED);
$t->set('mboxes', array_values($mboxes));
}
-$title = _('Message Search');
+$title = _("Message Search");
Horde::addScriptFile('prototype.js', 'horde', true);
Horde::addScriptFile('stripe.js', 'horde', true);
Horde::addScriptFile('search.js', 'imp', true);
function _importKeyDialog($target)
{
- $title = _('Import S/MIME Key');
+ $title = _("Import S/MIME Key");
require IMP_TEMPLATES . '/common-header.inc';
IMP::status();
return $key;
}
- $res = $GLOBALS['browser']->wasFileUploaded('upload_key', _('key'));
+ $res = $GLOBALS['browser']->wasFileUploaded('upload_key', _("key"));
if (!is_a($res, 'PEAR_Error')) {
return file_get_contents($_FILES['upload_key']['tmp_name']);
} else {
{
$key_info = $GLOBALS['imp_smime']->certToHTML($cert);
if (empty($key_info)) {
- _textWindowOutput('S/MIME Key Information', _('Invalid key'));
+ _textWindowOutput('S/MIME Key Information', _("Invalid key"));
} else {
_textWindowOutput('S/MIME Key Information', $key_info, true);
}
switch ($actionID) {
case 'delete_key':
$imp_smime->deletePersonalKeys();
- $notification->push(_('Personal S/MIME keys deleted successfully.'), 'horde.success');
+ $notification->push(_("Personal S/MIME keys deleted successfully."), 'horde.success');
break;
case 'delete_public_key':
try {
$imp_smime->deletePublicKey(Horde_Util::getFormData('email'));
- $notification->push(sprintf(_('S/MIME Public Key for "%s" was successfully deleted.'), Horde_Util::getFormData('email')), 'horde.success');
+ $notification->push(sprintf(_("S/MIME Public Key for \"%s\" was successfully deleted."), Horde_Util::getFormData('email')), 'horde.success');
} catch (Horde_Exception $e) {
$notification->push($e);
}
case 'process_import_public_key':
$publicKey = _getImportKey();
if (empty($publicKey)) {
- $notification->push(_('No S/MIME public key imported.'), 'horde.error');
+ $notification->push(_("No S/MIME public key imported."), 'horde.error');
$actionID = 'import_public_key';
_importKeyDialog('process_import_public_key');
} else {
/* Add the public key to the storage system. */
try {
$imp_smime->addPublicKey($publicKey);
- $notification->push(_('S/MIME Public Key successfully added.'), 'horde.success');
+ $notification->push(_("S/MIME Public Key successfully added."), 'horde.success');
_reloadWindow();
} catch (Horde_Exception $e) {
$notification->push($e, 'horde.error');
case 'process_import_personal_certs':
if (!($pkcs12 = _getImportKey())) {
- $notification->push(_('No personal S/MIME certificates imported.'), 'horde.error');
+ $notification->push(_("No personal S/MIME certificates imported."), 'horde.error');
$actionID = 'import_personal_certs';
_importKeyDialog('process_import_personal_certs');
} else {
try {
$imp_smime->addFromPKCS12($pkcs12, Horde_Util::getFormData('upload_key_pass'), Horde_Util::getFormData('upload_key_pk_pass'));
- $notification->push(_('S/MIME Public/Private Keypair successfully added.'), 'horde.success');
+ $notification->push(_("S/MIME Public/Private Keypair successfully added."), 'horde.success');
_reloadWindow();
} catch (Horde_Exception $e) {
- $notification->push(_('Personal S/MIME certificates NOT imported: ') . $e->getMessage(), 'horde.error');
+ $notification->push(_("Personal S/MIME certificates NOT imported: ") . $e->getMessage(), 'horde.error');
$actionID = 'import_personal_certs';
_importKeyDialog('process_import_personal_certs');
}
$imp_smime->addPublicKey($mime_part);
Horde_Util::closeWindowJS();
} catch (Horde_Exception $e) {
- $notification->push(_('No Certificate found'), 'horde.error');
+ $notification->push(_("No Certificate found"), 'horde.error');
}
exit;
case 'unset_passphrase':
if ($imp_smime->getPassphrase() !== false) {
$imp_smime->unsetPassphrase();
- $notification->push(_('Passphrase successfully unloaded.'), 'horde.success');
+ $notification->push(_("Passphrase successfully unloaded."), 'horde.success');
}
break;
case 'save_options':
$prefs->setValue('use_smime', Horde_Util::getFormData('use_smime') ? 1 : 0);
$prefs->setValue('smime_verify', Horde_Util::getFormData('smime_verify') ? 1 : 0);
- $notification->push(_('Preferences successfully updated.'), 'horde.success');
+ $notification->push(_("Preferences successfully updated."), 'horde.success');
break;
}
$plist[] = array(
'name' => $val['name'],
'email' => $val['email'],
- 'view' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_('View %s Public Key'), $val['name']), null, 'view_key'),
- 'info' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_('Information on %s Public Key'), $val['name']), null, 'info_key'),
- 'delete' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_('Delete %s Public Key'), $val['name']), null, null, 'if (confirm(\'' . addslashes(_('Are you sure you want to delete this public key?')) . '\')) { return true; } else { return false; }')
+ 'view' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'),
+ 'info' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'),
+ 'delete' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')) { return true; } else { return false; }")
);
}
$t->set('pubkey_list', $plist);
if (!$t->get('secure_check')) {
$t->set('has_key', $prefs->getValue('smime_public_key') && $prefs->getValue('smime_private_key'));
if ($t->get('has_key')) {
- $t->set('viewpublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _('View Personal Public Key'), null, 'view_key'));
- $t->set('infopublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _('Information on Personal Public Key'), null, 'info_key'));
+ $t->set('viewpublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _("View Personal Public Key"), null, 'view_key'));
+ $t->set('infopublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _("Information on Personal Public Key"), null, 'info_key'));
$passphrase = $imp_smime->getPassphrase();
- $t->set('passphrase', empty($passphrase) ? Horde::link('#', _('Enter Passphrase'), null, null, IMP::passphraseDialogJS('SMIMEPersonal') . ';return false;') . _('Enter Passphrase') : Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _('Unload Passphrase')) . _('Unload Passphrase'));
- $t->set('viewprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _('View Personal Private Key'), null, 'view_key'));
- $t->set('deletekeypair', addslashes(_('Are you sure you want to delete your keypair? (This is NOT recommended!)')));
+ $t->set('passphrase', empty($passphrase) ? Horde::link('#', _("Enter Passphrase"), null, null, IMP::passphraseDialogJS('SMIMEPersonal') . ';return false;') . _("Enter Passphrase") : Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _("Unload Passphrase")) . _("Unload Passphrase"));
+ $t->set('viewprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'));
+ $t->set('deletekeypair', addslashes(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")));
$t->set('personalkey-delete-help', Horde_Help::link('imp', 'smime-delete-personal-certs'));
} else {
$t->set('personal_import_url', Horde_Util::addParameter($selfURL, 'actionID', 'import_personal_certs'));
} else {
$t->set('use_smime_locked', $prefs->isLocked('use_smime'));
if (!$t->get('use_smime_locked')) {
- $t->set('use_smime_label', Horde::label('use_smime', _('Enable S/MIME functionality?')));
+ $t->set('use_smime_label', Horde::label('use_smime', _("Enable S/MIME functionality?")));
}
}
$t->set('prefsurl', IMP::prefsURL(true));
} elseif (Horde_Util::getFormData('delete')) {
/* Delete stationery. */
if (isset($stationery_list[$selected])) {
- $updated = sprintf(_('The stationery "%s" has been deleted.'), $stationery_list[$selected]['n']);
+ $updated = sprintf(_("The stationery \"%s\" has been deleted."), $stationery_list[$selected]['n']);
unset($stationery_list[$selected]);
$selected = null;
}
if (!strlen($selected)) {
$selected = count($stationery_list);
$stationery_list[] = $stationery;
- $updated = sprintf(_('The stationery "%s" has been added.'), $stationery['n']);
+ $updated = sprintf(_("The stationery \"%s\" has been added."), $stationery['n']);
} else {
$stationery_list[$selected] = $stationery;
- $updated = sprintf(_('The stationery "%s" has been updated.'), $stationery['n']);
+ $updated = sprintf(_("The stationery \"%s\" has been updated."), $stationery['n']);
}
}
break;
$slist[] = array(
'val' => $key,
'selected' => ($selected === $key),
- 'text' => $choice['n'] . ' ' . ($choice['t'] == 'html' ? _('(HTML)') : _('(Plain Text)'))
+ 'text' => $choice['n'] . ' ' . ($choice['t'] == 'html' ? _("(HTML)") : _("(Plain Text)"))
);
}
$t->set('slist', $slist);
$t->set('selected', strlen($selected));
$t->set('last_type', $stationery['t']);
-$t->set('name_label', Horde::label('name', _('Stationery name:')));
+$t->set('name_label', Horde::label('name', _("Stationery name:")));
$t->set('name', $stationery['n']);
-$t->set('type_label', Horde::label('name', _('Stationery type:')));
+$t->set('type_label', Horde::label('name', _("Stationery type:")));
$t->set('plain', $stationery['t'] == 'plain');
$t->set('html', $stationery['t'] == 'html');
-$t->set('content_label', Horde::label('content', _('Stationery:')));
+$t->set('content_label', Horde::label('content', _("Stationery:")));
$t->set('content', $stationery['c']);
$t->set('button_href', Horde_Util::addParameter($compose_url, 'group', 'compose'));
-$t->set('button_val', htmlspecialchars(_('Return to Message Composition'), ENT_COMPAT, Horde_Nls::getCharset()));
+$t->set('button_val', htmlspecialchars(_("Return to Message Composition"), ENT_COMPAT, Horde_Nls::getCharset()));
echo $t->fetch(IMP_TEMPLATES . '/stationery/stationery.html');
if (!$chunk) {
$page_title = $GLOBALS['registry']->get('name');
if (!empty($title)) $page_title .= ' :: ' . $title;
if (!empty($refresh_time) && !empty($refresh_url)) {
- echo '<meta http-equiv="refresh" content="' . $refresh_time . ';url=' . $refresh_url . "\" />\n";
+ echo "<meta http-equiv=\"refresh\" content=\"$refresh_time;url=$refresh_url\" />\n";
}
echo Horde_Util::bufferOutput('require', IMP_TEMPLATES . '/javascript_defs.php');
IMP::includeScriptFiles();
/* Gettext strings used in core javascript files. */
'text' => array(
/* Strings used in compose.js */
- 'compose_cancel' => _('Cancelling this message will permanently discard its contents.') . "\n" . _('Are you sure you want to do this?'),
- 'compose_discard' => _('Doing so will discard this message permanently.'),
- 'compose_recipient' => _('You must specify a recipient.'),
- 'compose_sigreplace' => _('The signature was successfully replaced.'),
- 'compose_signotreplace' => _('The signature could not be replaced.'),
- 'compose_nosubject' => _('The message does not have a Subject entered.') . "\n" . _('Send message without a Subject?'),
- 'compose_file' => _('File'),
- 'compose_attachment' => _('Attachment'),
- 'compose_inline' => _('Inline'),
+ 'compose_cancel' => _("Cancelling this message will permanently discard its contents.") . "\n" . _("Are you sure you want to do this?"),
+ 'compose_discard' => _("Doing so will discard this message permanently."),
+ 'compose_recipient' => _("You must specify a recipient."),
+ 'compose_sigreplace' => _("The signature was successfully replaced."),
+ 'compose_signotreplace' => _("The signature could not be replaced."),
+ 'compose_nosubject' => _("The message does not have a Subject entered.") . "\n" . _("Send message without a Subject?"),
+ 'compose_file' => _("File"),
+ 'compose_attachment' => _("Attachment"),
+ 'compose_inline' => _("Inline"),
/* Strings used in mailbox.js */
- 'mailbox_submit' => _('You must select at least one message first.'),
- 'mailbox_delete' => _('Are you sure you wish to PERMANENTLY delete these messages?'),
- 'mailbox_selectone' => _('You must select at least one message first.'),
- 'yes' => _('Yes'),
- 'no' => _('No'),
+ 'mailbox_submit' => _("You must select at least one message first."),
+ 'mailbox_delete' => _("Are you sure you wish to PERMANENTLY delete these messages?"),
+ 'mailbox_selectone' => _("You must select at least one message first."),
+ 'yes' => _("Yes"),
+ 'no' => _("No"),
/* Strings used in contacts.js */
- 'contacts_select' => _('You must select an address first.'),
- 'contacts_closed' => _('The message being composed has been closed. Exiting.'),
- 'contacts_called' => _('This window must be called from a compose window.'),
+ 'contacts_select' => _("You must select an address first."),
+ 'contacts_closed' => _("The message being composed has been closed. Exiting."),
+ 'contacts_called' => _("This window must be called from a compose window."),
/* Strings used in folders.js */
- 'folders_select' => _('Please select a folder before you perform this action.'),
- 'folders_oneselect' => _('Only one folder should be selected for this action.'),
- 'folders_subfolder1' => _('You are creating a sub-folder to'),
- 'folders_subfolder2' => _('Please enter the name of the new folder:'),
- 'folders_toplevel' => _('You are creating a top-level folder.') . "\n" . _('Please enter the name of the new folder:'),
- 'folders_download1' => _('All messages in the following folder(s) will be downloaded into one MBOX file:'),
- 'folders_download2' => _('This may take some time. Are you sure you want to continue?'),
- 'folders_rename1' => _('You are renaming the folder:'),
- 'folders_rename2' => _('Please enter the new name:'),
- 'folders_no_rename' => _('This folder may not be renamed:'),
+ 'folders_select' => _("Please select a folder before you perform this action."),
+ 'folders_oneselect' => _("Only one folder should be selected for this action."),
+ 'folders_subfolder1' => _("You are creating a sub-folder to"),
+ 'folders_subfolder2' => _("Please enter the name of the new folder:"),
+ 'folders_toplevel' => _("You are creating a top-level folder.") . "\n" . _("Please enter the name of the new folder:"),
+ 'folders_download1' => _("All messages in the following folder(s) will be downloaded into one MBOX file:"),
+ 'folders_download2' => _("This may take some time. Are you sure you want to continue?"),
+ 'folders_rename1' => _("You are renaming the folder:"),
+ 'folders_rename2' => _("Please enter the new name:"),
+ 'folders_no_rename' => _("This folder may not be renamed:"),
/* Strings used in search.js */
- 'search_select' => _('Please select at least one folder to search.'),
+ 'search_select' => _("Please select at least one folder to search."),
/* Strings used in imp.js */
- 'popup_block' => _('A popup window could not be opened. Perhaps you have set your browser to block popup windows?'),
+ 'popup_block' => _("A popup window could not be opened. Perhaps you have set your browser to block popup windows?"),
/* Strings used in login.js */
- 'login_username' => _('Please provide your username.'),
- 'login_password' => _('Please provide your password.'),
+ 'login_username' => _("Please provide your username."),
+ 'login_password' => _("Please provide your password."),
/* Strings used in multiple pages. */
- 'spam_report' => _('Are you sure you wish to report this message as spam?'),
- 'notspam_report' => _('Are you sure you wish to report this message as innocent?'),
- 'newfolder' => _('You are copying/moving to a new folder.') . "\n" . _('Please enter a name for the new folder:') . "\n",
- 'target_mbox' => _('You must select a target mailbox first.'),
+ 'spam_report' => _("Are you sure you wish to report this message as spam?"),
+ 'notspam_report' => _("Are you sure you wish to report this message as innocent?"),
+ 'newfolder' => _("You are copying/moving to a new folder.") . "\n" . _("Please enter a name for the new folder:") . "\n",
+ 'target_mbox' => _("You must select a target mailbox first."),
)
);
/* Gettext strings used in core javascript files. */
$code['text'] = array(
- 'ajax_recover' => _('The connection to the server has been restored.'),
- 'ajax_timeout' => _('There has been no contact with the server for several minutes. The server may be temporarily unavailable or network problems may be interrupting your session. You will not see any updates until the connection is restored.'),
- 'badaddr' => _('Invalid Address'),
- 'badsubject' => _('Invalid Subject'),
- 'baselevel' => _('base level of the folder tree'),
- 'cancel' => _('Cancel'),
- 'check' => _('Checking...'),
- 'copyto' => _('Copy %s to %s'),
- 'create_prompt' => _('Create folder:'),
- 'createsub_prompt' => _('Create subfolder:'),
- 'delete_folder' => _('Permanently delete %s?'),
- 'empty_folder' => _('Permanently delete all messages in %s?'),
- 'getmail' => Horde::highlightAccessKey(addslashes(_('_Get Mail')), Horde::getAccessKey(_('_Get Mail'), true)),
- 'hide_preview' => _('Hide Preview'),
- 'hidealog' => _('Hide Alerts Log'),
- 'listmsg_wait' => _('The server is still generating the message list.'),
- 'listmsg_timeout' => _('The server was unable to generate the message list.'),
- 'loading' => _('Loading...'),
- 'message' => _('Message'),
- 'messages' => _('Messages'),
- 'moveto' => _('Move %s to %s'),
- 'noalerts' => _('No Alerts'),
- 'nomessages' => _('No Messages'),
- 'of' => _('of'),
- 'ok' => _('Ok'),
- 'onlogout' => _('Logging Out...'),
- 'popup_block' => _('A popup window could not be opened. Your browser may be blocking popups.'),
- 'portal' => _('Portal'),
- 'prefs' => _('User Options'),
- 'rename_prompt' => _('Rename folder to:'),
- 'search' => _('Search'),
- 'show_preview' => _('Show Preview'),
- 'showalog' => Horde::highlightAccessKey(addslashes(_('_Alerts Log')), Horde::getAccessKey(_('_Alerts Log'), true)),
- 'verify' => _('Verifying...'),
- 'vp_empty' => _('There are no messages in this mailbox.'),
+ 'ajax_recover' => _("The connection to the server has been restored."),
+ 'ajax_timeout' => _("There has been no contact with the server for several minutes. The server may be temporarily unavailable or network problems may be interrupting your session. You will not see any updates until the connection is restored."),
+ 'badaddr' => _("Invalid Address"),
+ 'badsubject' => _("Invalid Subject"),
+ 'baselevel' => _("base level of the folder tree"),
+ 'cancel' => _("Cancel"),
+ 'check' => _("Checking..."),
+ 'copyto' => _("Copy %s to %s"),
+ 'create_prompt' => _("Create folder:"),
+ 'createsub_prompt' => _("Create subfolder:"),
+ 'delete_folder' => _("Permanently delete %s?"),
+ 'empty_folder' => _("Permanently delete all messages in %s?"),
+ 'getmail' => Horde::highlightAccessKey(addslashes(_("_Get Mail")), Horde::getAccessKey(_("_Get Mail"), true)),
+ 'hide_preview' => _("Hide Preview"),
+ 'hidealog' => _("Hide Alerts Log"),
+ 'listmsg_wait' => _("The server is still generating the message list."),
+ 'listmsg_timeout' => _("The server was unable to generate the message list."),
+ 'loading' => _("Loading..."),
+ 'message' => _("Message"),
+ 'messages' => _("Messages"),
+ 'moveto' => _("Move %s to %s"),
+ 'noalerts' => _("No Alerts"),
+ 'nomessages' => _("No Messages"),
+ 'of' => _("of"),
+ 'ok' => _("Ok"),
+ 'onlogout' => _("Logging Out..."),
+ 'popup_block' => _("A popup window could not be opened. Your browser may be blocking popups."),
+ 'portal' => ("Portal"),
+ 'prefs' => _("User Options"),
+ 'rename_prompt' => _("Rename folder to:"),
+ 'search' => _("Search"),
+ 'show_preview' => _("Show Preview"),
+ 'showalog' => Horde::highlightAccessKey(addslashes(_("_Alerts Log")), Horde::getAccessKey(_("_Alerts Log"), true)),
+ 'verify' => _("Verifying..."),
+ 'vp_empty' => _("There are no messages in this mailbox."),
);
if ($compose_mode) {
/* Gettext strings used in compose page. */
$code['text_compose'] = array(
- 'atc_limit' => _('The attachment limit has been reached.'),
+ 'atc_limit' => _("The attachment limit has been reached."),
'cancel' => _("Cancelling this message will permanently discard its contents and will delete auto-saved drafts.\nAre you sure you want to do this?"),
- 'fillform' => _('You have already changed the message body, are you sure you want to drop the changes?'),
- 'nosubject' => _('The message does not have a Subject entered.') . "\n" . _('Send message without a Subject?'),
- 'remove' => _('Remove'),
- 'saving' => _('Saving...'),
- 'sending' => _('Sending...'),
- 'toggle_html' => _('Really discard all formatting information? This operation cannot be undone.'),
- 'uploading' => _('Uploading...'),
+ 'fillform' => _("You have already changed the message body, are you sure you want to drop the changes?"),
+ 'nosubject' => _("The message does not have a Subject entered.") . "\n" . _("Send message without a Subject?"),
+ 'remove' => _("Remove"),
+ 'saving' => _("Saving..."),
+ 'sending' => _("Sending..."),
+ 'toggle_html' => _("Really discard all formatting information? This operation cannot be undone."),
+ 'uploading' => _("Uploading..."),
);
}
$imp_notify->setMobileObject($c);
-$c->add(new Horde_Mobile_text(sprintf(_("Welcome to %s"), ($imp_auth) ? $registry->get('name', 'horde') : $registry->get('name'))));
+$c->add(new Horde_Mobile_text(sprintf(_("Welcome to %s"), ($imp_auth) ? $registry->get('name',' horde') : $registry->get('name'))));
$f = &$c->add(new Horde_Mobile_form(Horde::applicationUrl('redirect.php', false, -1)));
$f->add(new Horde_Mobile_input('imapuser', htmlspecialchars(Horde_Util::getFormData('imapuser')), _("Username: ")));
try {
$namespaces = $imap_client->getNamespaces();
foreach ($namespaces as $val) {
- echo 'NAMESPACE: "' . htmlspecialchars($val['name']) . "\"\n";
- echo 'DELIMITER: ' . htmlspecialchars($val['delimiter']) . "\n";
- echo 'TYPE: ' . htmlspecialchars($val['type']) . "\n\n";
+ echo "NAMESPACE: \"" . htmlspecialchars($val['name']) . "\"\n";
+ echo "DELIMITER: " . htmlspecialchars($val['delimiter']) . "\n";
+ echo "TYPE: " . htmlspecialchars($val['type']) . "\n\n";
}
} catch (Horde_Imap_Client_Exception $e) {
_errorMsg($e);
}
echo "</pre></blockquote></blockquote>\n" .
- '<blockquote><em>IMAP server capabilities:</em><blockquote><pre>';
+ "<blockquote><em>IMAP server capabilities:</em><blockquote><pre>";
try {
foreach ($imap_client->capability() as $key => $val) {
try {
$id_info = $imap_client->getID();
if (!empty($id_info)) {
- echo '<blockquote><em>IMAP server information:</em><blockquote><pre>';
+ echo "<blockquote><em>IMAP server information:</em><blockquote><pre>";
foreach ($id_info as $key => $val) {
- echo htmlspecialchars($key: . ' ' . $val) . "\n";
+ echo htmlspecialchars("$key: $val") . "\n";
}
echo "</pre></blockquote></blockquote>\n";
}
function _errorMsg($e)
{
- echo "<span style=\"color:red\">ERROR</span> - The server returned the following error message:\n" .
+ echo '<span style="color:red">ERROR</span> - The server returned the following error message:' . "\n" .
'<pre>' . $e->getMessage() . '</pre><p />';
}
case 'add_address':
try {
$contact_link = IMP::addAddress(Horde_Util::getFormData('address'), Horde_Util::getFormData('name'));
- $notification->push(sprintf(_('Entry "%s" was successfully added to the address book'), $contact_link), 'horde.success', array('content.raw'));
+ $notification->push(sprintf(_("Entry \"%s\" was successfully added to the address book"), $contact_link), 'horde.success', array('content.raw'));
} catch (Horde_Exception $e) {
$notification->push($e);
}
$ret = reset($ret);
$curr_msg['body'] = $ret['data'];
} else {
- $curr_msg['body'] = '<em>' . _('There is no text that can be displayed inline.') . '</em>';
+ $curr_msg['body'] = '<em>' . _("There is no text that can be displayed inline.") . '</em>';
}
$curr_msg['idx'] = $idx;
if (IMP::isSpecialFolder($mbox)) {
$curr_msg['addr_to'] = true;
- $curr_msg['addr'] = _('To:') . ' ' . $imp_ui->buildAddressLinks($envelope['to'], Horde::selfUrl(true), true);
- $addr = _('To:') . ' ' . htmlspecialchars(Horde_Mime_Address::addrObject2String(reset($envelope['to'])), ENT_COMPAT, $charset);
+ $curr_msg['addr'] = _("To:") . ' ' . $imp_ui->buildAddressLinks($envelope['to'], Horde::selfUrl(true), true);
+ $addr = _("To:") . ' ' . htmlspecialchars(Horde_Mime_Address::addrObject2String(reset($envelope['to'])), ENT_COMPAT, $charset);
} else {
$curr_msg['addr_to'] = false;
$curr_msg['addr'] = $imp_ui->buildAddressLinks($envelope['from'], Horde::selfUrl(true), true);
/* Create links to current message and mailbox. */
if ($mode == 'thread') {
- $curr_msg['link'] = Horde::widget('#display', _('Back to Thread Display'), 'widget', '', '', _('Back to Thread Display'), true);
+ $curr_msg['link'] = Horde::widget('#display', _("Back to Thread Display"), 'widget', '', '', _("Back to Thread Display"), true);
} else {
- $curr_msg['link'] = Horde::widget('#display', _('Back to Multiple Message View Index'), 'widget', '', '', _('Back to Multiple Message View Index'), true);
+ $curr_msg['link'] = Horde::widget('#display', _("Back to Multiple Message View Index"), 'widget', '', '', _("Back to Multiple Message View Index"), true);
}
- $curr_msg['link'] .= ' | ' . Horde::widget(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox'], $idx, $mbox), _('Go to Message'), 'widget', '', '', _('Go to Message'), true);
- $curr_msg['link'] .= ' | ' . Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('mailbox.php', $mbox), array('start' => $imp_mailbox->getArrayIndex($idx))), sprintf(_('Back to %s'), $page_label), 'widget', '', '', sprintf(_('Bac_k to %s'), $page_label));
+ $curr_msg['link'] .= ' | ' . Horde::widget(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox'], $idx, $mbox), _("Go to Message"), 'widget', '', '', _("Go to Message"), true);
+ $curr_msg['link'] .= ' | ' . Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('mailbox.php', $mbox), array('start' => $imp_mailbox->getArrayIndex($idx))), sprintf(_("Back to %s"), $page_label), 'widget', '', '', sprintf(_("Bac_k to %s"), $page_label));
$curr_tree['class'] = (++$rowct % 2) ? 'text' : 'item0';
$curr_tree['subject'] = (($mode == 'thread') ? $threadtree[$idx] : null) . ' ' . Horde::link('#i' . $idx) . $subject_header . '</a> (' . $addr . ')';
$template->setOption('gettext', true);
$template->set(
'subject',
- $mode == 'thread' ? $subject : sprintf(_('%d Messages'), count($msgs)));
+ $mode == 'thread' ? $subject : sprintf(_("%d Messages"), count($msgs)));
if ($mode == 'thread') {
$delete_link = Horde_Util::addParameter(
IMP::generateIMPUrl('mailbox.php', $mbox),
$delete_link,
array('indices[]' => $val . IMP::IDX_SEP . $imp_mbox['mailbox']));
}
- $template->set('delete', Horde::link('#', _('Delete Thread'), null, null, 'if (confirm("' . addslashes(_('Are you sure you want to delete all messages in this thread?')) . '")) { window.location = "' . $delete_link . '"; } return false;') . Horde::img('delete.png', _('Delete Thread'), null, $registry->getImageDir('horde')) . '</a>');
+ $template->set('delete', Horde::link('#', _("Delete Thread"), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete all messages in this thread?")) . "')) { window.location = '" . $delete_link . "'; } return false;") . Horde::img('delete.png', _("Delete Thread"), null, $registry->getImageDir('horde')) . '</a>');
}
$template->set('thread', $mode == 'thread');
$template->set('messages', $msgs);
$template->set('tree', $tree);
/* Output page. */
-$title = ($mode == 'thread') ? _('Thread View') : _('Multiple Message View');
+$title = ($mode == 'thread') ? _("Thread View") : _("Multiple Message View");
require IMP_TEMPLATES . '/common-header.inc';
IMP::menu();
IMP::status();
$headers = $contents->getHeaderOb();
$zipfile = _sanitizeName($headers->getValue('subject'));
if (empty($zipfile)) {
- $zipfile = _('attachments.zip');
+ $zipfile = _("attachments.zip");
} else {
$zipfile .= '.zip';
}
$mime = $contents->getMIMEPart($val);
$name = $mime->getName(true);
if (!$name) {
- $name = sprintf(_('part %s'), $val);
+ $name = sprintf(_("part %s"), $val);
}
$tosave[] = array('data' => $mime->getContents(array('stream' => true)), 'name' => $name);
}
case 'download_attach':
$mime = $contents->getMIMEPart($id);
if (!$name = $mime->getName(true)) {
- $name = _('unnamed');
+ $name = _("unnamed");
}
/* Compress output? */
$body = $render[$key]['data'];
$type = $render[$key]['type'];
if (!$name = $render[$key]['name']) {
- $name = _('unnamed');
+ $name = _("unnamed");
}
break;
}