require_once "functions.php";
no_cache_incantation();
+ startup_gettext();
$script_started = getmicrotime();
<?php
+
$ERRORS[0] = __("Unknown error");
$ERRORS[1] = __("This program requires XmlHttpRequest " .
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
} */
+ require_once "accept-to-gettext.php";
+ require_once "gettext/gettext.inc";
+
+ startup_gettext();
+
require_once 'config.php';
require_once 'db-prefs.php';
require_once 'compat.php';
require_once "magpierss/rss_fetch.inc";
require_once 'magpierss/rss_utils.inc';
- require_once "accept-to-gettext.php";
- require_once "gettext/gettext.inc";
-
function purge_feed($link, $feed_id, $purge_interval, $debug = false) {
$rows = -1;
<ul class=\"headlineDropdownMenu\">
<li class=\"top2\">
Select:
- <a href=\"$sel_all_link\">All</a>,
- <a href=\"$sel_unread_link\">Unread</a>,
- <a href=\"$sel_none_link\">None</a></li>
+ <a href=\"$sel_all_link\">".__('All')."</a>,
+ <a href=\"$sel_unread_link\">".__('Unread')."</a>,
+ <a href=\"$sel_none_link\">".__('None')."</a></li>
<li class=\"vsep\"> </li>
<li class=\"top\">Selection<ul>
- <li onclick=\"$tog_unread_link\">Toggle unread</li>
- <li onclick=\"$tog_marked_link\">Toggle starred</li></ul></li>
- <li class=\"vsep\"> </li>
- <li class=\"top\"><a href=\"$catchup_page_link\">Mark as read</a><ul>
- <li onclick=\"$catchup_page_link\">This page</li>
- <li onclick=\"$catchup_feed_link\">Entire feed</li></ul></li>
+ <li onclick=\"$tog_unread_link\">".__('Toggle unread')."</li>
+ <li onclick=\"$tog_marked_link\">".__('Toggle starred')."</li></ul></li>
<li class=\"vsep\"> </li>
- <!-- <li class=\"top2\">
- Page:
- <a href=\"$page_prev_link\">Previous</a>,
- <a href=\"$page_next_link\">Next</a></li> -->";
+ <li class=\"top\"><a href=\"$catchup_page_link\">".__('Mark as read')."</a><ul>
+ <li onclick=\"$catchup_page_link\">".__('This page')."</li>
+ <li onclick=\"$catchup_feed_link\">".__('Entire feed')."</li></ul></li>
+ <li class=\"vsep\"> </li>";
if ($limit != 0) {
print "
- <li class=\"top\"><a href=\"$page_next_link\">Next page</a><ul>
- <li onclick=\"$page_prev_link\">Previous page</li>
- <li onclick=\"$page_first_link\">First page</li></ul></li>
+ <li class=\"top\"><a href=\"$page_next_link\">".__('Next page')."</a><ul>
+ <li onclick=\"$page_prev_link\">".__('Previous page')."</li>
+ <li onclick=\"$page_first_link\">".__('First page')."</li></ul></li>
</ul>";
}
print "<td class=\"headlineActions$rtl_cpart\">".
__('Select:')."
- <a href=\"$sel_all_link\">All</a>,
- <a href=\"$sel_unread_link\">Unread</a>,
- <a href=\"$sel_none_link\">None</a>
+ <a href=\"$sel_all_link\">".__('All')."</a>,
+ <a href=\"$sel_unread_link\">".__('Unread')."</a>,
+ <a href=\"$sel_none_link\">".__('None')."</a>
".
- __('Toggle:')." <a href=\"$tog_unread_link\">Unread</a>,
- <a href=\"$tog_marked_link\">Starred</a>
+ __('Toggle:')." <a href=\"$tog_unread_link\">".__('Unread')."</a>,
+ <a href=\"$tog_marked_link\">".__('Starred')."</a>
".
__('Mark as read:')."
- <a href=\"#\" onclick=\"$catchup_page_link\">Page</a>,
- <a href=\"#\" onclick=\"$catchup_feed_link\">Feed</a>";
+ <a href=\"#\" onclick=\"$catchup_page_link\">".__('Page')."</a>,
+ <a href=\"#\" onclick=\"$catchup_feed_link\">".__('Feed')."</a>";
print "</td>";
}
<a target=\"_new\"
href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\">
<img class=\"noborder\"
- alt=\"Generated feed\" src=\"images/feed-icon-12x12.png\">
+ alt=\"".__('Generated feed')."\" src=\"images/feed-icon-12x12.png\">
</a>";
}
if (db_num_rows($result) == 0) {
- print "Adding category <b>$cat_title</b>...<br>";
+ printf(__("Adding category <b>%s</b>...<br>"), $cat_title);
db_query($link, "INSERT INTO ttrss_feed_categories
(title,owner_uid)
(<a target='_new' href=\"$feed_url\">rss</a>)</td>";
if (db_num_rows($result) > 0) {
- print "<td>Already imported.</td>";
+ print "<td>".__('Already imported.')."</td>";
} else {
if ($cat_id) {
db_query($link, $add_query);
- print "<td><b>Done.</b></td>";
+ print "<td><b>".__('Done.')."</b></td>";
}
print "</tr>";
print "</table>";
} else {
- print "<div class=\"error\">Error while parsing document.</div>";
+ print "<div class=\"error\">".__('Error while parsing document.')."</div>";
}
} else {
- print "<div class=\"error\">Error: please upload OPML file.</div>";
+ print "<div class=\"error\">".__('Error: please upload OPML file.')."</div>";
}
if (db_num_rows($result) == 0) {
- printf(_("Adding category <b>%s</b>."), $cat_title);
+ printf(__("Adding category <b>%s</b>."), $cat_title);
print "<br>";
db_query($link, "INSERT INTO ttrss_feed_categories
(<a target='_new' href=\"$feed_url\">rss</a>)</td>";
if (db_num_rows($result) > 0) {
- print "<td>"._("Already imported.")."</td>";
+ print "<td>".__("Already imported.")."</td>";
} else {
if ($cat_id) {
db_query($link, $add_query);
- print "<td><b>"._('Done.')."</b></td>";
+ print "<td><b>".__('Done.')."</b></td>";
}
print "</tr>";
print "</table>";
} else {
- print "<div class=\"error\">"._("Error: can't find body element.")."</div>";
+ print "<div class=\"error\">".__("Error: can't find body element.")."</div>";
}
} else {
- print "<div class=\"error\">"._("Error while parsing document.")."</div>";
+ print "<div class=\"error\">".__("Error while parsing document.")."</div>";
}
} else {
- print "<div class=\"error\">"._("Error: please upload OPML file.")."</div>";
+ print "<div class=\"error\">".__("Error: please upload OPML file.")."</div>";
}
}
print "<html>
<head>
<link rel=\"stylesheet\" href=\"utility.css\" type=\"text/css\">
- <title>OPML Utility</title>
+ <title>".__("OPML Utility")."</title>
</head>
<body>
<div class=\"floatingLogo\"><img src=\"images/ttrss_logo.png\"></div>
<h1>".__('OPML Utility')."</h1>";
if (function_exists('domxml_open_file')) {
- print "<p>Importing OPML (using DOMXML extension)...</p>";
+ print __("<p>Importing OPML (using DOMXML extension)...</p>");
require_once "modules/opml_domxml.php";
opml_import_domxml($link, $owner_uid);
} else {
- print "<p>Importing OPML (using DOMDocument extension)...</p>";
+ print __("<p>Importing OPML (using DOMDocument extension)...</p>");
require_once "modules/opml_domdoc.php";
opml_import_domdoc($link, $owner_uid);
}
print "<br><form method=\"GET\" action=\"prefs.php\">
- <input type=\"submit\" value=\"Return to preferences\">
+ <input type=\"submit\" value=\"".__("Return to preferences")."\">
</form>";
print "</body></html>";
error_reporting(E_ERROR | E_WARNING | E_PARSE);
require_once "functions.php";
-
- startup_gettext();
-
require_once "sessions.php";
require_once "sanity_check.php";
require_once "version.php";
<?php
+ require_once "functions.php";
+
define('EXPECTED_CONFIG_VERSION', 5);
if (!file_exists("config.php")) {
error_reporting(E_ERROR | E_WARNING | E_PARSE);
require_once "functions.php";
-
- startup_gettext();
-
require_once "sessions.php";
require_once "sanity_check.php";
require_once "version.php";
#!/bin/sh
TEMPLATE=messages.pot
-xgettext -kT_ngettext:1,2 -kT_ -k_ -k__ -L PHP -o $TEMPLATE *.php modules/*.php
+xgettext -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.php modules/*.php
if [ "$1" = "-p" ]; then
msgfmt --statistics $TEMPLATE