diff options
author | Andrew Dolgov <[email protected]> | 2008-12-16 07:43:49 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-12-16 07:43:49 +0100 |
commit | e0142e27ec9d24fca008cf2c7a8a307d90e166e5 (patch) | |
tree | 5cdc6ca472f1c4db279cd5af3e0418cae4d4c5d0 | |
parent | 1b74062fc554dcd51a680e30c5f9fbd4b4332225 (diff) |
mobile: add some translations
-rw-r--r-- | mobile/functions.php | 60 | ||||
-rw-r--r-- | mobile/tt-rss.php | 5 | ||||
-rw-r--r-- | modules/pref-feeds.php | 2 | ||||
-rw-r--r-- | prefs.php | 2 | ||||
-rw-r--r-- | update-translations.sh | 2 |
5 files changed, 37 insertions, 34 deletions
diff --git a/mobile/functions.php b/mobile/functions.php index e5904d7b2..a37bc0207 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -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>"; @@ -139,9 +139,12 @@ $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"]; @@ -413,8 +416,9 @@ /// 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; } @@ -424,9 +428,9 @@ # } 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>, "; @@ -491,10 +495,10 @@ ($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") { @@ -560,20 +564,20 @@ 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>"; @@ -688,7 +692,7 @@ 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") { @@ -719,8 +723,8 @@ 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\">"; diff --git a/mobile/tt-rss.php b/mobile/tt-rss.php index a8bf6fb5f..a23bc8b6a 100644 --- a/mobile/tt-rss.php +++ b/mobile/tt-rss.php @@ -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); @@ -119,7 +118,7 @@ <?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 } ?> diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 1acc58114..350d6d15d 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1415,7 +1415,7 @@ $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')."\">"; @@ -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"> </div> diff --git a/update-translations.sh b/update-translations.sh index 6b3ecdea1..561e2868e 100644 --- a/update-translations.sh +++ b/update-translations.sh @@ -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 |