Revert "Fix issues found during lint check"
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 19 Jul 2009 01:46:44 +0000 (19:46 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sun, 19 Jul 2009 01:46:44 +0000 (19:46 -0600)
This reverts commit ac7af75129d89f7c3857619be921169bbff6884d.

Turns out we need double quotes for gettext strings.

99 files changed:
imp/acl.php
imp/ajax.php
imp/attachment.php
imp/compose-dimp.php
imp/compose-mimp.php
imp/compose.php
imp/config/hooks.php.dist
imp/config/motd.php.dist
imp/config/portal.php.dist
imp/config/prefs.php.dist
imp/config/servers.php.dist
imp/contacts.php
imp/fetchmailprefs.php
imp/filterprefs.php
imp/folders-mimp.php
imp/folders.php
imp/lib/Auth.php
imp/lib/Block/Foldersummary.php
imp/lib/Block/Newmail.php
imp/lib/Block/summary.php
imp/lib/Block/tree_folders.php
imp/lib/Compose.php
imp/lib/Contents.php
imp/lib/Crypt/Pgp.php
imp/lib/Crypt/Smime.php
imp/lib/DIMP.php
imp/lib/Fetchmail.php
imp/lib/Fetchmail/imap.php
imp/lib/Filter.php
imp/lib/Folder.php
imp/lib/IMP.php
imp/lib/Identity/imp.php
imp/lib/Imap.php
imp/lib/Imap/Acl.php
imp/lib/Imap/Flags.php
imp/lib/Imap/Tree.php
imp/lib/LoginTasks/Task/DeleteAttachmentsMonthly.php
imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php
imp/lib/LoginTasks/Task/PurgeSentmail.php
imp/lib/LoginTasks/Task/PurgeSpam.php
imp/lib/LoginTasks/Task/PurgeTrash.php
imp/lib/LoginTasks/Task/RenameSentmailMonthly.php
imp/lib/MIMP.php
imp/lib/Mailbox.php
imp/lib/Maillog.php
imp/lib/Message.php
imp/lib/Mime/Viewer/Alternative.php
imp/lib/Mime/Viewer/Appledouble.php
imp/lib/Mime/Viewer/Html.php
imp/lib/Mime/Viewer/Images.php
imp/lib/Mime/Viewer/Itip.php
imp/lib/Mime/Viewer/Mdn.php
imp/lib/Mime/Viewer/Partial.php
imp/lib/Mime/Viewer/Pdf.php
imp/lib/Mime/Viewer/Pgp.php
imp/lib/Mime/Viewer/Plain.php
imp/lib/Mime/Viewer/Smil.php
imp/lib/Mime/Viewer/Smime.php
imp/lib/Mime/Viewer/Status.php
imp/lib/Mime/Viewer/Tnef.php
imp/lib/Mime/Viewer/Zip.php
imp/lib/Notification/Listener/Status.php
imp/lib/Quota.php
imp/lib/Quota/Command.php
imp/lib/Quota/Hook.php
imp/lib/Quota/Imap.php
imp/lib/Quota/Logfile.php
imp/lib/Quota/Maildir.php
imp/lib/Quota/Mdaemon.php
imp/lib/Quota/Mercury32.php
imp/lib/Quota/Sql.php
imp/lib/Search.php
imp/lib/Sentmail.php
imp/lib/Spam.php
imp/lib/UI/Compose.php
imp/lib/UI/Mailbox.php
imp/lib/UI/Message.php
imp/lib/Views/ListMessages.php
imp/lib/Views/ShowMessage.php
imp/lib/api.php
imp/lib/prefs.php
imp/login.php
imp/mailbox-mimp.php
imp/mailbox.php
imp/message-mimp.php
imp/message.php
imp/pgp.php
imp/rss.php
imp/saveimage.php
imp/search.php
imp/smime.php
imp/stationery.php
imp/templates/common-header.inc
imp/templates/javascript_defs.php
imp/templates/javascript_defs_dimp.php
imp/templates/login/mobile.inc
imp/test.php
imp/thread.php
imp/view.php

index 7ec39b8..0682a88 100644 (file)
@@ -17,7 +17,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 /* 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;
 }
@@ -25,7 +25,7 @@ if ($prefs->isLocked('acl') || empty($_SESSION['imp']['acl'])) {
 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;
 }
@@ -49,7 +49,7 @@ $ok_form = true;
 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;
     }
 
@@ -60,9 +60,9 @@ case 'imp_acl_set':
         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);
@@ -83,13 +83,13 @@ case 'imp_acl_set':
             }
 
             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;
             }
@@ -103,9 +103,9 @@ case 'imp_acl_set':
             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);
@@ -139,10 +139,10 @@ $t->setOption('gettext', true);
 $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);
@@ -179,7 +179,7 @@ if (empty($_SESSION['imp']['admin'])) {
         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>";
index 5f4a968..12d6a0a 100644 (file)
@@ -94,7 +94,7 @@ function _getListMessages($mbox, $change)
     }
 
     $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.
@@ -434,7 +434,7 @@ case 'AddContact':
     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;
@@ -481,7 +481,7 @@ case 'ShowPreview':
     );
 
     $show_msg = new IMP_Views_ShowMessage();
-    $result = (object)$show_msg->showMessage($args);
+    $result = (object) $show_msg->showMessage($args);
     break;
 
 case 'Html2Text':
@@ -549,7 +549,7 @@ case 'DeleteAttach':
     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;
@@ -634,9 +634,9 @@ case 'PurgeDeleted':
         $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
@@ -656,7 +656,7 @@ case 'ModifyPollFolder':
     $imptree = IMP_Imap_Tree::singleton();
 
     $result = new stdClass;
-    $result->add = (bool)$add;
+    $result->add = (bool) $add;
     $result->folder = $mbox;
 
     if ($add) {
@@ -664,10 +664,10 @@ case 'ModifyPollFolder':
         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;
 
@@ -687,7 +687,7 @@ case 'SendMDN':
     }
 
     $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':
@@ -706,10 +706,10 @@ case 'SMIMEPersonal':
                 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();
@@ -722,10 +722,10 @@ case 'SMIMEPersonal':
                 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();
@@ -741,7 +741,7 @@ case 'SMIMEPersonal':
 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;
index edf3d0d..f09ab74 100644 (file)
@@ -25,7 +25,7 @@ $self_url = Horde::selfUrl(false, true, true);
 
 // 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.
@@ -33,13 +33,13 @@ $mail_user = Horde_Util::getFormData('u');
 $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.
@@ -48,7 +48,7 @@ $time_stamp = basename($time_stamp);
 $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.
@@ -61,13 +61,13 @@ if ($conf['compose']['link_attachments_notify']) {
         } 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 {
@@ -94,7 +94,7 @@ if ($conf['compose']['link_attachments_notify']) {
                 $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');
@@ -111,7 +111,7 @@ if ($conf['compose']['link_attachments_notify']) {
 $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) {
index 7803f0c..b515ba1 100644 (file)
@@ -104,7 +104,7 @@ if (count($_POST)) {
             _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);
             }
@@ -175,7 +175,7 @@ if (count($_POST)) {
         }
 
         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. */
@@ -205,7 +205,7 @@ $type = Horde_Util::getFormData('type');
 $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) {
@@ -215,7 +215,7 @@ if (in_array($type, array('reply', 'reply_all', 'reply_list', 'forward', 'resume
     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';
     }
@@ -231,11 +231,11 @@ case 'reply_list':
     $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'];
 
@@ -335,7 +335,7 @@ $scripts = array(
     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();
index 1900571..4e6858d 100644 (file)
@@ -21,7 +21,7 @@ function _getIMPContents($index, $mailbox)
         $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;
     }
 }
@@ -85,7 +85,7 @@ case 'd':
     }
     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);
@@ -115,7 +115,7 @@ case 'rl':
     $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
@@ -126,10 +126,10 @@ case 'f':
     $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;
     }
@@ -141,7 +141,7 @@ case _('Redirect'):
     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;
@@ -151,7 +151,7 @@ case _('Redirect'):
     }
     break;
 
-case _('Send'):
+case _("Send"):
     if ($compose_disable) {
         break;
     }
@@ -224,7 +224,7 @@ case _('Send'):
                 $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;
         }
@@ -237,7 +237,7 @@ case _('Send'):
 /* Get the message cache ID. */
 $cacheID = $imp_compose->getCacheId();
 
-$title = _('Message Composition');
+$title = _("Message Composition");
 $mimp_render->set('title', $title);
 
 $select_list = $identity->getSelectList();
@@ -252,7 +252,7 @@ foreach (array('to', 'cc', 'bcc', 'subject') as $val) {
     }
 }
 
-$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');
 
index 8238421..690f9cd 100644 (file)
@@ -30,8 +30,8 @@ function _mailboxReturnURL($encode, $url = null)
 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());
@@ -50,7 +50,7 @@ function _getIMPContents($index, $mailbox)
         $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;
     }
 }
@@ -128,7 +128,7 @@ if ($token = Horde_Util::getFormData('compose_formToken')) {
         $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;
     }
 }
@@ -152,11 +152,11 @@ if ($readonly_sentmail) {
 
 /* 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);
 }
@@ -231,7 +231,7 @@ if ($_SESSION['imp']['file_upload']) {
         $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');
             }
         }
     }
@@ -243,7 +243,7 @@ if ($_SESSION['imp']['file_upload']) {
 }
 
 /* Run through the action handlers. */
-$title = _('New Message');
+$title = _("New Message");
 switch ($actionID) {
 case 'mailto':
     if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
@@ -321,11 +321,11 @@ case 'reply_list':
     }
 
     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'];
 
@@ -347,7 +347,7 @@ case 'forward':
     break;
 
 case 'redirect_compose':
-    $title = _('Redirect this message');
+    $title = _("Redirect this message");
     break;
 
 case 'redirect_send':
@@ -362,14 +362,14 @@ 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));
         }
@@ -446,18 +446,18 @@ case 'send_message':
 
     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 {
@@ -465,7 +465,7 @@ case 'send_message':
         }
     } 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));
     }
@@ -520,7 +520,9 @@ case 'fwd_digest':
     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;
         }
     }
@@ -740,7 +742,7 @@ if ($prefs->getValue('use_pgp') && !$prefs->isLocked('default_encrypt')) {
             }
         } 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;
         }
     }
@@ -820,13 +822,13 @@ if ($redirect) {
 
     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'])) {
@@ -840,7 +842,7 @@ if ($redirect) {
                 $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 {
@@ -907,9 +909,9 @@ if ($redirect) {
 
     $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'));
@@ -926,7 +928,7 @@ if ($redirect) {
         }
     } 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);
@@ -942,14 +944,14 @@ if ($redirect) {
             $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();
@@ -971,7 +973,7 @@ if ($redirect) {
                     $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;
@@ -1000,7 +1002,7 @@ if ($redirect) {
     }
     $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'));
@@ -1008,7 +1010,7 @@ if ($redirect) {
     $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) {
@@ -1018,16 +1020,16 @@ if ($redirect) {
         $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) {
@@ -1039,7 +1041,7 @@ if ($redirect) {
 
     $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));
@@ -1054,16 +1056,15 @@ if ($redirect) {
         $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) {
@@ -1076,7 +1077,7 @@ if ($redirect) {
         $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);
@@ -1085,10 +1086,10 @@ if ($redirect) {
     $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;
         }
@@ -1113,18 +1114,18 @@ if ($redirect) {
     $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));
 
@@ -1133,25 +1134,25 @@ if ($redirect) {
         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);
         }
@@ -1174,11 +1175,11 @@ if ($redirect) {
             $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);
         }
@@ -1201,7 +1202,7 @@ if ($redirect) {
 
                 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;
@@ -1210,7 +1211,7 @@ if ($redirect) {
             $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'));
         }
index 1b5d014..cff3309 100644 (file)
 // 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")
 //                 );
 //             }
 //         }
@@ -429,7 +429,7 @@ if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
                     $icons[$name] = array(
                         'icon' => 'kronolith.png',
                         'icondir' => $GLOBALS['registry']->getImageDir('kronolith'),
-                        'alt' => _('Calendar')
+                        'alt' => _("Calendar")
                     );
                     break;
 
@@ -437,7 +437,7 @@ if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
                     $icons[$name] = array(
                         'icon' => 'nag.png',
                         'icondir' => $GLOBALS['registry']->getImageDir('nag'),
-                        'alt' => _('Tasks')
+                        'alt' => _("Tasks")
                     );
                     break;
 
@@ -445,7 +445,7 @@ if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
                     $icons[$name] = array(
                         'icon' => 'mnemo.png',
                         'icondir' => $GLOBALS['registry']->getImageDir('mnemo'),
-                        'alt' => _('Notes')
+                        'alt' => _("Notes")
                     );
                     break;
 
@@ -453,7 +453,7 @@ if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
                     $icons[$name] = array(
                         'icon' => 'turba.png',
                         'icondir' => $GLOBALS['registry']->getImageDir('turba'),
-                        'alt' => _('Contacts')
+                        'alt' => _("Contacts")
                     );
                     break;
 
@@ -461,7 +461,7 @@ if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
                     $icons[$name] = array(
                         'icon' => 'prefs.png',
                         'icondir' => $GLOBALS['registry']->getImageDir('horde'),
-                        'alt' => _('Preferences')
+                        'alt' => _("Preferences")
                     );
                     break;
                 }
@@ -498,11 +498,11 @@ if (!function_exists('_imp_hook_quota')) {
 
         $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);
index 86cc6b9..12338db 100644 (file)
@@ -40,4 +40,4 @@
 
 ?>
 <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>
index f25eab4..fc35863 100644 (file)
@@ -22,7 +22,7 @@ $collection = new Horde_Block_Collection();
 $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())
 );
 
index 7b69a35..ad1c190 100644 (file)
@@ -9,9 +9,9 @@
 $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')
@@ -19,9 +19,9 @@ $prefGroups['identities'] = array(
 
 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')
         );
@@ -29,17 +29,17 @@ if (!$is_pop3) {
 
 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')
 );
@@ -55,9 +55,9 @@ if (!$is_pop3) {
 }
 
 $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',
@@ -71,25 +71,25 @@ if (!empty($GLOBALS['conf']['compose']['allow_receipts'])) {
 }
 
 $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',
@@ -101,9 +101,9 @@ if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) {
 }
 
 $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')
 );
@@ -114,41 +114,41 @@ if (!$is_pop3) {
 }
 
 $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')
 );
@@ -159,55 +159,55 @@ if (!$is_pop3) {
 }
 
 $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')
 );
 
@@ -220,7 +220,7 @@ $_prefs['replyto_addr'] = array(
     '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(
@@ -228,7 +228,7 @@ $_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(
@@ -236,7 +236,7 @@ $_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(
@@ -244,7 +244,7 @@ $_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(
@@ -252,7 +252,7 @@ $_prefs['signature'] = array(
     'locked' => false,
     'shared' => false,
     'type' => 'textarea',
-    'desc' => _('Your signature:'));
+    'desc' => _("Your signature:"));
 
 // precede the signature with dashes ('-- ')?
 $_prefs['sig_dashes'] = array(
@@ -260,7 +260,7 @@ $_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(
@@ -268,7 +268,7 @@ $_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(
@@ -276,7 +276,7 @@ $_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(
@@ -304,7 +304,7 @@ $_prefs['use_vinbox'] = array(
     'locked' => false,
     'shared' => false,
     'type' => 'checkbox',
-    'desc' => _('Display Virtual Inbox?'));
+    'desc' => _("Display Virtual Inbox?"));
 
 // use IMAP subscribe?
 $_prefs['subscribe'] = array(
@@ -312,7 +312,7 @@ $_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.
@@ -381,11 +381,11 @@ $_prefs['acl'] = array(
 
 // 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
@@ -405,7 +405,7 @@ $_prefs['rename_sentmail_monthly'] = array(
     '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?
@@ -414,7 +414,7 @@ $_prefs['delete_sentmail_monthly'] = array(
     '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?
@@ -423,7 +423,7 @@ $_prefs['delete_sentmail_monthly_keep'] = array(
     '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?
@@ -432,7 +432,7 @@ $_prefs['purge_sentmail'] = array(
     '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?
@@ -442,7 +442,7 @@ $_prefs['purge_sentmail_interval'] = array(
     '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?
@@ -451,7 +451,7 @@ $_prefs['purge_sentmail_keep'] = array(
     '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?
@@ -460,7 +460,7 @@ $_prefs['delete_attachments_monthly'] = array(
     '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?
@@ -469,7 +469,7 @@ $_prefs['delete_attachments_monthly_keep'] = array(
     '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?
@@ -478,7 +478,7 @@ $_prefs['purge_spam'] = array(
     '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?
@@ -488,7 +488,7 @@ $_prefs['purge_spam_interval'] = array(
     '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?
@@ -497,7 +497,7 @@ $_prefs['purge_spam_keep'] = array(
     '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?
@@ -506,7 +506,7 @@ $_prefs['purge_trash'] = array(
     '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?
@@ -516,7 +516,7 @@ $_prefs['purge_trash_interval'] = array(
     '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?
@@ -525,7 +525,7 @@ $_prefs['purge_trash_keep'] = array(
     '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
@@ -537,7 +537,7 @@ $_prefs['purge_trash_keep'] = array(
 $_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())
@@ -550,12 +550,12 @@ $_prefs['stationery'] = 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(
@@ -563,7 +563,7 @@ $_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?
@@ -572,7 +572,7 @@ $_prefs['compose_bcc'] = array(
     '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?
@@ -581,7 +581,7 @@ $_prefs['compose_spellcheck'] = array(
     '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(
@@ -589,7 +589,7 @@ $_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(
@@ -598,7 +598,7 @@ $_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(
@@ -606,7 +606,7 @@ $_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
@@ -616,7 +616,7 @@ $_prefs['compose_html'] = array(
     '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
@@ -627,7 +627,7 @@ $_prefs['fckeditor_buttons'] = array(
     '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
@@ -636,7 +636,7 @@ $_prefs['mail_domain'] = array(
     '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(
@@ -644,10 +644,10 @@ $_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
@@ -656,8 +656,8 @@ $_prefs['sending_charset'] = array(
     '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');
@@ -676,12 +676,12 @@ $_prefs['save_attachments'] = array(
     '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
@@ -690,10 +690,10 @@ $_prefs['disposition_request_read'] = array(
     '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'
 );
 
@@ -709,7 +709,7 @@ $_prefs['reply_quote'] = array(
     '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?
@@ -718,7 +718,7 @@ $_prefs['reply_format'] = array(
     '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(
@@ -726,12 +726,12 @@ $_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,
@@ -739,11 +739,11 @@ $_prefs['reply_headers'] = array(
 
 // 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
@@ -757,7 +757,7 @@ $_prefs['close_draft'] = array(
     '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(
@@ -765,7 +765,7 @@ $_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
@@ -776,11 +776,11 @@ $_prefs['auto_save_drafts'] = array(
     '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?
@@ -789,7 +789,7 @@ $_prefs['auto_delete_drafts'] = array(
     '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
@@ -803,7 +803,7 @@ $_prefs['filtering'] = array(
     '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(
@@ -811,7 +811,7 @@ $_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(
@@ -820,15 +820,15 @@ $_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?
@@ -837,7 +837,7 @@ $_prefs['html_image_replacement'] = array(
     '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'
 );
 
@@ -848,7 +848,7 @@ $_prefs['html_image_addrbook'] = array(
     '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'
 );
 
@@ -859,7 +859,7 @@ $_prefs['highlight_text'] = array(
     '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(
@@ -868,7 +868,7 @@ $_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(
@@ -877,13 +877,13 @@ $_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(
@@ -892,7 +892,7 @@ $_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(
@@ -900,7 +900,7 @@ $_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(
@@ -909,11 +909,11 @@ $_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?
@@ -924,7 +924,7 @@ $_prefs['mail_hdr'] = array(
     '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(
@@ -937,9 +937,9 @@ $_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(
@@ -948,7 +948,7 @@ $_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'
 );
 
@@ -963,7 +963,7 @@ $_prefs['mailbox_return'] = array(
     '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?
@@ -972,7 +972,7 @@ $_prefs['use_trash'] = array(
     '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(
@@ -994,7 +994,7 @@ $_prefs['empty_trash_menu'] = 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(
@@ -1002,7 +1002,7 @@ $_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(
@@ -1023,14 +1023,14 @@ $_prefs['refresh_time'] = 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?
@@ -1039,7 +1039,7 @@ $_prefs['nav_popup'] = array(
     '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?
@@ -1063,7 +1063,7 @@ $_prefs['preview_enabled'] = array(
     'locked' => false,
     'shared' => false,
     'type' => 'checkbox',
-    'desc' => _('Enable message previews?')
+    'desc' => _("Enable message previews?")
 );
 
 $_prefs['preview_maxlen'] = array(
@@ -1072,12 +1072,12 @@ $_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(
@@ -1085,7 +1085,7 @@ $_prefs['preview_strip_nl'] = array(
     'locked' => false,
     'shared' => false,
     'type' => 'checkbox',
-    'desc' => _('Strip linebreaks?')
+    'desc' => _("Strip linebreaks?")
 );
 
 $_prefs['preview_show_unread'] = array(
@@ -1093,7 +1093,7 @@ $_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(
@@ -1101,7 +1101,7 @@ $_prefs['preview_show_tooltip'] = array(
     'locked' => false,
     'shared' => false,
     'type' => 'checkbox',
-    'desc' => _('Show previews in tooltips?')
+    'desc' => _("Show previews in tooltips?")
 );
 
 // End Message Preview
@@ -1145,20 +1145,20 @@ $_prefs['msgflags'] = array(
         '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'
         ),
 
@@ -1166,17 +1166,17 @@ $_prefs['msgflags'] = array(
         // 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'
         ),
 
@@ -1191,7 +1191,7 @@ $_prefs['msgflags'] = array(
             'a' => 'N',
             'b' => '#eeeeff',
             'c' => 'flagUnseen',
-            'l' => _('Unseen'),
+            'l' => _("Unseen"),
             'n' => true,
             't' => 'imapu'
         ),
@@ -1199,7 +1199,7 @@ $_prefs['msgflags'] = array(
             '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'
@@ -1207,7 +1207,7 @@ $_prefs['msgflags'] = array(
         '\\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'
@@ -1216,14 +1216,14 @@ $_prefs['msgflags'] = array(
             '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'
         ),
 
@@ -1232,7 +1232,7 @@ $_prefs['msgflags'] = array(
             'a' => 'F',
             'b' => '#aadddd',
             'c' => 'flagForwarded',
-            'l' => _('Forwarded'),
+            'l' => _("Forwarded"),
             // Pursuant to RFC, this flag SHOULD NOT be changed by the user
             't' => 'imap'
         )
@@ -1259,7 +1259,7 @@ $_prefs['fetchmail_link'] = array(
     '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(
@@ -1267,7 +1267,7 @@ $_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(
@@ -1295,12 +1295,12 @@ $_prefs['mailbox_start'] = 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
@@ -1310,15 +1310,15 @@ $_prefs['sortby'] = array(
     '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(
@@ -1327,10 +1327,10 @@ $_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(
@@ -1346,7 +1346,7 @@ $_prefs['max_msgs'] = 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(
@@ -1355,11 +1355,11 @@ $_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
@@ -1371,7 +1371,7 @@ $_prefs['atc_flag'] = array(
     '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(
@@ -1386,7 +1386,7 @@ $_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(
@@ -1395,11 +1395,11 @@ $_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(
@@ -1408,10 +1408,10 @@ $_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
@@ -1421,11 +1421,11 @@ $_prefs['nav_expanded_sidebar'] = array(
     '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(
@@ -1433,7 +1433,7 @@ $_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(
@@ -1502,7 +1502,7 @@ $_prefs['save_recipients'] = 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
@@ -1512,7 +1512,7 @@ $_prefs['display_contact'] = array(
     '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');
@@ -1563,7 +1563,7 @@ $_prefs['conflict_interval'] = array(
     '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
@@ -1656,7 +1656,7 @@ $_prefs['mimp_preview_msg'] = array(
     '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
@@ -1670,10 +1670,10 @@ $_prefs['dimp_login_view'] = array(
     '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
index a20f89e..e3ce255 100644 (file)
  * 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: */
index 0518f6e..55e40ab 100644 (file)
@@ -73,7 +73,7 @@ if (count($source_list) > 1) {
     $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 {
@@ -98,7 +98,7 @@ $template->set('cc', !$to_only);
 $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';
index 8fcbc38..6eeceb5 100644 (file)
@@ -62,7 +62,7 @@ case 'fetchmail_prefs_save':
 
     $id = Horde_Util::getFormData('fm_id');
     if (empty($id)) {
-        $id = _('Unnamed');
+        $id = _("Unnamed");
     }
 
     foreach ($fetchmail->getParameterList() as $val) {
@@ -71,18 +71,18 @@ case 'fetchmail_prefs_save':
 
     $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;
 }
index 3d48369..02a1d71 100644 (file)
@@ -40,7 +40,7 @@ case 'update_prefs':
     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;
 }
 
@@ -53,7 +53,7 @@ $t = new Horde_Template();
 $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;
@@ -77,9 +77,9 @@ if (!$blacklist_link && !$whitelist_link && !$filters_link) {
     $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) {
@@ -95,11 +95,11 @@ if (!$blacklist_link && !$whitelist_link && !$filters_link) {
     $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']);
     }
@@ -116,7 +116,7 @@ if (!$blacklist_link && !$whitelist_link && !$filters_link) {
     }
     $t->set('opts', $opts);
     if (!empty($opts)) {
-        $t->set('save_opts', _('Save Options'));
+        $t->set('save_opts', _("Save Options"));
     }
 }
 
index 4e74be1..e4e2070 100644 (file)
@@ -20,7 +20,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 /* 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;
 }
@@ -55,9 +55,9 @@ foreach ($tree_ob[0] as $val) {
 
 $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';
index bb83974..067a9c6 100644 (file)
@@ -40,7 +40,7 @@ Horde::addScriptFile('folders.js', 'imp', true);
 
 /* 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;
 }
@@ -158,14 +158,14 @@ case 'download_folder_zip':
 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);
@@ -212,7 +212,7 @@ case 'unsubscribe_folder':
             $imp_folder->unsubscribe($folder_list);
         }
     } else {
-        $notification->push(_('No folders were specified'), 'horde.message');
+        $notification->push(_("No folders were specified"), 'horde.message');
     }
     break;
 
@@ -260,7 +260,7 @@ case 'folders_empty_mailbox_confirm':
             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);
@@ -276,7 +276,7 @@ case 'folders_empty_mailbox_confirm':
             break;
         }
 
-        $title = _('Folder Actions - Confirmation');
+        $title = _("Folder Actions - Confirmation");
         require IMP_TEMPLATES . '/common-header.inc';
         IMP::menu();
 
@@ -298,7 +298,7 @@ case 'mbox_size':
     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();
@@ -314,7 +314,7 @@ case 'mbox_size':
             $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;
@@ -325,7 +325,7 @@ case 'mbox_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';
@@ -340,7 +340,7 @@ $folders_token = Horde::getRequestToken('imp.folders');
 $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();
@@ -371,7 +371,7 @@ Horde::addInlineScript(array(
 ));
 
 /* 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);
@@ -379,9 +379,9 @@ $head_template->set('folders_url', $folders_url);
 $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. */
@@ -391,23 +391,23 @@ $a_template->set('id', 0);
 $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)) {
@@ -433,8 +433,8 @@ $morembox = $rows = array();
 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';
@@ -451,7 +451,7 @@ foreach ($raw_rows as $val) {
         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');
@@ -468,7 +468,7 @@ foreach ($raw_rows as $val) {
             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') {
@@ -479,7 +479,7 @@ foreach ($raw_rows as $val) {
             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') {
@@ -509,7 +509,7 @@ $template = new Horde_Template();
 $template->setOption('gettext', true);
 $template->set('rows', $rows);
 
-$title = _('Folder Navigator');
+$title = _("Folder Navigator");
 require IMP_TEMPLATES . '/common-header.inc';
 IMP::menu();
 IMP::status();
index 07ecd13..071f9df 100644 (file)
@@ -61,7 +61,7 @@ class IMP_Auth extends Horde_Auth_Base
         } 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);
index bbc60b1..5681725 100644 (file)
@@ -64,11 +64,11 @@ class IMP_Block_Foldersummary extends Horde_Block
 
         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>';
             }
         }
 
index 859ddb3..db755be 100644 (file)
@@ -33,7 +33,7 @@ class IMP_Block_Newmail extends Horde_Block
 
         $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');
@@ -61,8 +61,8 @@ class IMP_Block_Newmail extends Horde_Block
 
             $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>';
         }
 
index 77bf529..6e687c4 100644 (file)
@@ -8,7 +8,7 @@
  * @package Horde_Block
  */
 
-$block_name = _('Folder Summary');
+$block_name = _("Folder Summary");
 
 class Horde_Block_imp_summary extends Horde_Block
 {
@@ -27,10 +27,10 @@ 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)
                      );
     }
@@ -45,7 +45,7 @@ class Horde_Block_imp_summary extends Horde_Block
         $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. */
@@ -131,11 +131,11 @@ class Horde_Block_imp_summary extends Horde_Block
             }
         } 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>';
             }
         }
 
index 7b06b9a..04a0316 100644 (file)
@@ -8,7 +8,7 @@
  * @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
@@ -34,7 +34,7 @@ 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,
@@ -42,7 +42,7 @@ class Horde_Block_imp_tree_folders extends Horde_Block
                              '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,
index 5c09a4a..245fdac 100644 (file)
@@ -212,7 +212,7 @@ class IMP_Compose
                     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);
@@ -241,7 +241,7 @@ class IMP_Compose
     {
         $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();
@@ -249,7 +249,7 @@ class IMP_Compose
         /* 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');
@@ -269,11 +269,11 @@ class IMP_Compose
             $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.");
         }
     }
 
@@ -516,7 +516,7 @@ class IMP_Compose
                     $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. */
@@ -553,7 +553,7 @@ class IMP_Compose
             }
         }
 
-        $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? */
@@ -575,7 +575,7 @@ class IMP_Compose
                 ((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;
                     }
@@ -583,7 +583,7 @@ class IMP_Compose
                     $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);
                 }
             }
@@ -607,7 +607,7 @@ class IMP_Compose
             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;
             }
         }
@@ -647,7 +647,7 @@ class IMP_Compose
 
         /* 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);
         }
@@ -663,7 +663,7 @@ class IMP_Compose
         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);
@@ -678,7 +678,7 @@ class IMP_Compose
                         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()));
             }
         }
 
@@ -749,7 +749,7 @@ class IMP_Compose
         } catch (Horde_Mime_Exception $e) {}
 
         if (empty($r_array)) {
-            $notification->push(_('Could not save recipients.'));
+            $notification->push(_("Could not save recipients."));
             return;
         }
 
@@ -764,7 +764,7 @@ class IMP_Compose
             $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;
         }
 
@@ -791,7 +791,7 @@ class IMP_Compose
 
             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());
@@ -838,7 +838,7 @@ class IMP_Compose
                 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) {
@@ -862,7 +862,7 @@ class IMP_Compose
         }
 
         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
@@ -882,7 +882,7 @@ class IMP_Compose
                             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()));
                 }
             }
         }
@@ -907,7 +907,7 @@ class IMP_Compose
             $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'] : '');
@@ -994,10 +994,10 @@ class IMP_Compose
             $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');
@@ -1072,7 +1072,7 @@ class IMP_Compose
                 /* 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;
                 }
@@ -1084,7 +1084,7 @@ class IMP_Compose
                  * 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;
                 }
@@ -1115,7 +1115,7 @@ class IMP_Compose
                     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))) {
@@ -1125,7 +1125,7 @@ class IMP_Compose
             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;
                 }
@@ -1147,7 +1147,7 @@ class IMP_Compose
                     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());
             }
         }
 
@@ -1305,13 +1305,13 @@ class IMP_Compose
 
         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";
@@ -1337,7 +1337,7 @@ class IMP_Compose
                    ($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;
         }
 
@@ -1390,10 +1390,10 @@ class IMP_Compose
 
         $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:';
         }
 
@@ -1401,9 +1401,9 @@ class IMP_Compose
             $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');
 
@@ -1474,7 +1474,7 @@ class IMP_Compose
                 $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 {
@@ -1488,13 +1488,13 @@ class IMP_Compose
 
         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);
         }
     }
 
@@ -1510,27 +1510,27 @@ class IMP_Compose
         $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;
@@ -1558,7 +1558,7 @@ class IMP_Compose
     {
         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);
         }
@@ -1569,7 +1569,7 @@ class IMP_Compose
         /* 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
@@ -1599,7 +1599,7 @@ class IMP_Compose
         } 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');
             }
         }
 
@@ -1643,7 +1643,7 @@ class IMP_Compose
             $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') &&
@@ -1663,7 +1663,7 @@ class IMP_Compose
         /* 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. */
@@ -1903,7 +1903,7 @@ class IMP_Compose
             $message_id = reset($message_id);
         }
         if (!($subject = $h->getValue('subject'))) {
-            $subject = _('[No Subject]');
+            $subject = _("[No Subject]");
         }
         $udate = strtotime($h->getValue('date'));
 
@@ -1927,13 +1927,13 @@ class IMP_Compose
             '/%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,
@@ -2116,7 +2116,7 @@ class IMP_Compose
         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']));
@@ -2125,14 +2125,14 @@ class IMP_Compose
         $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) {
@@ -2154,14 +2154,14 @@ class IMP_Compose
         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;
@@ -2223,7 +2223,7 @@ class IMP_Compose
             !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]");
             }
         }
 
@@ -2348,26 +2348,26 @@ class IMP_Compose
                     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');
@@ -2421,7 +2421,7 @@ class IMP_Compose
             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."));
     }
 
     /**
@@ -2444,7 +2444,7 @@ class IMP_Compose
 
             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) {}
         }
     }
@@ -2483,7 +2483,7 @@ class IMP_Compose
     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, ',;')))))
             : '';
     }
 
@@ -2500,7 +2500,7 @@ class IMP_Compose
      */
     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) {
index eac75e8..108e1cd 100644 (file)
@@ -406,8 +406,8 @@ class IMP_Contents
                         '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")))
                                 )
                             )
                         ),
@@ -449,8 +449,8 @@ class IMP_Contents
                     ($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")))
                         )
                     );
                 }
@@ -595,8 +595,8 @@ class IMP_Contents
             ($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. */
@@ -605,12 +605,12 @@ class IMP_Contents
         /* 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);
@@ -622,7 +622,7 @@ class IMP_Contents
         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));
             }
@@ -634,7 +634,7 @@ class IMP_Contents
             $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
@@ -642,7 +642,7 @@ class IMP_Contents
         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
@@ -653,7 +653,7 @@ class IMP_Contents
             (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;
@@ -761,7 +761,7 @@ class IMP_Contents
         }
 
         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;';
index 7cc349c..6f4db8c 100644 (file)
@@ -114,7 +114,7 @@ class IMP_Crypt_Pgp extends Horde_Crypt_Pgp
         /* 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. */
@@ -172,7 +172,7 @@ class IMP_Crypt_Pgp extends Horde_Crypt_Pgp
         /* 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;
@@ -199,12 +199,12 @@ class IMP_Crypt_Pgp extends Horde_Crypt_Pgp
                      * 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 = '';
@@ -293,7 +293,7 @@ class IMP_Crypt_Pgp extends Horde_Crypt_Pgp
         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'])
@@ -309,7 +309,7 @@ class IMP_Crypt_Pgp extends Horde_Crypt_Pgp
                 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"));
     }
 
     /**
@@ -466,7 +466,6 @@ class IMP_Crypt_Pgp extends Horde_Crypt_Pgp
     {
         $params = array(
             'actionID' => 'save_attachment_public_key',
-            'mailbox' => $mailbox,
             'uid' => $uid,
             'mime_id' => $id
         );
index c6a4ae3..fc078e1 100644 (file)
@@ -107,13 +107,13 @@ class IMP_Crypt_Smime extends Horde_Crypt_Smime
         /* 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. */
@@ -122,7 +122,7 @@ class IMP_Crypt_Smime extends Horde_Crypt_Smime
         } 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')));
@@ -325,7 +325,6 @@ class IMP_Crypt_Smime extends Horde_Crypt_Smime
     {
         $params = array(
             'actionID' => 'save_attachment_public_key',
-            'mailbox' => $mailbox,
             'uid' => $uid,
             'mime_id' => $id
         );
index 222e0c8..786e3d7 100644 (file)
@@ -164,7 +164,7 @@ class DIMP
         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));
             }
         }
 
@@ -174,7 +174,7 @@ class DIMP
                 // 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));
                 }
             }
         }
@@ -217,7 +217,7 @@ class DIMP
         $ob = new stdClass;
 
         if ($elt['children']) {
-            $ob->ch = 1;
+           $ob->ch = 1;
         }
         $ob->m = $elt['value'];
         if ($ob->m != $elt['name']) {
index aaf1650..656816f 100644 (file)
@@ -136,7 +136,7 @@ abstract class IMP_Fetchmail
 
         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;
             }
@@ -144,14 +144,14 @@ abstract class IMP_Fetchmail
             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');
             }
         }
     }
@@ -172,9 +172,9 @@ abstract class IMP_Fetchmail
                 $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;
         }
 
@@ -186,8 +186,8 @@ abstract class IMP_Fetchmail
         $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;
     }
@@ -201,10 +201,9 @@ abstract class IMP_Fetchmail
     {
         /* 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;
     }
@@ -250,7 +249,7 @@ abstract class IMP_Fetchmail
     {
         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;
         }
 
index b52a926..4244158 100644 (file)
@@ -28,7 +28,7 @@ class IMP_Fetchmail_imap extends IMP_Fetchmail
      */
     static public function description()
     {
-        return _('IMAP/POP3 Mail Servers');
+        return _("IMAP/POP3 Mail Servers");
     }
 
     /**
@@ -57,42 +57,42 @@ class IMP_Fetchmail_imap extends IMP_Fetchmail
     {
         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',
@@ -126,7 +126,7 @@ class IMP_Fetchmail_imap extends IMP_Fetchmail
         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());
         }
     }
 
@@ -159,7 +159,7 @@ class IMP_Fetchmail_imap extends IMP_Fetchmail
         }
 
         if (!$mbox) {
-            throw new Horde_Exception(_('Invalid Remote Mailbox'));
+            throw new Horde_Exception(_("Invalid Remote Mailbox"));
         }
 
         $query = new Horde_Imap_Client_Search_Query();
index a465610..bb94a35 100644 (file)
@@ -57,14 +57,14 @@ class IMP_Filter
      */
     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;
             }
@@ -85,7 +85,7 @@ class IMP_Filter
      */
     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);
     }
 
     /**
@@ -123,8 +123,8 @@ class IMP_Filter
 
         /* 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;
index 6e1d7b7..fdfca82 100644 (file)
@@ -80,8 +80,8 @@ class IMP_Folder
         $inbox_entry = array(
             'INBOX' => array(
                 'val' => 'INBOX',
-                'label' => _('Inbox'),
-                'abbrev' => _('Inbox')
+                'label' => _("Inbox"),
+                'abbrev' => _("Inbox")
             )
         );
 
@@ -182,16 +182,16 @@ class IMP_Folder
             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');
             }
         }
 
@@ -244,14 +244,14 @@ class IMP_Folder
                 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);
@@ -265,7 +265,7 @@ class IMP_Folder
 
         /* 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;
         }
 
@@ -273,11 +273,11 @@ class IMP_Folder
         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) {
@@ -340,7 +340,7 @@ class IMP_Folder
         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;
         }
 
@@ -356,11 +356,11 @@ class IMP_Folder
         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;
@@ -392,17 +392,17 @@ class IMP_Folder
         $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;
             }
         }
@@ -434,20 +434,20 @@ class IMP_Folder
         $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;
                 }
             }
index b5455a8..1176e7c 100644 (file)
@@ -32,7 +32,7 @@ class IMP
     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;
@@ -130,7 +130,7 @@ class IMP
         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;
     }
 
@@ -186,9 +186,9 @@ class IMP
             (!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. */
@@ -209,7 +209,7 @@ class IMP
             $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");
                 }
@@ -223,7 +223,7 @@ class IMP
                 $tasklists = $GLOBALS['registry']->call('tasks/listTasklists', array(false, PERMS_EDIT));
 
                 if (count($tasklists)) {
-                    $text .= '<option value="" disabled="disabled">&nbsp;</option><option value="" disabled="disabled">- - ' . _('Task Lists') . ' - -</option>' . "\n";
+                    $text .= '<option value="" disabled="disabled">&nbsp;</option><option value="" disabled="disabled">- - ' . _("Task Lists") . ' - -</option>' . "\n";
 
                     foreach ($tasklists as $id => $tasklist) {
                         $text .= sprintf('<option value="%s">%s</option>%s',
@@ -241,7 +241,7 @@ class IMP
             try {
                 $notepads = $GLOBALS['registry']->call('notes/listNotepads', array(false, PERMS_EDIT));
                 if (count($notepads)) {
-                    $text .= '<option value="" disabled="disabled">&nbsp;</option><option value="" disabled="disabled">- - ' . _('Notepads') . " - -</option>\n";
+                    $text .= '<option value="" disabled="disabled">&nbsp;</option><option value="" disabled="disabled">- - ' . _("Notepads") . ' - -</option>' . "\n";
 
                     foreach ($notepads as $id => $notepad) {
                         $text .= sprintf('<option value="%s">%s</option>%s',
@@ -390,7 +390,7 @@ class IMP
             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);
@@ -421,11 +421,11 @@ class IMP
 
         /* 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. */
@@ -527,7 +527,7 @@ class IMP
 
         $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') &&
@@ -544,27 +544,27 @@ class IMP
 
                 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') &&
@@ -577,11 +577,11 @@ class IMP
             $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,
@@ -602,7 +602,7 @@ class IMP
              * 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);
         }
 
@@ -621,12 +621,12 @@ class IMP
             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'));
 
@@ -703,7 +703,7 @@ class IMP
             $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'])) {
@@ -719,8 +719,8 @@ class IMP
                     : 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");
             }
         }
 
@@ -762,7 +762,7 @@ class IMP
                 $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'));
 
@@ -986,24 +986,24 @@ class IMP
             $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")
             );
         }
 
@@ -1012,7 +1012,7 @@ class IMP
         }
 
         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;
@@ -1244,7 +1244,7 @@ class IMP
     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))) . "');";
     }
 
     /**
@@ -1383,7 +1383,7 @@ class IMP
         }
 
         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";
         }
     }
 
@@ -1486,7 +1486,7 @@ class IMP
         }
 
         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";
         }
     }
 
@@ -1665,15 +1665,15 @@ class IMP
 
         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;
         }
 
@@ -1683,11 +1683,11 @@ class IMP
             '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) . '\')';
     }
 
     /**
index fe14b7e..ca2f41b 100644 (file)
@@ -47,7 +47,7 @@ class Identity_imp extends Identity
      * 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(
@@ -147,7 +147,7 @@ class Identity_imp extends Identity
         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)) {
@@ -459,7 +459,7 @@ class Identity_imp extends Identity
             $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";
index 59ad3aa..4ac07b2 100644 (file)
@@ -293,7 +293,7 @@ class IMP_Imap
         }
 
         if ($this->_uidvalid[$mailbox]) {
-            throw new Horde_Exception(_('Mailbox structure on server has changed.'));
+            throw new Horde_Exception(_("Mailbox structure on server has changed."));
         }
     }
 
index 7019366..7af5b54 100644 (file)
@@ -56,12 +56,12 @@ class IMP_Imap_Acl
     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');
@@ -70,32 +70,32 @@ class IMP_Imap_Acl
 
         $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")
             )
         );
 
@@ -103,32 +103,32 @@ class IMP_Imap_Acl
             // 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")
                 )
             ));
         }
@@ -147,7 +147,7 @@ class IMP_Imap_Acl
         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"));
         }
     }
 
@@ -166,7 +166,7 @@ class IMP_Imap_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)));
         }
     }
 
index 68db76f..5895b20 100644 (file)
@@ -162,7 +162,7 @@ class IMP_Imap_Flags
 
         /* 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(
index 9d496d0..6566f9c 100644 (file)
@@ -241,11 +241,11 @@ class IMP_Imap_Tree
 
         /* 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();
@@ -614,12 +614,12 @@ class IMP_Imap_Tree
                 $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));
             }
         }
 
@@ -665,7 +665,7 @@ class IMP_Imap_Tree
      */
     public function peek()
     {
-        for ($i = ($this->_currkey + 1);; ++$i) {
+        for ($i = ($this->_currkey + 1); ; ++$i) {
             if (!isset($this->_parent[$this->_currparent][$i])) {
                 return false;
             }
@@ -1896,44 +1896,45 @@ class IMP_Imap_Tree
                 }
             }
 
+
             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;
             }
@@ -1945,11 +1946,11 @@ class IMP_Imap_Tree
                 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 {
@@ -1957,11 +1958,11 @@ class IMP_Imap_Tree
             $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;
@@ -2015,7 +2016,7 @@ class IMP_Imap_Tree
                     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'];
index 182dc17..310d5ef 100644 (file)
@@ -60,7 +60,7 @@ class IMP_LoginTasks_Task_DeleteAttachmentsMonthly extends Horde_LoginTasks_Task
      */
     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'));
     }
 
 }
index 9a29f4d..26f600a 100644 (file)
@@ -44,7 +44,7 @@ class IMP_LoginTasks_Task_DeleteSentmailMonthly extends Horde_LoginTasks_Task
         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');
                 }
             }
         }
@@ -53,7 +53,7 @@ class IMP_LoginTasks_Task_DeleteSentmailMonthly extends Horde_LoginTasks_Task
         /* 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)) {
@@ -72,7 +72,7 @@ class IMP_LoginTasks_Task_DeleteSentmailMonthly extends Horde_LoginTasks_Task
      */
     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'));
     }
 
 }
index 3e341a2..11b08d8 100644 (file)
@@ -64,9 +64,9 @@ class IMP_LoginTasks_Task_PurgeSentmail extends Horde_LoginTasks_Task
             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');
                 }
             }
         }
@@ -84,7 +84,7 @@ class IMP_LoginTasks_Task_PurgeSentmail extends Horde_LoginTasks_Task
     {
         $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'));
     }
index d9db06a..244ff32 100644 (file)
@@ -63,7 +63,7 @@ class IMP_LoginTasks_Task_PurgeSpam extends Horde_LoginTasks_Task
         $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;
@@ -77,7 +77,7 @@ class IMP_LoginTasks_Task_PurgeSpam extends Horde_LoginTasks_Task
      */
     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'));
     }
index fc2c320..6fad947 100644 (file)
@@ -63,7 +63,7 @@ class IMP_LoginTasks_Task_PurgeTrash extends Horde_LoginTasks_Task
         $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;
@@ -77,7 +77,7 @@ class IMP_LoginTasks_Task_PurgeTrash extends Horde_LoginTasks_Task
      */
     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'));
     }
index bb3161a..0f03d5a 100644 (file)
@@ -41,9 +41,9 @@ class IMP_LoginTasks_Task_RenameSentmailMonthly extends Horde_LoginTasks_Task
                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 =
@@ -72,7 +72,7 @@ class IMP_LoginTasks_Task_RenameSentmailMonthly extends Horde_LoginTasks_Task
             $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));
     }
 
     /**
index e3762ba..daab8aa 100644 (file)
@@ -27,25 +27,25 @@ class MIMP
 
         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) {
index fc1e410..83a6eb8 100644 (file)
@@ -322,7 +322,7 @@ class IMP_Mailbox
                 }
             } 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);
@@ -342,7 +342,7 @@ class IMP_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');
                 }
             }
         }
index d940ab4..ad74eb8 100644 (file)
@@ -152,7 +152,7 @@ class IMP_Maillog
             } 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':
@@ -160,11 +160,11 @@ class IMP_Maillog
                     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;
                 }
             }
index 8f944d9..b68125d 100644 (file)
@@ -105,11 +105,11 @@ class IMP_Message
         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;
         }
 
@@ -117,13 +117,13 @@ class IMP_Message
             $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) {
@@ -187,7 +187,7 @@ class IMP_Message
         $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;
         }
 
@@ -209,7 +209,7 @@ class IMP_Message
             $error = null;
 
             if ($GLOBALS['imp_imap']->isReadOnly($mbox)) {
-                $error = _('This folder is read-only.');
+                $error = _("This folder is read-only.");
             }
 
             if (!$error) {
@@ -221,7 +221,7 @@ class IMP_Message
             }
 
             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;
             }
@@ -424,11 +424,11 @@ class IMP_Message
                     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)) {
@@ -453,7 +453,7 @@ class IMP_Message
                                 $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) {}
                     }
                 }
@@ -482,19 +482,19 @@ class IMP_Message
     {
         /* 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);
@@ -507,7 +507,7 @@ class IMP_Message
             /* 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;
@@ -531,7 +531,7 @@ class IMP_Message
 
             /* 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);
         }
 
@@ -553,7 +553,7 @@ class IMP_Message
 
             $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));
@@ -592,7 +592,7 @@ class IMP_Message
             $error = null;
 
             if ($GLOBALS['imp_imap']->isReadOnly($mbox)) {
-                $error = _('This folder is read-only.');
+                $error = _("This folder is read-only.");
             }
 
             if (!$error) {
@@ -613,7 +613,7 @@ class IMP_Message
             }
 
             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;
             }
         }
@@ -733,13 +733,13 @@ class IMP_Message
             $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;
             }
 
@@ -748,7 +748,7 @@ class IMP_Message
             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;
                 }
 
@@ -761,7 +761,7 @@ class IMP_Message
                     $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) {}
         }
     }
@@ -786,7 +786,7 @@ class IMP_Message
                 $size += $v['size'];
             }
             return ($formatted)
-                ? sprintf(_('%.2fMB'), $size / (1024 * 1024))
+                ? sprintf(_("%.2fMB"), $size / (1024 * 1024))
                 : $size;
         } catch (Horde_Imap_Client_Exception $e) {
             return 0;
index 3e736ab..cc34d4f 100644 (file)
@@ -80,7 +80,7 @@ class IMP_Horde_Mime_Viewer_Alternative extends Horde_Mime_Viewer_Driver
                 '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'
                     )
                 ),
index 284a69c..06dad0d 100644 (file)
@@ -73,14 +73,14 @@ class IMP_Horde_Mime_Viewer_Appledouble extends Horde_Mime_Viewer_Driver
 
         $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"))))
             )
         );
 
@@ -88,9 +88,9 @@ class IMP_Horde_Mime_Viewer_Appledouble extends Horde_Mime_Viewer_Driver
         $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) {
index d41cdde..38d1e9e 100644 (file)
@@ -207,8 +207,8 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
                 $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>'
                     )
                 );
 
index 8634b58..9ebe86f 100644 (file)
@@ -101,15 +101,15 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
 
         /* 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);
             }
         }
 
@@ -142,12 +142,12 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
             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(
@@ -155,7 +155,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
                 '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
                     )
                 ),
@@ -171,7 +171,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
      */
     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);
 
index f6ab146..6f6a8d7 100644 (file)
@@ -69,7 +69,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         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
                 )
@@ -102,12 +102,12 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $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;
 
@@ -116,12 +116,12 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                 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;
 
@@ -148,11 +148,11 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                             $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.') .
-                                            '&nbsp;' . 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.") .
+                                            '&nbsp;' . 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')) {
@@ -161,14 +161,14 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                         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.') .
-                                            '&nbsp;' . 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.") .
+                                            '&nbsp;' . 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;
 
@@ -177,12 +177,12 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     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;
 
@@ -192,19 +192,19 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                         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.') .
-                                                         '&nbsp;' . 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.") .
+                                                         '&nbsp;' . 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') {
@@ -280,20 +280,20 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     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;
                     }
@@ -340,12 +340,12 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                         $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;
 
@@ -405,7 +405,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $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);
@@ -432,7 +432,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     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();
@@ -440,19 +440,19 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                         $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;
             }
         }
@@ -483,7 +483,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
             // @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());
             }
         }
 
@@ -513,16 +513,16 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
         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;
         }
 
@@ -535,18 +535,18 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         $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>';
             }
         }
 
@@ -554,39 +554,39 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
             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") . '/>';
     }
 
     /**
@@ -610,9 +610,9 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
         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;
 
@@ -621,7 +621,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
             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;
 
@@ -640,52 +640,52 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                 }
 
                 $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;
@@ -693,7 +693,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
         $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));
         }
@@ -707,63 +707,63 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         $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':
@@ -773,7 +773,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     }
                 }
 
-                $status = _('Awaiting Response');
+                $status = _("Awaiting Response");
                 if (isset($attendee_params[$key]['PARTSTAT'])) {
                     $status = $this->_partstatToString($attendee_params[$key]['PARTSTAT'], $status);
                 }
@@ -804,7 +804,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                 $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) {
@@ -813,7 +813,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                             } 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) {
@@ -837,11 +837,11 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         }
 
         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;
@@ -862,7 +862,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
         $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'];
@@ -874,16 +874,16 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
         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));
         }
@@ -896,31 +896,31 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
         $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'];
@@ -929,19 +929,19 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $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':
@@ -951,7 +951,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     }
                 }
 
-                $status = _('Awaiting Response');
+                $status = _("Awaiting Response");
                 if (isset($params[$key]['PARTSTAT'])) {
                     $status = $this->_partstatToString($params[$key]['PARTSTAT'], $status);
                 }
@@ -966,10 +966,10 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         }
 
         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;
@@ -987,26 +987,26 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
     {
         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;
         }
     }
 }
index 9199392..ddd73d1 100644 (file)
@@ -54,8 +54,8 @@ class IMP_Horde_Mime_Viewer_Mdn extends Horde_Mime_Viewer_Driver
 
         $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."))
             )
         );
 
@@ -74,7 +74,7 @@ class IMP_Horde_Mime_Viewer_Mdn extends Horde_Mime_Viewer_Driver
         $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
@@ -82,13 +82,13 @@ class IMP_Horde_Mime_Viewer_Mdn extends Horde_Mime_Viewer_Driver
         $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'];
         }
index 576a9cd..bdd3fb0 100644 (file)
@@ -56,7 +56,7 @@ class IMP_Horde_Mime_Viewer_Partial extends Horde_Mime_Viewer_Driver
             $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);
         }
 
index adddea1..b0a2080 100644 (file)
@@ -78,7 +78,7 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf
         }
 
         $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')) {
@@ -92,7 +92,7 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf
                 '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
                     )
                 ),
@@ -137,7 +137,7 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf
      */
     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()) . '" />';
     }
 
 }
index 04f534c..fe5fc1f 100644 (file)
@@ -141,7 +141,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
         /* 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;
         }
 
@@ -167,7 +167,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
                 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']) {
@@ -178,7 +178,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
                     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;
@@ -201,21 +201,21 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
         $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':
@@ -225,7 +225,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
                         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;
@@ -243,7 +243,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
                 $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();
@@ -270,7 +270,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
         $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.")
             )
         );
 
@@ -279,9 +279,9 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
         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(' ', '&nbsp;', $this->_imppgp->pgpPrettyKey($this->_mimepart->getContents()))) . '</span>';
@@ -329,11 +329,11 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
             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')) {
@@ -353,10 +353,10 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
                     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();
             }
 
@@ -369,11 +369,11 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
         } 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;
             }
         }
index df6c34b..0742903 100644 (file)
@@ -50,7 +50,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain
              * 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);
@@ -114,7 +114,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain
 
         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
             )
index c4a677f..5abd83f 100644 (file)
@@ -16,7 +16,7 @@ class IMP_Horde_Mime_Viewer_Smil extends Horde_Mime_Viewer_Smil
     /**
      * 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.
      */
index b0668cd..c18b8ba 100644 (file)
@@ -115,7 +115,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
                 '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()
@@ -126,12 +126,12 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
         /* 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;
         }
 
@@ -146,7 +146,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
                 // 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;
@@ -223,7 +223,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
                 '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()
@@ -233,7 +233,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
         $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;
         }
 
@@ -250,19 +250,19 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
                 $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;
@@ -281,7 +281,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
 
         $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. */
@@ -289,7 +289,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
             $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)) {
@@ -309,7 +309,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
             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>';
             }
         }
 
index 73f3025..c4fe0a6 100644 (file)
@@ -90,15 +90,15 @@ class IMP_Horde_Mime_Viewer_Status extends Horde_Mime_Viewer_Driver
         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':
@@ -106,15 +106,15 @@ class IMP_Horde_Mime_Viewer_Status extends Horde_Mime_Viewer_Driver
         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;
         }
 
@@ -124,13 +124,13 @@ class IMP_Horde_Mime_Viewer_Status extends Horde_Mime_Viewer_Driver
         /* 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'];
         }
index 997697b..220d1ae 100644 (file)
@@ -89,11 +89,11 @@ class IMP_Horde_Mime_Viewer_Tnef extends Horde_Mime_Viewer_Tnef
 
         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);
@@ -110,8 +110,8 @@ class IMP_Horde_Mime_Viewer_Tnef extends Horde_Mime_Viewer_Tnef
                 }
                 $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:') . '&nbsp;&nbsp;' . $link . '&nbsp;&nbsp;(' . $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:") . '&nbsp;&nbsp;' . $link . '&nbsp;&nbsp;(' . $data['type'] . '/' . $data['subtype'] . ")<br />\n";
             }
         }
 
index 3c26904..281548f 100644 (file)
@@ -86,7 +86,7 @@ class IMP_Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Zip
              ($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('&nbsp;', ' ', $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('&nbsp;', ' ', $name)), 'class' => 'fixed', 'params' => array('zip_attachment' => urlencode($key) + 1))), $val['name']);
         }
 
         return $val;
index 7e208e4..6355ba6 100644 (file)
@@ -31,9 +31,9 @@ class IMP_Notification_Listener_Status extends Horde_Notification_Listener_Statu
 
         $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"));
     }
 
     /**
index 32f2212..c5e1a6a 100644 (file)
@@ -49,7 +49,7 @@ class IMP_Quota
         $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];
@@ -116,17 +116,17 @@ class IMP_Quota
         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")
+       );
     }
 
     /**
index 09a2700..8153ff8 100644 (file)
@@ -80,13 +80,13 @@ class IMP_Quota_Command extends IMP_Quota
         $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');
     }
 
 }
index a156a75..7386f70 100644 (file)
@@ -34,7 +34,7 @@ class IMP_Quota_Hook extends IMP_Quota
 
         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]);
index 5f3795d..55d6ba7 100644 (file)
@@ -25,7 +25,7 @@ class IMP_Quota_Imap extends IMP_Quota
         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);
index b4368b5..d8e2d59 100644 (file)
@@ -66,7 +66,7 @@ class IMP_Quota_Logfile extends IMP_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']);
@@ -76,7 +76,7 @@ class IMP_Quota_Logfile extends IMP_Quota
 
         $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']));
index 2aab91d..3a30788 100644 (file)
@@ -62,7 +62,7 @@ class IMP_Quota_Maildir extends IMP_Quota
 
         // 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.
index 678f3db..6fc13c4 100644 (file)
@@ -42,7 +42,7 @@ class IMP_Quota_Mdaemon extends IMP_Quota
             }
         }
 
-        throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+        throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
     }
 
     /**
@@ -58,11 +58,9 @@ class IMP_Quota_Mdaemon extends IMP_Quota
     {
         $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;
index 522c633..5e55aae 100644 (file)
@@ -65,7 +65,7 @@ class IMP_Quota_Mercury32 extends IMP_Quota
             }
         }
 
-        throw new Horde_Exception(_('Unable to retrieve quota'), 'horde.error');
+        throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
     }
 
 }
index 9fc944e..a0a44d3 100644 (file)
@@ -66,7 +66,7 @@ class IMP_Quota_Sql extends IMP_Quota
                                  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."));
         }
     }
 
index 61f0e55..7a113c1 100644 (file)
@@ -81,7 +81,7 @@ class IMP_Search
      * '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']);
@@ -368,7 +368,7 @@ class IMP_Search
 
         $query = new Horde_Imap_Client_Search_Query();
         $query->flag('\\deleted', true);
-        $label = _('Virtual Trash');
+        $label = _("Virtual Trash");
 
         $this->_saveVFolder = false;
         if (empty($vtrash_id)) {
@@ -422,7 +422,7 @@ class IMP_Search
         $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)) {
@@ -551,7 +551,7 @@ class IMP_Search
         $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])) {
@@ -559,7 +559,7 @@ class IMP_Search
                 } 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:
@@ -567,15 +567,15 @@ class IMP_Search
                         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']);
     }
 
     /**
@@ -619,7 +619,7 @@ class IMP_Search
      */
     static public function isSearchMbox($id)
     {
-        return (strpos($id, '\0') !== false);
+        return (strpos($id, "\0") !== false);
     }
 
     /**
@@ -678,7 +678,7 @@ class IMP_Search
      */
     public function createSearchID($id)
     {
-        return 'impsearch\0' . $this->_strip($id);
+        return 'impsearch' . "\0" . $this->_strip($id);
     }
 
     /**
@@ -690,64 +690,64 @@ class IMP_Search
     {
         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
             ),
@@ -764,42 +764,42 @@ class IMP_Search
         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
             ),
         );
index 427de1f..3cd71c1 100644 (file)
@@ -95,7 +95,7 @@ class IMP_Sentmail
      * @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)
index 3cc95e9..93eb065 100644 (file)
@@ -59,7 +59,7 @@ class IMP_Spam
                     $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,
@@ -130,7 +130,7 @@ class IMP_Spam
                     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 {
@@ -158,17 +158,17 @@ class IMP_Spam
 
             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');
 
@@ -184,9 +184,9 @@ class IMP_Spam
                         $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');
                         }
                     }
                 }
@@ -199,7 +199,7 @@ class IMP_Spam
                         $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;
index 3bbd704..a72da07 100644 (file)
@@ -20,7 +20,7 @@ class IMP_UI_Compose
         $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;
@@ -68,7 +68,7 @@ class IMP_UI_Compose
             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);
 
@@ -84,7 +84,9 @@ class IMP_UI_Compose
     {
         $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;
         }
 
@@ -115,10 +117,10 @@ class IMP_UI_Compose
             '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")
             )
         );
 
@@ -141,9 +143,9 @@ class IMP_UI_Compose
                 $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);
             }
         }
 
index 7c5b192..22f489d 100644 (file)
@@ -62,7 +62,7 @@ class IMP_UI_Mailbox
         $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;
         }
@@ -75,7 +75,7 @@ class IMP_UI_Mailbox
         $from = reset($from);
 
         if (empty($from)) {
-            $ret['from'] = _('Invalid Address');
+            $ret['from'] = _("Invalid Address");
             $ret['error'] = true;
         } else {
             $identity = Identity::singleton(array('imp', 'imp'));
@@ -83,13 +83,13 @@ class IMP_UI_Mailbox
                 /* 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'])
@@ -101,7 +101,7 @@ class IMP_UI_Mailbox
                     }
                 }
                 if (!$this->_cache['drafts_sm_folder']) {
-                    $ret['from'] = _('To') . ': ' . $ret['from'];
+                    $ret['from'] = _("To") . ': ' . $ret['from'];
                 }
                 $ret['to'] = true;
             } else {
@@ -109,7 +109,7 @@ class IMP_UI_Mailbox
                     ? $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'];
@@ -154,8 +154,8 @@ class IMP_UI_Mailbox
         $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']));
     }
 
     /**
@@ -209,12 +209,12 @@ class IMP_UI_Mailbox
         } 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');
@@ -241,10 +241,10 @@ class IMP_UI_Mailbox
     {
         $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));
index 855f5a1..d6300a8 100644 (file)
@@ -21,13 +21,13 @@ class IMP_UI_Message
     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")
         );
     }
 
@@ -66,7 +66,7 @@ class IMP_UI_Message
      *
      * @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)) {
@@ -83,8 +83,8 @@ class IMP_UI_Message
         $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']) ||
@@ -166,7 +166,7 @@ class IMP_UI_Message
         }
 
         /* Else, it's today, use the time only. */
-        return sprintf(_('Today, %s %s'), $time_str, $tz);
+        return sprintf(_("Today, %s %s"), $time_str, $tz);
     }
 
     /**
@@ -203,18 +203,18 @@ class IMP_UI_Message
         $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. */
@@ -340,15 +340,15 @@ class IMP_UI_Message
                         : 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;
@@ -368,15 +368,15 @@ class IMP_UI_Message
                  * 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>';
                     }
                 }
 
@@ -391,7 +391,7 @@ class IMP_UI_Message
         /* 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);
@@ -400,8 +400,8 @@ class IMP_UI_Message
                 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>';
             }
index c5647b4..b1e1f1a 100644 (file)
@@ -19,7 +19,7 @@ class IMP_Views_ListMessages
      *
      * @return array  TODO
      */
-    public function listMessages($args)
+    public function ListMessages($args)
     {
         $mbox = $args['mbox'];
         $is_search = false;
@@ -34,7 +34,7 @@ class IMP_Views_ListMessages
             $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;
         }
 
@@ -119,7 +119,7 @@ class IMP_Views_ListMessages
         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();
index a3f00eb..44e2213 100644 (file)
@@ -94,7 +94,7 @@ class IMP_Views_ShowMessage
         $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,
@@ -150,7 +150,7 @@ class IMP_Views_ShowMessage
                 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]);
@@ -200,7 +200,7 @@ class IMP_Views_ShowMessage
             $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 {
@@ -218,7 +218,7 @@ class IMP_Views_ShowMessage
         /* 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) {
@@ -248,8 +248,8 @@ class IMP_Views_ShowMessage
         }
 
         /* 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
@@ -300,15 +300,15 @@ class IMP_Views_ShowMessage
         }
 
         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>'
                 : '';
         }
 
index c22d7b8..ee2741e 100644 (file)
@@ -179,10 +179,10 @@ function _imp_perms()
              ),
         ),
         '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',
@@ -213,15 +213,15 @@ function _imp_authCredentials()
 
     $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)
@@ -543,10 +543,10 @@ function _imp_cacheOutput($params)
         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'
             );
index c6178df..ff61da2 100644 (file)
@@ -213,7 +213,7 @@ function prefs_callback()
         $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')) {
@@ -262,7 +262,7 @@ case 'flags':
     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;
 }
index e087d5f..9316ee6 100644 (file)
@@ -150,7 +150,7 @@ if (!$logout_reason && IMP_Session::canAutoLogin($server_key, $autologin)) {
     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');
@@ -204,17 +204,17 @@ if (!empty($conf['user']['select_view'])) {
         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")
         )
     );
 
@@ -228,7 +228,7 @@ if ($browser->isMobile()) {
 
     /* 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']);
         }
@@ -237,7 +237,7 @@ if ($browser->isMobile()) {
     /* 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']);
@@ -246,7 +246,7 @@ if ($browser->isMobile()) {
 
     /* 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']);
         }
@@ -283,7 +283,7 @@ $t->set('extra_hidden', $extra_hidden);
 
 $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'));
@@ -324,11 +324,11 @@ if ($t->get('select_view')) {
 }
 
 $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'));
 }
 
index bbbdbad..da836af 100644 (file)
@@ -32,7 +32,7 @@ $actionID = Horde_Util::getFormData('a');
 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
@@ -59,12 +59,12 @@ $pageOb = $imp_mailbox->buildMailboxPage(Horde_Util::getFormData('p'), Horde_Uti
 /* 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. */
@@ -143,21 +143,21 @@ while (list(,$ob) = each($mbox_info['overview'])) {
 }
 
 $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']) {
@@ -168,10 +168,10 @@ foreach ($sort_list as $key => $val) {
         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) {
@@ -183,7 +183,7 @@ foreach ($sort_list as $key => $val) {
 }
 
 /* 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) {
index 45c45a4..b7998c9 100644 (file)
@@ -12,7 +12,7 @@
  * @author  Michael Slusarz <slusarz@horde.org>
  */
 
-function _outputSummaries($msgs)
+function _outputSummaries($msgs, $mbox)
 {
     static $template;
 
@@ -131,7 +131,7 @@ case 'notspam_report':
     break;
 
 case 'message_missing':
-    $notification->push(_('Requested message not found.'), 'horde.error');
+    $notification->push(_("Requested message not found."), 'horde.error');
     break;
 
 case 'fwd_digest':
@@ -234,7 +234,7 @@ if ($do_filter) {
 
 /* 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. */
@@ -257,7 +257,7 @@ $sortpref = IMP::getSort($imp_mbox['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;
 }
@@ -274,9 +274,9 @@ if (!$prefs->getValue('use_trash') &&
 }
 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) {
@@ -285,9 +285,9 @@ 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. */
@@ -298,9 +298,9 @@ if ($pageOb['pagecount']) {
         $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']) {
@@ -308,9 +308,9 @@ if ($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>';
     }
 }
 
@@ -373,11 +373,11 @@ if ($prefs->getValue('nav_popup') || $prefs->getValue('nav_audio')) {
 }
 
 $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) {
@@ -387,8 +387,8 @@ 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>';
     }
@@ -437,26 +437,26 @@ $hdr_template = new Horde_Template();
 $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)) {
@@ -466,7 +466,7 @@ if ($_SESSION['imp']['protocol'] != 'pop') {
 }
 $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');
@@ -479,7 +479,7 @@ if (empty($pageOb['end'])) {
         $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');
     }
@@ -512,8 +512,8 @@ if ($pageOb['msgcount']) {
         $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);
         }
     }
@@ -538,11 +538,11 @@ if ($pageOb['msgcount']) {
         $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']) {
@@ -550,34 +550,34 @@ if ($pageOb['msgcount']) {
         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');
 }
@@ -601,38 +601,38 @@ if ($pageOb['msgcount']) {
     $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%'
         )
     );
@@ -681,7 +681,7 @@ if ($pageOb['msgcount']) {
     /* 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']));
@@ -707,11 +707,11 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     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();
             }
@@ -791,7 +791,7 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     /* 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']));
@@ -807,7 +807,7 @@ while (list(,$ob) = each($mbox_info['overview'])) {
             if (Horde_String::length($ptext) > $maxlen) {
                 $ptext = Horde_String::substr($ptext, 0, $maxlen) . ' ...';
             } elseif (empty($ob['previewcut'])) {
-                $ptext .= '[[' . _('END') . ']]';
+                $ptext .= '[[' . _("END") . ']]';
             }
         }
         $msg['preview'] = $ptext;
@@ -820,7 +820,7 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     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;
 
@@ -858,7 +858,7 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     $msgs[$ob['uid']] = $msg;
 }
 
-_outputSummaries($msgs);
+_outputSummaries($msgs, $lastMbox);
 
 /* Prepare the message footers template. */
 $mf_template = new Horde_Template();
index cd7a4eb..f96f2fb 100644 (file)
@@ -132,18 +132,18 @@ $atc_id = Horde_Util::getFormData('atc');
 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;
@@ -186,7 +186,7 @@ if (($subject = $mime_headers->getValue('subject'))) {
         $subject = Horde_String::substr($subject, 0, $conf['mimp']['mailbox']['max_subj_chars']) . '...';
     }
 } else {
-    $subject = _('[No Subject]');
+    $subject = _("[No Subject]");
 }
 $display_headers['subject'] = $subject;
 
@@ -198,7 +198,7 @@ $xpriority = $mime_headers->getValue('x-priority');
 switch ($imp_ui->getXpriority($xpriority)) {
 case 'high':
 case 'low':
-    $basic_headers['priority'] = _('Priority');
+    $basic_headers['priority'] = _("Priority");
     $display_headers['priority'] = $xpriority;
     break;
 }
@@ -289,20 +289,20 @@ if ($prefs->getValue('mimp_preview_msg') &&
     !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')))));
     }
 }
 
@@ -314,18 +314,18 @@ $compose_params = array(
 
 /* 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) {
@@ -333,20 +333,20 @@ 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'));
@@ -367,7 +367,7 @@ foreach ($display_headers as $head => $val) {
     }
     $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);
@@ -375,7 +375,7 @@ foreach ($display_headers as $head => $val) {
 
 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 {
index f34620e..8acb828 100644 (file)
@@ -163,7 +163,7 @@ case 'flag_message':
 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');
     }
@@ -288,27 +288,27 @@ foreach (array('to', 'cc', 'bcc') as $val) {
 /* 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>&nbsp;' . $xpriority;
+    $basic_headers['priority'] = _("Priority");
+    $display_headers['priority'] = '<div class="msgflags flagHighpriority" title="' . htmlspecialchars(_("High Priority")) . '"></div>' . '&nbsp;' . $xpriority;
     break;
 
 case 'low':
-    $basic_headers['priority'] = _('Priority');
-    $display_headers['priority'] = '<div class="msgflags flagLowpriority" title="' . htmlspecialchars(_('Low Priority')) . '"></div>&nbsp;' . $xpriority;
+    $basic_headers['priority'] = _("Priority");
+    $display_headers['priority'] = '<div class="msgflags flagLowpriority" title="' . htmlspecialchars(_("Low Priority")) . '"></div>' . '&nbsp;' . $xpriority;
     break;
 }
 
@@ -428,8 +428,8 @@ if (!IMP::$printMode) {
     $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&nbsp;of&nbsp;%d)'), $msgindex, $imp_mailbox->getMessageCount()));
+    $t_template->set('label', sprintf(_("%s: %s"), $header_label, $shortsub));
+    $t_template->set('msg_count', sprintf(_("(%d&nbsp;of&nbsp;%d)"), $msgindex, $imp_mailbox->getMessageCount()));
     $t_template->set('status', $status);
     $t_template->set('message_token', $message_token);
 
@@ -448,24 +448,24 @@ if (!IMP::$printMode) {
         $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')));
@@ -482,45 +482,45 @@ if (!IMP::$printMode) {
 
     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 &&
@@ -528,38 +528,38 @@ if (!IMP::$printMode) {
          (!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));
     }
 }
 
@@ -593,8 +593,8 @@ $msgtext = '';
 
 /* 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'));
@@ -668,22 +668,22 @@ foreach ($parts_list as $mime_id => $mime_type) {
 }
 
 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));
         }
     }
 }
@@ -712,11 +712,11 @@ if (!empty($atc_parts) && ($show_parts != 'none')) {
         $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);
index e0cf202..94553c9 100644 (file)
@@ -22,7 +22,7 @@ function _printKeyInfo($key = '')
 
 function _importKeyDialog($target)
 {
-    $title = _('Import PGP Key');
+    $title = _("Import PGP Key");
     require IMP_TEMPLATES . '/common-header.inc';
     IMP::status();
 
@@ -46,7 +46,7 @@ function _getImportKey()
         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 {
@@ -88,15 +88,15 @@ case 'generate_key':
     $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);
         }
@@ -105,7 +105,7 @@ case 'generate_key':
 
 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':
@@ -115,7 +115,7 @@ 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 {
@@ -123,7 +123,7 @@ case 'process_import_public_key':
         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) {
@@ -148,20 +148,20 @@ case 'process_import_personal_public_key':
                 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) {
@@ -170,7 +170,7 @@ case 'process_import_personal_public_key':
         }
     } 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;
@@ -185,12 +185,12 @@ case 'process_import_personal_private_key':
                 /* 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) {
@@ -199,7 +199,7 @@ case 'process_import_personal_private_key':
         }
     } 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;
@@ -237,7 +237,7 @@ case 'info_personal_private_key':
 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);
     }
@@ -248,7 +248,7 @@ case 'save_options':
     $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':
@@ -270,13 +270,13 @@ 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);
     }
@@ -333,9 +333,9 @@ if ($prefs->getValue('use_pgp')) {
             $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);
@@ -356,16 +356,16 @@ if ($prefs->getValue('use_pgp')) {
     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'));
@@ -376,7 +376,7 @@ if ($prefs->getValue('use_pgp')) {
             $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'));
         }
@@ -385,7 +385,7 @@ if ($prefs->getValue('use_pgp')) {
 } 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'));
     }
 }
index 1324dae..9a9b512 100644 (file)
@@ -78,8 +78,8 @@ if (!empty($ids)) {
 }
 
 $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());
index e0f3cfe..d0f8251 100644 (file)
@@ -42,12 +42,12 @@ $t->setOption('gettext', true);
 $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');
index b81b0af..0ae8421 100644 (file)
@@ -20,7 +20,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 /* 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;
 }
@@ -42,7 +42,7 @@ if (Horde_Util::getFormData('no_match')) {
 } 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;
         }
@@ -87,15 +87,15 @@ case 'do_search':
     /* 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. */
@@ -149,11 +149,11 @@ $t->set('shown', htmlspecialchars($shown));
 $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',
@@ -164,9 +164,9 @@ if (!$edit_query_vfolder) {
 }
 $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)) {
@@ -259,7 +259,7 @@ for ($i = 0; $i <= $search['field_end']; $i++) {
                     $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) {
@@ -276,8 +276,8 @@ for ($i = 0; $i <= $search['field_end']; $i++) {
                 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'));
                 }
             }
         }
@@ -285,7 +285,7 @@ for ($i = 0; $i <= $search['field_end']; $i++) {
 }
 $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);
@@ -335,7 +335,7 @@ if (empty($search['mbox'])) {
     $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);
index 549759d..db011bf 100644 (file)
@@ -12,7 +12,7 @@
 
 function _importKeyDialog($target)
 {
-    $title = _('Import S/MIME Key');
+    $title = _("Import S/MIME Key");
     require IMP_TEMPLATES . '/common-header.inc';
     IMP::status();
 
@@ -35,7 +35,7 @@ function _getImportKey()
         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 {
@@ -71,7 +71,7 @@ function _printKeyInfo($cert)
 {
     $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);
     }
@@ -88,13 +88,13 @@ $actionID = Horde_Util::getFormData('actionID');
 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);
     }
@@ -107,14 +107,14 @@ case 'import_public_key':
 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');
@@ -155,16 +155,16 @@ case 'import_personal_certs':
 
 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');
         }
@@ -184,21 +184,21 @@ case 'save_attachment_public_key':
         $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;
 }
 
@@ -251,9 +251,9 @@ if ($openssl_check && $prefs->getValue('use_smime')) {
             $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);
@@ -274,12 +274,12 @@ if ($openssl_check && $prefs->getValue('use_smime')) {
     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'));
@@ -289,7 +289,7 @@ if ($openssl_check && $prefs->getValue('use_smime')) {
 } 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));
index 290e194..e05c19d 100644 (file)
@@ -65,7 +65,7 @@ case 'update':
     } 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;
         }
@@ -75,10 +75,10 @@ case 'update':
         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;
@@ -112,21 +112,21 @@ foreach ($stationery_list as $key => $choice) {
     $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) {
index c11c2bc..3a7c6ed 100644 (file)
@@ -11,7 +11,7 @@ echo ((!empty($ie_clientcaps)) ? ' xmlns:IE>' : '>') . '<head>';
 $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();
index 9ef7925..eb10979 100644 (file)
@@ -21,55 +21,55 @@ $code = array(
     /* 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."),
     )
 );
 
index 1a5116d..6dbc75f 100644 (file)
@@ -86,41 +86,41 @@ $code['conf'] = array_filter(array(
 
 /* 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) {
@@ -145,15 +145,15 @@ 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..."),
     );
 }
 
index 090b027..88afcc9 100644 (file)
@@ -6,7 +6,7 @@ $c = &$m->add(new Horde_Mobile_card());
 
 $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: ")));
index 63d3fd3..48a00ba 100644 (file)
@@ -48,16 +48,16 @@ function _doConnectionTest()
         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) {
@@ -78,9 +78,9 @@ function _doConnectionTest()
         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";
             }
@@ -94,7 +94,7 @@ function _doConnectionTest()
 
 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 />';
 }
 
index f4ac1d1..f44203c 100644 (file)
@@ -50,7 +50,7 @@ switch ($actionID) {
 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);
     }
@@ -95,7 +95,7 @@ foreach ($loop_array as $mbox => $idxlist) {
             $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;
 
@@ -104,8 +104,8 @@ foreach ($loop_array as $mbox => $idxlist) {
 
         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);
@@ -122,12 +122,12 @@ foreach ($loop_array as $mbox => $idxlist) {
 
         /* 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 . ')';
@@ -145,7 +145,7 @@ $template = new Horde_Template();
 $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),
@@ -157,14 +157,14 @@ if ($mode == 'thread') {
             $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();
index 39b96ce..d5c4665 100644 (file)
@@ -91,7 +91,7 @@ case 'download_all':
     $headers = $contents->getHeaderOb();
     $zipfile = _sanitizeName($headers->getValue('subject'));
     if (empty($zipfile)) {
-        $zipfile = _('attachments.zip');
+        $zipfile = _("attachments.zip");
     } else {
         $zipfile .= '.zip';
     }
@@ -101,7 +101,7 @@ case 'download_all':
         $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);
     }
@@ -122,7 +122,7 @@ case 'download_render':
     case 'download_attach':
         $mime = $contents->getMIMEPart($id);
         if (!$name = $mime->getName(true)) {
-            $name = _('unnamed');
+           $name = _("unnamed");
         }
 
         /* Compress output? */
@@ -144,7 +144,7 @@ case 'download_render':
         $body = $render[$key]['data'];
         $type = $render[$key]['type'];
         if (!$name = $render[$key]['name']) {
-            $name = _('unnamed');
+           $name = _("unnamed");
         }
         break;
     }