]> git.wh0rd.org - tt-rss.git/commitdiff
mobile: add some translations
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 16 Dec 2008 06:43:49 +0000 (07:43 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 16 Dec 2008 06:43:49 +0000 (07:43 +0100)
mobile/functions.php
mobile/tt-rss.php
modules/pref-feeds.php
prefs.php
update-translations.sh

index e5904d7b26be72c5aef4f806c823dfe757708bfe..a37bc02073f46182a363f34ad3adf789110065c3 100644 (file)
@@ -9,16 +9,16 @@
                print "<div id=\"heading\">";
 
                if ($tags) {
-                       print "Tags <span id=\"headingAddon\">
-                               (<a href=\"tt-rss.php\">View feeds</a>, ";
+                       print __("Tags")."<span id=\"headingAddon\">
+                               (<a href=\"tt-rss.php\">".__("View feeds")."</a>, ";
                } else {
-                       print "Feeds <span id=\"headingAddon\">
-                               (<a href=\"tt-rss.php?tags=1\">View tags</a>, ";
+                       print __("Feeds")." <span id=\"headingAddon\">
+                               (<a href=\"tt-rss.php?tags=1\">".__("View tags")."</a>, ";
                }
 
-               print "<a href=\"tt-rss.php?go=sform\">Search</a>, ";
+               print "<a href=\"tt-rss.php?go=sform\">".__("Search")."</a>, ";
 
-               print "<a href=\"logout.php\">Logout</a>)</span>";
+               print "<a href=\"logout.php\">".__("Logout")."</a>)</span>";
                print "</div>";
 
                print "<ul class=\"feedList\">";
@@ -30,7 +30,7 @@
                        /* virtual feeds */
 
                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                               print "<li class=\"feedCat\">Special</li>";
+                               print "<li class=\"feedCat\">".__("Special")."</li>";
                                print "<li class=\"feedCatHolder\"><ul class=\"feedCatList\">";
                        }
 
@@ -72,7 +72,7 @@
                
                                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 class=\"feedCatHolder\"><ul class=\"feedCatList\">";
                                        } else {
 //                                             print "<li><hr></li>";
                        $lnum = 0;
        
                        $category = "";
-       
+
                        while ($line = db_fetch_assoc($result)) {
-                       
+                               if (get_pref($link, 'HIDE_READ_FEEDS') && (int)$line['unread']==0) {
+                                       continue;
+                               }
+
                                $feed = db_unescape_string($line["title"]);
                                $feed_id = $line["id"];   
        
                /// STOP //////////////////////////////////////////////////////////////////////////////////
 
                if (!$result) {
-                       print "<div align='center'>
-                               Could not display feed (query failed). Please check label match syntax or local configuration.</div>";
+                       print "<div align='center'>".
+                               __("Could not display feed (query failed). Please check label match syntax or local configuration.").
+                               "</div>";
                        return;
                }
 
                        #               }
                
                print "$feed_title <span id=\"headingAddon\">(";
-               print "<a href=\"tt-rss.php\">Back</a>, ";
-               print "<a href=\"tt-rss.php?go=sform&aid=$feed&ic=$cat_view\">Search</a>, ";
-               print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=ForceUpdate\">Update</a>";
+               print "<a href=\"tt-rss.php\">".__("Back")."</a>, ";
+               print "<a href=\"tt-rss.php?go=sform&aid=$feed&ic=$cat_view\">".__("Search")."</a>, ";
+               print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=ForceUpdate\">".__("Update")."</a>";
 
 #              print "Mark as read: ";
 #              print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAsRead\">Page</a>, ";
                                                ($line["unread"] != "t" && $line["unread"] != "1")) {
        
                                        $update_pic = "<img id='FUPDPIC-$id' src=\"images/updated.png\" 
-                                               alt=\"Updated\">";
+                                               alt=\"".__("Updated")."\">";
                                } else {
                                        $update_pic = "<img id='FUPDPIC-$id' src=\"images/blank_icon.gif\" 
-                                               alt=\"Updated\">";
+                                               alt=\"".__("Updated")."\">";
                                }
        
                                if ($line["unread"] == "t" || $line["unread"] == "1") {
                        print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAllRead\">Feed</a></div>"; */
 
                        print "Select: 
-                               <a href=\"javascript:selectHeadlines(1)\">All</a>,
-                               <a href=\"javascript:selectHeadlines(2)\">Unread</a>,
-                               <a href=\"javascript:selectHeadlines(3)\">None</a>,
-                               <a href=\"javascript:selectHeadlines(4)\">Invert</a>";
+                               <a href=\"javascript:selectHeadlines(1)\">".__("All")."</a>,
+                               <a href=\"javascript:selectHeadlines(2)\">".__("Unread")."</a>,
+                               <a href=\"javascript:selectHeadlines(3)\">".__("None")."</a>,
+                               <a href=\"javascript:selectHeadlines(4)\">".__("Invert")."</a>";
 
                        print " ";
 
                        print "<select name=\"catchup_op\">
-                               <option value=\"selection\">Selection</option>
-                               <option value=\"page\">Page</option>
-                               <option value=\"feed\">Entire feed</option>
+                               <option value=\"selection\">".__("Selection")."</option>
+                               <option value=\"page\">".__("Page")."</option>
+                               <option value=\"feed\">".__("Entire feed")."</option>
                        </select>
                        <input type=\"hidden\" name=\"cat\" value=\"$cat_view\">
-                       <input type=\"submit\" value=\"Mark as read\">";
+                       <input type=\"submit\" value=\"".__("Mark as read")."\">";
 
                        print "</form>";
 
                        print "</div>";
 
                        if ($num_tags > 0) {
-                               print "<div class=\"postTags\">Tags: $tags_str</div>";
+                               print "<div class=\"postTags\">".__("Tags:")." $tags_str</div>";
                        }
 
                        if ($line["marked"] == "t" || $line["marked"] == "1") {
 
                print "<div id=\"heading\">";
 
-               print "Search <span id=\"headingAddon\">
-                               (<a href=\"tt-rss.php\">Go back</a>)</span></div>";
+               print __("Search")." <span id=\"headingAddon\">
+                               (<a href=\"tt-rss.php\">".__("Go back")."</a>)</span></div>";
 
                print "<form method=\"GET\" action=\"tt-rss.php\" class=\"searchForm\">";
 
index a8bf6fb5f734f0cbb6edd8226798481afa69508d..a23bc8b6a943bd1abe3f2f0ec1d113fec138f8e2 100644 (file)
@@ -8,10 +8,9 @@
        require_once "../sessions.php";
 
        require_once "../version.php"; 
-       require_once "../config.php";
        require_once "../db-prefs.php";
 
-       $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
+       $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
 
        init_connection($link);
 
 <?php if (!$go) { ?>
 
 <div id="footer">
-       <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a>
+       <a href="http://tt-rss.org/">Tiny-Tiny RSS</a>
        <?php if (!defined('HIDE_VERSION')) { ?>
                 v<?php echo VERSION ?> 
        <?php } ?>
index 1acc58114f1bbdc23b45f4635820706e39316776..350d6d15d5ecc0902f947cf1442a604d1795da09 100644 (file)
 
                $url_path = article_publish_url($link);
 
-               print "<p><a class=\"visibleLinkB\" id=\"pubGenAddress\" target=\"_blank\" href=\"$url_path\">Link to published articles feed.</a></p>";                
+               print "<p><a class=\"visibleLinkB\" id=\"pubGenAddress\" target=\"_blank\" href=\"$url_path\">".__("Link to published articles feed.")."</a></p>";
 
                print "<p><input type=\"submit\" onclick=\"return pubRegenKey()\" class=\"button\"
                        value=\"".__('Generate another link')."\">";
index 8541a51af4a0d756c0935cad850aeb4d217e4a4d..81a9a432074d6a1a0d6e567af7234300ad8d88d6 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -123,7 +123,7 @@ window.onload = init;
                </div> -->
 
                <div class='prefKbdHelp'>
-                       <img src="images/small_question.png" alt="?"/> <a href='#' onclick="Effect.Appear('hotkey_help_overlay', {duration: 0.3})">Keyboard shortcuts</a>
+                       <img src="images/small_question.png" alt="?"/> <a href='#' onclick="Effect.Appear('hotkey_help_overlay', {duration: 0.3})"><?php echo __("Keyboard shortcuts") ?></a>
                </div>
 
                <div class="firstTab">&nbsp;</div>
index 6b3ecdea15901f7647d6ddd5c837daa644855684..561e2868e11e7d8bc1050391cecc64ae26ed1ec5 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 TEMPLATE=messages.pot
 
-xgettext -kT_js_decl -kT_sprintf -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.php modules/*.php help/*.php
+xgettext -kT_js_decl -kT_sprintf -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.php modules/*.php help/*.php mobile/*.php
 
 update_lang() {
        if [ -f $1.po ]; then