Commit a3b9b7e9 authored by Dries's avatar Dries
Browse files

- node.module:
    + added missing t()-functions (reported by Nick).

- locale.module:
    + renamed '$lang' to '$language' (reported by Nick).
parent bc6e55b2
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
** If not in 'safe mode', increase the maximum execution time: ** If not in 'safe mode', increase the maximum execution time:
*/ */
if (!get_cfg_var("safe_mode")) { if (!get_cfg_var("safe_mode")) {
set_time_limit(180); set_time_limit(180);
} }
......
...@@ -89,10 +89,10 @@ function locale_links($translation) { ...@@ -89,10 +89,10 @@ function locale_links($translation) {
foreach ($languages as $key=>$value) { foreach ($languages as $key=>$value) {
if ($translation) { if ($translation) {
$output .= "<a href=\"admin.php?mod=locale&op=translated&lang=$key\">translated '$key' strings</a> | "; $output .= "<a href=\"admin.php?mod=locale&op=translated&language=$key\">translated '$key' strings</a> | ";
} }
else { else {
$output .= "<a href=\"admin.php?mod=locale&op=untranslated&lang=$key\">untranslated '$key' strings</a> | "; $output .= "<a href=\"admin.php?mod=locale&op=untranslated&language=$key\">untranslated '$key' strings</a> | ";
} }
} }
...@@ -112,21 +112,21 @@ function locale_overview() { ...@@ -112,21 +112,21 @@ function locale_overview() {
return $output; return $output;
} }
function locale_translated($lang) { function locale_translated($language) {
$result = db_query("SELECT * FROM locales WHERE $lang != '' ORDER BY string"); $result = db_query("SELECT * FROM locales WHERE $language != '' ORDER BY string");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>original string</TH><TH>translated string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n"; $output .= " <TR><TH>original string</TH><TH>translated string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n";
while ($locale = db_fetch_object($result)) { while ($locale = db_fetch_object($result)) {
$output .= " <TR><TD>". check_output($locale->string) ."</TD><TD>". check_output($locale->$lang) ."</TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=edit&id=$locale->id\"> edit locale</A></TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=delete&id=$locale->id\">delete locale</A></TD></TR>"; $output .= " <TR><TD>". check_output($locale->string) ."</TD><TD>". check_output($locale->$language) ."</TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=edit&id=$locale->id\"> edit locale</A></TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=delete&id=$locale->id\">delete locale</A></TD></TR>";
} }
$output .= "</TABLE>\n"; $output .= "</TABLE>\n";
return $output; return $output;
} }
function locale_untranslated($lang) { function locale_untranslated($language) {
$result = db_query("SELECT * FROM locales WHERE $lang = '' ORDER BY string"); $result = db_query("SELECT * FROM locales WHERE $language = '' ORDER BY string");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n"; $output .= " <TR><TH>string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n";
...@@ -139,7 +139,7 @@ function locale_untranslated($lang) { ...@@ -139,7 +139,7 @@ function locale_untranslated($lang) {
} }
function locale_admin() { function locale_admin() {
global $id, $edit, $op, $lang; global $id, $edit, $op, $language;
if (!variable_get("locale", 0)) { if (!variable_get("locale", 0)) {
print status("locale disabled."); print status("locale disabled.");
...@@ -160,12 +160,12 @@ function locale_admin() { ...@@ -160,12 +160,12 @@ function locale_admin() {
break; break;
case "Save translations": case "Save translations":
print locale_save(check_input($id), $edit); print locale_save(check_input($id), $edit);
break; break;
case "translated": case "translated":
print locale_translated($lang); print locale_translated($language);
break; break;
case "untranslated": case "untranslated":
print locale_untranslated($lang); print locale_untranslated($language);
break; break;
default: default:
print locale_overview(); print locale_overview();
......
...@@ -89,10 +89,10 @@ function locale_links($translation) { ...@@ -89,10 +89,10 @@ function locale_links($translation) {
foreach ($languages as $key=>$value) { foreach ($languages as $key=>$value) {
if ($translation) { if ($translation) {
$output .= "<a href=\"admin.php?mod=locale&op=translated&lang=$key\">translated '$key' strings</a> | "; $output .= "<a href=\"admin.php?mod=locale&op=translated&language=$key\">translated '$key' strings</a> | ";
} }
else { else {
$output .= "<a href=\"admin.php?mod=locale&op=untranslated&lang=$key\">untranslated '$key' strings</a> | "; $output .= "<a href=\"admin.php?mod=locale&op=untranslated&language=$key\">untranslated '$key' strings</a> | ";
} }
} }
...@@ -112,21 +112,21 @@ function locale_overview() { ...@@ -112,21 +112,21 @@ function locale_overview() {
return $output; return $output;
} }
function locale_translated($lang) { function locale_translated($language) {
$result = db_query("SELECT * FROM locales WHERE $lang != '' ORDER BY string"); $result = db_query("SELECT * FROM locales WHERE $language != '' ORDER BY string");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>original string</TH><TH>translated string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n"; $output .= " <TR><TH>original string</TH><TH>translated string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n";
while ($locale = db_fetch_object($result)) { while ($locale = db_fetch_object($result)) {
$output .= " <TR><TD>". check_output($locale->string) ."</TD><TD>". check_output($locale->$lang) ."</TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=edit&id=$locale->id\"> edit locale</A></TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=delete&id=$locale->id\">delete locale</A></TD></TR>"; $output .= " <TR><TD>". check_output($locale->string) ."</TD><TD>". check_output($locale->$language) ."</TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=edit&id=$locale->id\"> edit locale</A></TD><TD NOWRAP><A HREF=\"admin.php?mod=locale&op=delete&id=$locale->id\">delete locale</A></TD></TR>";
} }
$output .= "</TABLE>\n"; $output .= "</TABLE>\n";
return $output; return $output;
} }
function locale_untranslated($lang) { function locale_untranslated($language) {
$result = db_query("SELECT * FROM locales WHERE $lang = '' ORDER BY string"); $result = db_query("SELECT * FROM locales WHERE $language = '' ORDER BY string");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n"; $output .= " <TR><TH>string</TH><TH COLSPAN=\"2\">operations</TH><TR>\n";
...@@ -139,7 +139,7 @@ function locale_untranslated($lang) { ...@@ -139,7 +139,7 @@ function locale_untranslated($lang) {
} }
function locale_admin() { function locale_admin() {
global $id, $edit, $op, $lang; global $id, $edit, $op, $language;
if (!variable_get("locale", 0)) { if (!variable_get("locale", 0)) {
print status("locale disabled."); print status("locale disabled.");
...@@ -160,12 +160,12 @@ function locale_admin() { ...@@ -160,12 +160,12 @@ function locale_admin() {
break; break;
case "Save translations": case "Save translations":
print locale_save(check_input($id), $edit); print locale_save(check_input($id), $edit);
break; break;
case "translated": case "translated":
print locale_translated($lang); print locale_translated($language);
break; break;
case "untranslated": case "untranslated":
print locale_untranslated($lang); print locale_untranslated($language);
break; break;
default: default:
print locale_overview(); print locale_overview();
......
...@@ -349,10 +349,10 @@ function node_admin() { ...@@ -349,10 +349,10 @@ function node_admin() {
case "view": case "view":
print node_module_view(node_get_array(array("nid" => $id)), $type); print node_module_view(node_get_array(array("nid" => $id)), $type);
break; break;
case "Preview": case t("Preview"):
print node_edit_content($edit, $type); print node_edit_content($edit, $type);
break; break;
case "Submit": case t("Submit"):
print status(node_save_content($edit, $type)); print status(node_save_content($edit, $type));
// fall through: // fall through:
default: default:
......
...@@ -349,10 +349,10 @@ function node_admin() { ...@@ -349,10 +349,10 @@ function node_admin() {
case "view": case "view":
print node_module_view(node_get_array(array("nid" => $id)), $type); print node_module_view(node_get_array(array("nid" => $id)), $type);
break; break;
case "Preview": case t("Preview"):
print node_edit_content($edit, $type); print node_edit_content($edit, $type);
break; break;
case "Submit": case t("Submit"):
print status(node_save_content($edit, $type)); print status(node_save_content($edit, $type));
// fall through: // fall through:
default: default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment