From cc381c14613b4c4539d74f38ec58196f6dfcdaa0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 1 Nov 2002 10:47:20 +0000 Subject: - Fixed glitch in block module: the admin links were not composed correctly. Patch by Stefan. - Added missing t() functions and improved the %x directives for better readability and to ease the process of translating your site. Patches by Stefan. - Made two small additions to the 'code-clean.sh' script; it will now remove patch related junk. NOTES: - I removed the · related bits. Let's tackle these later on in a separate patch after we got some sort of consensus. - I removed the 'module_exist("drupal")' check in the user module; I *think* it is incomplete and therefore incorrect. - Stefan, try using quotes in your translations and check whether everything still works. Example: translate the "Create account" button to "Create \"haha\" account \'hihi\'" and see if you can still create new accounts. Maybe automate this using a quick hack in the locale module ... --- modules/comment.module | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/comment.module') diff --git a/modules/comment.module b/modules/comment.module index 6dc192c73..4c0dd1b64 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -23,20 +23,20 @@ function comment_system($field) { function comment_conf_options() { global $cmodes, $corder; - $output .= form_select("Default display mode", "comment_default_mode", variable_get("comment_default_mode", 4), $cmodes, "The default view for comments. Expanded views display the body of the comment. Threaded views keep replies together."); - $output .= form_select("Default display order", "comment_default_order", variable_get("comment_default_order", 1), $corder, "The default sorting for new users and anonymous users while viewing comments. These users may change their view using the comment control panel. For registered users, this change is remembered as a persistent user preference."); - $output .= form_textfield("Default comments per page", "comment_default_per_page", variable_get("comment_default_per_page", "50"), 5, 5, "Default number of comments for each page; more comments are distributed in several pages."); + $output .= form_select(t("Default display mode"), "comment_default_mode", variable_get("comment_default_mode", 4), $cmodes, t("The default view for comments. Expanded views display the body of the comment. Threaded views keep replies together.")); + $output .= form_select(t("Default display order"), "comment_default_order", variable_get("comment_default_order", 1), $corder, t("The default sorting for new users and anonymous users while viewing comments. These users may change their view using the comment control panel. For registered users, this change is remembered as a persistent user preference.")); + $output .= form_textfield(t("Default comments per page"), "comment_default_per_page", variable_get("comment_default_per_page", "50"), 5, 5, t("Default number of comments for each page; more comments are distributed in several pages.")); $result = db_query("SELECT fid, filter FROM moderation_filters"); while ($filter = db_fetch_object($result)) { $thresholds[$filter->fid] = ($filter->filter); } - $output .= form_select("Default threshold", "comment_default_threshold", variable_get("comment_default_threshold", 0), $thresholds, "Thresholds are values below which comments are hidden. These threshholds are useful for busy sites which wan tto hide poor comments from most users."); + $output .= form_select(t("Default threshold"), "comment_default_threshold", variable_get("comment_default_threshold", 0), $thresholds, t("Thresholds are values below which comments are hidden. These threshholds are useful for busy sites which wan tto hide poor comments from most users.")); - $output .= form_select("Preview comment", "comment_preview", variable_get("comment_preview", 1), array("optional", "required"), "Must users preview comments before submitting?"); - $output .= form_select("New comment form", "comment_new_form", variable_get("comment_new_form", 0), array("disabled", "enabled"), "New comment form in the node page?"); - $output .= form_select("Comment controls", "comment_controls", variable_get("comment_controls", 0), array("above comments", "below comments", "above and below"), "Position of the comment controls box."); + $output .= form_select(t("Preview comment"), "comment_preview", variable_get("comment_preview", 1), array(t("Optional"), t("Required")), t("Must users preview comments before submitting?")); + $output .= form_select(t("New comment form"), "comment_new_form", variable_get("comment_new_form", 0), array(t("Disabled"), t("Enabled")), t("New comment form in the node page?")); + $output .= form_select(t("Comment controls"), "comment_controls", variable_get("comment_controls", 0), array(t("Above comments"), t("Below comments"), t("Above and below")), t("Position of the comment controls box.")); return $output; } @@ -795,11 +795,11 @@ function comment_admin_overview($status = 0, $comment_page = 0) { $start = $comment_page * $comments_per_page; - $output .= $status ? "

Non-published comments

\n" : "

Published comments

"; + $output .= $status ? "

" . t("Non-published comments") . "

\n" : "

" . t("Published comments") . "

"; $result = db_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN users u ON u.uid = c.uid WHERE c.status = '%d' ORDER BY timestamp DESC LIMIT $start, $comments_per_page", $status); $output .= "\n"; - $output .= " \n"; + $output .= " \n"; while ($comment = db_fetch_object($result)) { $output .= " \n"; } @@ -851,7 +851,7 @@ function comment_mod_matrix($edit) { } $output .= "
subjectauthordatepublishedoperations
" . t("subject") . "" . t("author") . "" . t("date") . "" . t("published") . "" . t("operations") . "
". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid, array("title" => htmlentities($comment->comment))) ."". format_name($comment) ."". format_date($comment->timestamp, "small") ."". ($comment->status == 0 ? "yes" : "no") ."". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)) ."". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."
"; - $output .= " "; + $output .= " "; $result = db_query("SELECT mid, vote FROM moderation_votes ORDER BY weight"); while ($vote = db_fetch_object($result)) { @@ -881,7 +881,7 @@ function comment_mod_roles($edit) { $result = db_query("SELECT r.rid, r.name FROM role r, permission p WHERE r.rid = p.rid AND p.perm LIKE '%post comments%'"); $output .= "
votes". implode("", array_values($role_names)) ."
" . t("votes") . "". implode("", array_values($role_names)) ."
"; - $output .= " "; + $output .= " "; while ($role = db_fetch_object($result)) { $output .= ""; @@ -911,9 +911,9 @@ function comment_mod_votes($edit) { $mid = 0; } - $output .= "

Moderation votes overview

"; + $output .= "

" . t("Moderation votes overview") . "

"; $output .= "
user roleinitial score
" . t("user role") . "" . t("initial score") . "
$role->name
"; - $output .= " "; + $output .= " "; $result = db_query("SELECT mid, vote, weight FROM moderation_votes ORDER BY weight"); while ($vote = db_fetch_object($result)) { @@ -960,7 +960,7 @@ function comment_mod_filters($edit) { $output .= "

Comment threshhold overview

"; $output .= "

Optional. If your site gets lots of comments, you may offer your users threshholds, which are used to hide all comments whose moderation score is lower than the threshhold. This cuts down on clutter while your readers view the site. These threshholds appear in the Comment Control Panel.

"; $output .= "
votesweightoperations
" . t("votes") . "" . t("weight") . "" . t("operations") . "
"; - $output .= " "; + $output .= " "; $result = db_query("SELECT fid, filter, minimum FROM moderation_filters ORDER BY minimum"); while ($filter = db_fetch_object($result)) { -- cgit v1.2.3
nameminimum scoreoperations
" . t("name") . "" . t("minimum score") . "" . t("operations") . "