Converting strings to gettext
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 24 Oct 2003 16:31:09 +0000 (16:31 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 24 Oct 2003 16:31:09 +0000 (16:31 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6011 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/bug_report/bug_report.php
plugins/spamcop/options.php

index f05637617414a76c56ee0c8c27acb80c5fcbffed..a4e997a7fe8d0f61e6ed30303a92f2a0d965bdae 100644 (file)
@@ -126,50 +126,52 @@ $body = htmlspecialchars($body_top . $body);
 
 ?>
    <br>
-   <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
-      <center><b>Submit a Bug Report</b></center>
-   </td></tr></table>
-
-   <?PHP echo $warning_html; ?>
-
-   <p><font size="+1">Before you send your bug report</font>, please make sure to
-   check this checklist for any common problems.</p>
-
-   <ul>
-   <li>Make sure that you are running the most recent copy of
-     <a href="http://www.squirrelmail.org/">SquirrelMail</a>.  You are currently
-     using version <?PHP echo $version ?>.</li>
-   <li>Check to see if you bug is already listed in the
-   <a href="http://sourceforge.net/bugs/?group_id=311">Bug List</a> on SourceForge.
-   If it is, we already know about it and are trying to fix it.</li>
-   <li>Try to make sure that you can repeat it.  If the bug happens
-     sporatically, try to document what you did when it happened.  If it
-     always occurs when you view a specific message, keep that message around
-     so maybe we can see it.</li>
-   <li>If there were warnings displayed above, try to resolve them yourself.
-     Read the guides in the <tt>doc/</tt> directory where SquirrelMail was
-     installed.</li>
-   </ul>
-
-   <p>Pressing the button below will start a mail message to the developers
-   of SquirrelMail that will contain a lot of information about your system,
-   your browser, how SquirrelMail is set up, and your IMAP server.  It will
-   also prompt you for information.  Just fill out the sections at the top.
-   If you like, you can scroll down in the message to see what else is being
-   sent.</p>
-
-   <p>Please make sure to fill out as much information as you possibly can to
-   give everyone a good chance of finding and removing the bug.  Submitting
-   your bug like this will not have it automatically added to the bug list on
-   SourceForge, but someone who gets your message may add it for you.</p>
-
+   <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr>
+      <?php echo html_tag('td',"<b>"._("Submit a Bug Report")."</b>",'center',$color[0]); ?>
+   </tr></table>
+
+   <?PHP echo $warning_html; 
+
+   echo "<p><font size=\"+1\">";
+   echo _("Before you send your bug report, please make sure to check this checklist for any common problems.");
+   echo "</font></p>";
+
+   echo "<ul>";
+   echo "<li>";
+   echo _("Make sure that you are running the most recent copy of <a href=\"http://www.squirrelmail.org/\">SquirrelMail</a>.");
+   echo sprintf(_("You are currently using version %s."),$version);
+   echo "</li>\n";
+
+   echo "<li>";
+   echo _("Check to see if you bug is already listed in the <a href=\"http://sourceforge.net/bugs/?group_id=311\">Bug List</a> on SourceForge. If it is, we already know about it and are trying to fix it.");
+   echo "</li>\n";
+   
+   echo "<li>";
+   echo _("Try to make sure that you can repeat it. If the bug happens sporatically, try to document what you did when it happened. If it always occurs when you view a specific message, keep that message around so maybe we can see it.");
+   echo "</li>\n";
+
+   echo "<li>";
+   echo _("If there were warnings displayed above, try to resolve them yourself. Read the guides in the <tt>doc/</tt> directory where SquirrelMail was installed.");
+   echo "</li>\n";
+   echo "</ul>\n";
+
+   echo "<p>";
+   echo _("Pressing the button below will start a mail message to the developers of SquirrelMail that will contain a lot of information about your system, your browser, how SquirrelMail is set up, and your IMAP server. It will also prompt you for information. Just fill out the sections at the top. If you like, you can scroll down in the message to see what else is being sent.");
+   echo "</p>\n";
+
+   echo "<p>";
+   echo _("Please make sure to fill out as much information as you possibly can to give everyone a good chance of finding and removing the bug. Submitting your bug like this will not have it automatically added to the bug list on SourceForge, but someone who gets your message may add it for you.");
+   echo "</p>\n";
+?>
    <form action="../../src/compose.php" method=post>
    <table align=center border=0>
    <tr>
      <td>
-       This bug involves: <select name="send_to">
-         <option value="squirrelmail-users@lists.sourceforge.net">the general program</option>
-         <option value="squirrelmail-plugins@lists.sourceforge.net">a specific plugin</option>
+       <?php echo _("This bug involves"); ?>: <select name="send_to">
+         <option value="squirrelmail-users@lists.sourceforge.net">
+        <?php echo _("the general program"); ?></option>
+         <option value="squirrelmail-plugins@lists.sourceforge.net">
+        <?php echo _("a specific plugin"); ?></option>
        </select>
      </td>
    </tr>
@@ -179,7 +181,7 @@ $body = htmlspecialchars($body_top . $body);
        <input type="hidden" name="send_to_bcc" value="">
        <input type="hidden" name="subject" value="Bug Report">
        <input type="hidden" name="body" value="<?PHP echo $body ?>">
-       <input type="submit" value="Start Bug Report Form">
+       <input type="submit" value="<?php echo _("Start Bug Report Form"); ?>">
      </td>
    </tr>
    </table>
index 430319f79e570ad50c480329516bb47b5f6752ad..d264cf933d4e47d232fd020a93012f7df65b9289 100755 (executable)
 define('SM_PATH','../../');
 require_once(SM_PATH . 'include/validate.php');
 
+function spamcop_enable_disable($option,$disable_action,$enable_action) {
+    if ($option) { 
+       $ret= _("Enabled") . "(<a href=\"options.php?action=$disable_action\">" . _("Disable it") . "</a>)\n";
+    } else {
+       $ret = _("Disabled") . "(<a href=\"options.php?action=$enable_action\">" . _("Enable it") . "</a>)\n";
+    }
+    return $ret;
+}
+
 displayPageHeader($color, 'None');
    
 /* globals */
@@ -59,57 +68,64 @@ spamcop_load();
       <br />
       <table width="95%" align="center" border="0" cellpadding="2" cellspacing="0">
       <tr><td bgcolor="<?php echo $color[0]; ?>">
-         <center><b><?php echo _("Options"); ?> - Message Filtering</b></center>
+         <center><b><?php echo _("Options") . " - " . _("Spam reporting"); ?></b></center>
       </td></tr></table>
       <br />
       
       <table align="center">
         <tr>
-         <td align="right">SpamCop link is:</td>
-         <td><?php if ($spamcop_enabled) { 
-         ?>Enabled (<a href="options.php?action=disable">Disable it</a>)
-         <?PHP } else {
-         ?>Disabled (<a href="options.php?action=enable">Enable it</a>)
-         <?PHP }
-         ?></td>
+         <?php
+         echo html_tag('td',_("SpamCop link is:"),'right');
+         echo html_tag('td', spamcop_enable_disable($spamcop_enabled,'disable','enable') );
+         ?>
        </tr>
         <tr>
-         <td align="right" valign="top">Delete spam when reported:<br />
-           <font size="-2">(Only works with email-based reporting)</font>
-         </td>
-         <td valign="top"><?php if ($spamcop_delete) { 
-         ?>Enabled (<a href="options.php?action=save">Disable it</a>)
-         <?php } else {
-         ?>Disabled (<a href="options.php?action=delete">Enable it</a>)
-         <?php }
-         ?></td>
+         <?php
+         echo html_tag('td',_("Delete spam when reported:") . "<br />\n" .
+         '<font size="-2">(' . _("Only works with email-based reporting") . ')</font>',
+         'right','','valign="top"');
+         echo html_tag('td', spamcop_enable_disable($spamcop_delete,'save','delete'),'','','valign="top"');
+         ?>
        </tr>
        <tr>
-         <td align="right">Spam Reporting Method:</td>
-         <form method="post" action="options.php"><td>
+         <?php
+         echo html_tag('td',_("Spam Reporting Method:"),'right');
+         ?>
+         <form method="post" action="options.php">
+         <td>
            <select name="meth">
-             <option value="quick_email"<?php
-               if ($spamcop_method == 'quick_email') echo ' selected'
-               ?>>Quick email-based reporting</option>
-             <option value="thorough_email"<?php
-               if ($spamcop_method == 'thorough_email') echo ' selected'
-               ?>>Thorough email-based reporting</option>
-             <option value="web_form"<?php
-               if ($spamcop_method == 'web_form') echo ' selected'
-               ?>>Web-based form</option>
+             <option value="quick_email"
+               <?php
+                 if ($spamcop_method == 'quick_email') echo ' selected';
+                 echo ">"._("Quick email-based reporting");
+               ?>
+             </option>
+             <option value="thorough_email"
+               <?php
+                 if ($spamcop_method == 'thorough_email') echo ' selected';
+                 echo ">"._("Thorough email-based reporting");
+               ?>
+             </option>
+             <option value="web_form"
+               <?php
+                 if ($spamcop_method == 'web_form') echo ' selected';
+                 echo ">"._("Web-based form");
+               ?>
+             </option>
            </select>
            <input type="hidden" name="action" value="meth">
-           <input type="submit" value="Save Method">
+           <input type="submit" value="<?php echo _("Save Method"); ?>">
          </td></form>
        </tr>
        <tr>
-         <td valign="top" align="right">Your SpamCop authorization code:<br />
-           <font size="-2">(see below)</font>
-         </td>
+         <?php
+           echo html_tag('td',_("Your SpamCop authorization code:") . "<br />" .
+           '<font size="-2">(' . _("see below") . ')</font>','right','','valign="top"');
+         ?>
          <form method="post" action="options.php"><td valign="top">
            <input type="text" size="30" name="ID" value="<?php echo htmlspecialchars($spamcop_id) ?>" />
            <input type="hidden" name="action" value="save_id" />
-           <input type="submit" value="Save ID" />
+           <input type="submit" value="<?php echo _("Save ID"); ?>" />
          </td></form>
        </tr>
       </table>