converting strings to ngettext
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 4 Oct 2004 15:23:48 +0000 (15:23 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 4 Oct 2004 15:23:48 +0000 (15:23 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8144 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/newmail/newmail.php
plugins/newmail/setup.php

index da92e6d23d8927590763f48ea9f78032a79ca614..04d921085e9752fa7073355a488f8fe95e78de3a 100644 (file)
@@ -33,24 +33,21 @@ sqGetGlobalVar('numnew', $numnew, SQ_GET);
             ) .
             html_tag( 'tr', "\n" .
                 html_tag( 'td',
-                    '<br /><big><font color="' . $color[2] . '">'.
-                   sprintf( ( $numnew == 1 ?
-                       _("You have %s new message") :
-                       _("You have %s new messages") ), $numnew ) .
-                    '</font><br /></big><br />' . "\n" .
-                    '<form name="nm">' . "\n".
-                    '<input type="button" name="bt" value="' . _("Close Window") .
-                    '" onClick="javascript:window.close();" />'."\n".
-                    '</form>',
-                'center' )
-            ) ,
-        '', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' ) .
-        '</center>' .
-        "<script language=javascript>\n".
-        "<!--\n".
-            "document.nm.bt.focus();\n".
-        "-->\n".
-        "</script>\n".
-        "</body></html>\n";
-
+                          '<br /><big><font color="' . $color[2] . '">'.
+                          sprintf(ngettext("You have %s new message","You have %s new messages",$numnew), $numnew ) .
+                          '</font><br /></big><br />' . "\n" .
+                          '<form name="nm">' . "\n".
+                          '<input type="button" name="bt" value="' . _("Close Window") .
+                          '" onClick="javascript:window.close();" />'."\n".
+                          '</form>',
+                          'center' )
+                      ) ,
+                  '', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' ) .
+   '</center>' .
+   "<script language=javascript>\n".
+   "<!--\n".
+   "document.nm.bt.focus();\n".
+   "-->\n".
+   "</script>\n".
+   "</body></html>\n";
 ?>
\ No newline at end of file
index c0c05c73c1ecdc740590e0419b3dad113a6bb5db..f430cc12b32f8c55853665b30c8d9ecf09421392 100644 (file)
             if ($newmail_changetitle) {
                 echo "<script language=\"javascript\">\n" .
                     "function ChangeTitleLoad() {\n";
-                if( $totalNew > 1 || $totalNew == 0 ) {
-                    echo 'window.parent.document.title = "' .
-                        sprintf(_("%s New Messages"), $totalNew ) . 
-                        "\";\n";
-                } else {
-                    echo 'window.parent.document.title = "' .
-                        sprintf(_("%s New Message"), $totalNew ) . 
-                        "\";\n";
-                }
+                echo 'window.parent.document.title = "' .
+                     sprintf(ngettext("%s New Message","%s New Messages",$totalNew), $totalNew) . 
+                     "\";\n";
                 echo    "if (BeforeChangeTitle != null)\n".
                             "BeforeChangeTitle();\n".
                     "}\n".