diff --git a/backend.php b/backend.php
index 1f0cf2e8..03f90e2e 100644
--- a/backend.php
+++ b/backend.php
@@ -22,6 +22,7 @@
require_once "functions.php";
no_cache_incantation();
+ startup_gettext();
$script_started = getmicrotime();
diff --git a/errors.php b/errors.php
index 16efd09a..c7499a9c 100644
--- a/errors.php
+++ b/errors.php
@@ -1,4 +1,5 @@
Select:
- All,
- Unread,
- None
+ ".__('All').",
+ ".__('Unread').",
+ ".__('None')."
Selection
- - Toggle unread
- - Toggle starred
+ ".__('Toggle unread')."
+ ".__('Toggle starred')."
- Mark as read
- - This page
- - Entire feed
-
- ";
+ ".__('Mark as read')."
+ - ".__('This page')."
+ - ".__('Entire feed')."
+ ";
if ($limit != 0) {
print "
- Next page
- - Previous page
- - First page
+ ".__('Next page')."
+ - ".__('Previous page')."
+ - ".__('First page')."
";
}
@@ -2785,16 +2783,16 @@
print "".
__('Select:')."
- All,
- Unread,
- None
+ ".__('All').",
+ ".__('Unread').",
+ ".__('None')."
".
- __('Toggle:')." Unread,
- Starred
+ __('Toggle:')." ".__('Unread').",
+ ".__('Starred')."
".
__('Mark as read:')."
- Page,
- Feed";
+ ".__('Page').",
+ ".__('Feed')."";
print " | ";
}
@@ -2830,7 +2828,7 @@
+ alt=\"".__('Generated feed')."\" src=\"images/feed-icon-12x12.png\">
";
}
diff --git a/modules/opml_domdoc.php b/modules/opml_domdoc.php
index 156e46c7..bd10284b 100644
--- a/modules/opml_domdoc.php
+++ b/modules/opml_domdoc.php
@@ -41,7 +41,7 @@
if (db_num_rows($result) == 0) {
- print "Adding category $cat_title...
";
+ printf(__("Adding category %s...
"), $cat_title);
db_query($link, "INSERT INTO ttrss_feed_categories
(title,owner_uid)
@@ -86,7 +86,7 @@
(rss)";
if (db_num_rows($result) > 0) {
- print "Already imported. | ";
+ print "".__('Already imported.')." | ";
} else {
if ($cat_id) {
@@ -104,7 +104,7 @@
db_query($link, $add_query);
- print "Done. | ";
+ print "".__('Done.')." | ";
}
print "";
@@ -115,11 +115,11 @@
print "";
} else {
- print "Error while parsing document.
";
+ print "".__('Error while parsing document.')."
";
}
} else {
- print "Error: please upload OPML file.
";
+ print "".__('Error: please upload OPML file.')."
";
}
diff --git a/modules/opml_domxml.php b/modules/opml_domxml.php
index dabba789..8de842c5 100644
--- a/modules/opml_domxml.php
+++ b/modules/opml_domxml.php
@@ -43,7 +43,7 @@
if (db_num_rows($result) == 0) {
- printf(_("Adding category %s."), $cat_title);
+ printf(__("Adding category %s."), $cat_title);
print "
";
db_query($link, "INSERT INTO ttrss_feed_categories
@@ -89,7 +89,7 @@
(rss)";
if (db_num_rows($result) > 0) {
- print ""._("Already imported.")." | ";
+ print "".__("Already imported.")." | ";
} else {
if ($cat_id) {
@@ -107,7 +107,7 @@
db_query($link, $add_query);
- print ""._('Done.')." | ";
+ print "".__('Done.')." | ";
}
print "";
@@ -118,14 +118,14 @@
print "";
} else {
- print ""._("Error: can't find body element.")."
";
+ print "".__("Error: can't find body element.")."
";
}
} else {
- print ""._("Error while parsing document.")."
";
+ print "".__("Error while parsing document.")."
";
}
} else {
- print ""._("Error: please upload OPML file.")."
";
+ print "".__("Error: please upload OPML file.")."
";
}
}
diff --git a/opml.php b/opml.php
index 0113fe9e..0b1f4915 100644
--- a/opml.php
+++ b/opml.php
@@ -100,24 +100,24 @@
print "
- OPML Utility
+ ".__("OPML Utility")."
".__('OPML Utility')."
";
if (function_exists('domxml_open_file')) {
- print "Importing OPML (using DOMXML extension)...
";
+ print __("Importing OPML (using DOMXML extension)...
");
require_once "modules/opml_domxml.php";
opml_import_domxml($link, $owner_uid);
} else {
- print "Importing OPML (using DOMDocument extension)...
";
+ print __("Importing OPML (using DOMDocument extension)...
");
require_once "modules/opml_domdoc.php";
opml_import_domdoc($link, $owner_uid);
}
print "
";
print "";
diff --git a/prefs.php b/prefs.php
index 337b7b69..94638bae 100644
--- a/prefs.php
+++ b/prefs.php
@@ -2,9 +2,6 @@
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";
diff --git a/sanity_check.php b/sanity_check.php
index f7514b65..5361c7aa 100644
--- a/sanity_check.php
+++ b/sanity_check.php
@@ -1,4 +1,6 @@