]> git.wh0rd.org - tt-rss.git/commitdiff
more I18N
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 21 Dec 2006 17:41:02 +0000 (18:41 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 21 Dec 2006 17:41:02 +0000 (18:41 +0100)
functions.php
logout.php

index 22f2b00fa8d444817b12965349de4044fa396fcf..b629526bce3078db6c574765f9ecc4b59c1f616e 100644 (file)
 
        function getFeedCatTitle($link, $id) {
                if ($id == -1) {
-                       return "Special";
+                       return _("Special");
                } else if ($id < -10) {
-                       return "Labels";
+                       return _("Labels");
                } else if ($id > 0) {
                        $result = db_query($link, "SELECT ttrss_feed_categories.title 
                                FROM ttrss_feeds, ttrss_feed_categories WHERE ttrss_feeds.id = '$id' AND
                        if (db_num_rows($result) == 1) {
                                return db_fetch_result($result, 0, "title");
                        } else {
-                               return "Uncategorized";
+                               return _("Uncategorized");
                        }
                } else {
                        return "getFeedCatTitle($id) failed";
 
        function getFeedTitle($link, $id) {
                if ($id == -1) {
-                       return "Starred articles";
+                       return _("Starred articles");
                } else if ($id < -10) {
                        $label_id = -10 - $id;
                        $result = db_query($link, "SELECT description FROM ttrss_labels WHERE id = '$label_id'");
                                        $last_error = db_fetch_result($result, 0, "last_error");
 
                                        if ($search) {
-                                               $feed_title = "Feed search results ($search, $feed_title)";
+                                               $feed_title = _("Feed search results") . " ($search, $feed_title)";
                                        }
                                }
        
                        } else if ($feed == -1) {
-                               $feed_title = "Starred articles";
+                               $feed_title = _("Starred articles");
                        } else if ($feed < -10) {
                                $label_id = -$feed - 11;
                                $result = db_query($link, "SELECT description FROM ttrss_labels
                                $feed_title = db_fetch_result($result, 0, "description");
 
                                if ($search) {
-                                       $feed_title = "Label search results ($search, $feed_title)";
+                                       $feed_title = _("Label search results") . " ($search, $feed_title)";
                                }
                        } else {
                                $feed_title = "?";
        }
 
        function prepare_headlines_digest($link, $user_id, $days = 1, $limit = 100) {
-               $tmp =  "New headlines for last 24 hours, as of " . date("Y/m/d H:m") . "\n";   
+               $tmp =  _("New headlines for last 24 hours, as of ") . date("Y/m/d H:m") . "\n";        
                $tmp .= "=======================================================\n\n";
 
                if (DB_TYPE == "pgsql") {
                }
 
                $tmp .= "--- \n";
-               $tmp .= "You have been sent this email because you have enabled daily digests in Tiny Tiny RSS at " . 
+               $tmp .= _("You have been sent this email because you have enabled daily digests in Tiny Tiny RSS at ") . 
                        DIGEST_HOSTNAME . "\n".
-                       "To unsubscribe, visit your configuration options or contact instance owner.\n";
+                       _("To unsubscribe, visit your configuration options or contact instance owner.\n");
                        
 
                return array($tmp, $headlines_count);
                /* virtual feeds */
 
                if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                       print "<li class=\"feedCat\">Special</li>";
+                       print "<li class=\"feedCat\">"._('Special')."</li>";
                        print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
                }
 
 
                if ($num_starred > 0) $class .= "Unread";
 
-               printFeedEntry(-1, $class, "Starred articles", $num_starred, 
+               printFeedEntry(-1, $class, _("Starred articles"), $num_starred, 
                        "images/mark_set.png", $link);
 
                if (get_pref($link, 'ENABLE_FEED_CATS')) {
                
                                if (db_num_rows($result) > 0) {
                                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                                               print "<li class=\"feedCat\">Labels</li>";
+                                               print "<li class=\"feedCat\">"._('Labels')."</li>";
                                                print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
                                        } else {
                                                print "<li><hr></li>";
                                $tmp_category = $line["category"];
 
                                if (!$tmp_category) {
-                                       $tmp_category = "Uncategorized";
+                                       $tmp_category = _("Uncategorized");
                                }
                                
        //                      $class = ($lnum % 2) ? "even" : "odd";
                                        $collapsed = $line["collapsed"];
 
                                        // workaround for NULL category
-                                       if ($category == "Uncategorized") {
+                                       if ($category == _("Uncategorized")) {
                                                if ($_COOKIE["ttrss_vf_uclps"] == 1) {
                                                        $collapsed = "t";
                                                }
                        }
 
                        if (db_num_rows($result) == 0) {
-                               print "<li>No feeds to display.</li>";
+                               print "<li>"._('No feeds to display.')."</li>";
                        }
 
                } else {
                        ORDER BY tag_name"); */
 
                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                               print "<li class=\"feedCat\">Tags</li>";
+                               print "<li class=\"feedCat\">"._('Tags')."</li>";
                                print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
                        }
 
index f3987d853963b323aa8e4451aa06d90c1b783517..249018dce8eae365f86b474050a984280964962e 100644 (file)
        <body class="logoutBody">
                <div class="logoutContent">     
                
-                       <h1>You have been logged out.</h1>
+                       <h1><?php echo _('You have been logged out.') ?></h1>
 
-                       <p><span class="logoutWarning">Warning:</span>
+                       <p><?php echo _('<span class="logoutWarning">Warning:</span>
                        As there is no way to reliably clear HTTP Authentication 
                        credentials from your browser, it is recommended for you to close
                        this browser window, otherwise your browser could automatically
                        authenticate again using previously supplied credentials, which
-                       is a security risk.</p>
+                       is a security risk.') ?></p>
                        
                </div>
        </body>