1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

more i18n work

This commit is contained in:
Andrew Dolgov
2007-03-05 13:50:46 +01:00
parent 8497d2b976
commit 4dccf1ed93
9 changed files with 117 additions and 95 deletions
+4 -3
View File
@@ -443,9 +443,9 @@
}
if (subscribe_to_feed($link, $feed_url, $cat_id)) {
print format_notice(sprintf(__("Subscribed to <b>%s</b>."), $feed_url));
print_notice(T_sprintf("Subscribed to <b>%s</b>.", $feed_url));
} else {
print format_warning(sprintf(__("Already subscribed to <b>%s</b>."), $feed_url));
print_warning(T_sprintf("Already subscribed to <b>%s</b>.", $feed_url));
}
if ($p_from != 'tt-rss') {
@@ -547,7 +547,8 @@
} else {
print format_warning(sprintf(__("Category <b>$%s</b> already exists in the database."), $feed_cat));
print_warning(T_sprintf("Category <b>$%s</b> already exists in the database.",
$feed_cat));
}
}
+24 -28
View File
@@ -148,49 +148,45 @@
enabled = $enabled,
inverse = $inverse,
action_param = '$action_param'
WHERE id = '$filter_id' AND owner_uid = " . $_SESSION["uid"]);
WHERE id = '$filter_id' AND owner_uid = " . $_SESSION["uid"]);
}
if ($subop == "remove") {
if (!WEB_DEMO_MODE) {
$ids = split(",", db_escape_string($_GET["ids"]));
$ids = split(",", db_escape_string($_GET["ids"]));
foreach ($ids as $id) {
db_query($link, "DELETE FROM ttrss_filters WHERE id = '$id' AND owner_uid = ". $_SESSION["uid"]);
}
foreach ($ids as $id) {
db_query($link, "DELETE FROM ttrss_filters WHERE id = '$id' AND owner_uid = ". $_SESSION["uid"]);
}
}
if ($subop == "add") {
if (!WEB_DEMO_MODE) {
$regexp = db_escape_string(trim($_GET["reg_exp"]));
$filter_type = db_escape_string(trim($_GET["filter_type"]));
$feed_id = db_escape_string($_GET["feed_id"]);
$action_id = db_escape_string($_GET["action_id"]);
$action_param = db_escape_string($_GET["action_param"]);
$regexp = db_escape_string(trim($_GET["reg_exp"]));
$filter_type = db_escape_string(trim($_GET["filter_type"]));
$feed_id = db_escape_string($_GET["feed_id"]);
$action_id = db_escape_string($_GET["action_id"]);
$action_param = db_escape_string($_GET["action_param"]);
$inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
$inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
if (!$regexp) return;
if (!$regexp) return;
if (!$feed_id) {
$feed_id = 'NULL';
} else {
$feed_id = sprintf("'%s'", db_escape_string($feed_id));
}
if (!$feed_id) {
$feed_id = 'NULL';
} else {
$feed_id = sprintf("'%s'", db_escape_string($feed_id));
}
$result = db_query($link,
"INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
action_id, action_param, inverse)
VALUES
('$regexp', '$filter_type','".$_SESSION["uid"]."',
$feed_id, '$action_id', '$action_param', $inverse)");
$result = db_query($link,
"INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
action_id, action_param, inverse)
VALUES
('$regexp', '$filter_type','".$_SESSION["uid"]."',
$feed_id, '$action_id', '$action_param', $inverse)");
}
print_notice(T_sprintf("Created filter <b>%s</b>", htmlspecialchars($regexp)));
}
if ($quiet) return;
+8 -11
View File
@@ -68,14 +68,14 @@
$login = db_escape_string(trim($_GET["login"]));
$uid = db_escape_string($_GET["id"]);
$access_level = sprintf("%d", $_GET["access_level"]);
$access_level = (int) $_GET["access_level"];
$email = db_escape_string(trim($_GET["email"]));
$password = db_escape_string(trim($_GET["password"]));
if ($password) {
$pwd_hash = 'SHA1:' . sha1($password);
$pass_query_part = "pwd_hash = '$pwd_hash', ";
print format_notice(sprintf(__('Changed password of user <b>%s</b>.'), $login));
print_notice(T_sprintf('Changed password of user <b>%s</b>.', $login));
} else {
$pass_query_part = "";
}
@@ -120,21 +120,18 @@
$new_uid = db_fetch_result($result, 0, "id");
print format_notice(sprintf(__("Added user <b>%s</b>
with password <b>%s</b>"), $login, $tmp_user_pwd));
print_notice(T_sprintf("Added user <b>%s</b> with password <b>%s</b>",
$login, $tmp_user_pwd));
initialize_user($link, $new_uid);
} else {
print format_warning(sprintf(__("Could not create user <b>%s</b>"),
$login));
print_warning(T_sprintf("Could not create user <b>%s</b>", $login));
}
} else {
print format_warning(sprintf(__("User <b>%s</b> already exists."),
$login));
print_warning(T_sprintf("User <b>%s</b> already exists.", $login));
}
}
} else if ($subop == "resetPass") {
@@ -154,8 +151,8 @@
db_query($link, "UPDATE ttrss_users SET pwd_hash = '$pwd_hash'
WHERE id = '$uid'");
print format_notice(sprintf(__("Changed password of user <b>%s</b>
to <b>%s</b>"), $login, $tmp_user_pwd));
print_notice(T_sprintf("Changed password of user <b>%s</b>
to <b>%s</b>", $login, $tmp_user_pwd));
if (MAIL_RESET_PASS && $email) {
print " Notifying <b>$email</b>.";