From f4991a86020439c84d6ccd6be11c599fe10d4011 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Sat, 29 Jul 2000 13:03:00 +0000 Subject: [PATCH] fixed a few more links to make them search-aware fixed a few typos in translating_help.txt git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@648 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- doc/translating_help.txt | 5 ++--- functions/mime.php | 8 +++++++- src/download.php | 8 +++++++- src/read_body.php | 42 ++++++++++++++++++++++++++++++++++------ 4 files changed, 52 insertions(+), 11 deletions(-) diff --git a/doc/translating_help.txt b/doc/translating_help.txt index 435ae63e..ccc1f30d 100644 --- a/doc/translating_help.txt +++ b/doc/translating_help.txt @@ -9,8 +9,7 @@ The help files, at this point, are devided into functional areas. Each .hlp file represents a different functional block of how the program looks to the user. -I put each sentance on a line of its own because I thought it might make -it easier to translate. Hopefully as SquirrelMail is more widely used, +Hopefully as SquirrelMail is more widely used, non-english translations will be used to make other non-english translations. You might want to keep this in mind when writing yours. Remember that these will be used all over the world and in many different environments so local language @@ -58,7 +57,7 @@ To translate, just copy all the .hlp files from help/en into your new directory that you created for this language (i.e. help/pl). You only need to translate what is inbetween the tags. Do not translate the actual tags such as or . The tag names need to remain in English. You should only translate -the test between tags. +the text between tags. Often there may be other HTML tags such as for bold or to make a link. If you see any of these tags, just leave them and don't translate diff --git a/functions/mime.php b/functions/mime.php index ce634671..2e559fbb 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -464,6 +464,7 @@ // A recursive function that returns a list of attachments with links // to where to download these attachments function formatAttachments ($message, $ent_id, $mailbox, $id) { + global $where, $what; if ($message) { if (!$message->entities) { $type0 = strtolower($message->header->type0); @@ -479,7 +480,12 @@ $urlMailbox = urlencode($mailbox); $ent = urlencode($message->header->entity_id); - $body .= "   " . $display_filename . "  (TYPE: $type0/$type1)"; + if ($where && $what) { + // from a search + $body .= "   " . $display_filename . "  (TYPE: $type0/$type1)"; + } else { + $body .= "   " . $display_filename . "  (TYPE: $type0/$type1)"; + } if ($message->header->description) $body .= "  " . htmlspecialchars($message->header->description).""; $body .= " ("._("download").")\n"; diff --git a/src/download.php b/src/download.php index c754caf0..9f60f343 100644 --- a/src/download.php +++ b/src/download.php @@ -27,12 +27,18 @@ include("../src/load_prefs.php"); function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at) { + global $where, $what; displayPageHeader($color, "None"); echo "
"; echo "
"; echo _("Viewing a text attachment") . " - "; - echo "". _("View message") . ""; + if ($where && $what) { + // from a search + echo "". _("View message") . ""; + } else { + echo "". _("View message") . ""; + } echo "
"; echo "
"; $urlmailbox = urlencode($mailbox); diff --git a/src/read_body.php b/src/read_body.php index 1a7c4c24..11829d6f 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -36,7 +36,12 @@ echo "
"; echo "\n"; echo "
" . _("Viewing full header") . " - "; - echo ""; + if ($where && $what) { + // Got here from a search + echo ""; + } else { + echo ""; + } echo ""._("View message") . "
\n"; echo "\n"; echo "\n"; - echo " "; + if ($where && $what) { + // Got here from a search + echo " "; + } else { + echo " "; + } echo " \n"; /** from **/ echo " \n"; -- 2.25.1
";
@@ -141,11 +146,21 @@
       if (count($to_ary) > 1) {
          if ($show_more == false) {
             if ($i == 1) {
-               $to_string = "$to_string ($echo_more)";
+               if ($where && $what) {
+                  // from a search
+                  $to_string = "$to_string ($echo_more)";
+               } else {
+                  $to_string = "$to_string ($echo_more)";
+               }   
                $i = count($to_ary);
             }
          } else if ($i == 1) {
-            $to_string = "$to_string ($echo_less)";
+            if ($where && $what) {
+               // from a search
+               $to_string = "$to_string ($echo_less)";
+            } else {
+               $to_string = "$to_string ($echo_less)";
+            }
          }
       }
    }
@@ -165,11 +180,21 @@
       if (count($cc_ary) > 1) {
          if ($show_more_cc == false) {
             if ($i == 1) {
-               $cc_string = "$cc_string ($echo_more)";
+               if ($where && $what) {
+                  // from a search
+                  $cc_string = "$cc_string ($echo_more)";
+               } else {
+                  $cc_string = "$cc_string ($echo_more)";
+               }   
                $i = count($cc_ary);
             }
          } else if ($i == 1) {
-            $cc_string = "$cc_string ($echo_less)";
+            if ($where && $what) {
+               // from a search
+               $cc_string = "$cc_string ($echo_less)";
+            } else {
+               $cc_string = "$cc_string ($echo_less)";
+            }   
          }
       }
    }
@@ -245,7 +270,12 @@
    echo "         
\n"; echo " $subject\n"; echo " " . _("View full header") . "  " . _("View full header") . "  " . _("View full header") . "