+ ' . $lang->get('history_col_datetime') . '
+ ' . $lang->get('history_col_user') . '
+ ' . $lang->get('history_col_minor') . '
+ ' . $lang->get('history_col_action_taken') . '
+ ' . $lang->get('history_col_extra') . '
+
+ ';
$cls = 'row2';
while($r = $db->fetchrow()) {
@@ -658,23 +682,18 @@
// Action taken
echo '';
// Some of these are sanitized at insert-time. Others follow the newer Enano policy of stripping HTML at runtime.
- if ($r['action']=='prot') echo 'Protected page Reason: ' . $r['edit_summary'];
- elseif($r['action']=='unprot') echo 'Unprotected page Reason: ' . $r['edit_summary'];
- elseif($r['action']=='semiprot') echo 'Semi-protected page Reason: ' . $r['edit_summary'];
- elseif($r['action']=='rename') echo 'Renamed page Old title: '.htmlspecialchars($r['edit_summary']);
- elseif($r['action']=='create') echo 'Created page ';
- elseif($r['action']=='delete') echo 'Deleted page Reason: ' . $r['edit_summary'];
- elseif($r['action']=='reupload') echo 'Uploaded new file version Reason: '.htmlspecialchars($r['edit_summary']);
+ if ($r['action']=='prot') echo $lang->get('history_log_protect') . ' ' . $lang->get('history_extra_reason') . ' ' . $r['edit_summary'];
+ elseif($r['action']=='unprot') echo $lang->get('history_log_unprotect') . ' ' . $lang->get('history_extra_reason') . ' ' . $r['edit_summary'];
+ elseif($r['action']=='semiprot') echo $lang->get('history_log_semiprotect') . ' ' . $lang->get('history_extra_reason') . ' ' . $r['edit_summary'];
+ elseif($r['action']=='rename') echo $lang->get('history_log_rename') . ' ' . $lang->get('history_extra_oldtitle') . ' '.htmlspecialchars($r['edit_summary']);
+ elseif($r['action']=='create') echo $lang->get('history_log_create') . ' ';
+ elseif($r['action']=='delete') echo $lang->get('history_log_delete') . ' ' . $lang->get('history_extra_reason') . ' ' . $r['edit_summary'];
+ elseif($r['action']=='reupload') echo $lang->get('history_log_uploadnew') . ' ' . $lang->get('history_extra_reason') . ' '.htmlspecialchars($r['edit_summary']);
echo ' ';
// Actions!
- echo 'View user contribs ';
- echo 'Revert action ';
-
- //echo '(rollback ) ' . $r['date_string'] . ' ' . $r['author'] . ' (Userpage , Contrib ): ';
-
- if($r['minor_edit']) echo ' - minor edit ';
- echo ' ';
+ echo '' . $lang->get('history_action_contrib') . ' ';
+ echo '' . $lang->get('history_action_revert') . ' ';
echo '';
}
@@ -897,6 +916,7 @@
function comments_raw($page_id, $namespace, $action = false, $flags = Array(), $_ob = '')
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
$pname = $paths->nslist[$namespace] . $page_id;
@@ -937,8 +957,8 @@
$q = 'UPDATE ' . table_prefix.'comments SET approved=' . $a . ' WHERE page_id=\'' . $page_id . '\' AND namespace=\'' . $namespace . '\' AND ' . $where . ';';
$e=$db->sql_query($q);
if(!$e) die('alert(unesape(\''.rawurlencode('Error during query: '.mysql_error().'\n\nQuery:\n' . $q) . '\'));');
- if($a=='1') $v = 'Unapprove';
- else $v = 'Approve';
+ if($a=='1') $v = $lang->get('comment_btn_mod_unapprove');
+ else $v = $lang->get('comment_btn_mod_approve');
echo 'document.getElementById("mdgApproveLink'.intval($_GET['id']).'").innerHTML="' . $v . '";';
break;
}
@@ -966,22 +986,32 @@
WHERE page_id=\'' . $page_id . '\'
AND namespace=\'' . $namespace . '\' ORDER BY c.time ASC;');
if(!$lq) _die('The comment text data could not be selected. '.mysql_error());
- $_ob .= 'Article Comments ';
+ $_ob .= '' . $lang->get('comment_heading') . ' ';
+
$n = ( $session->get_permissions('mod_comments')) ? $db->numrows() : $num_app;
- if($n==1) $s = 'is ' . $n . ' comment'; else $s = 'are ' . $n . ' comments';
- if($n < 1)
+
+ $subst = array(
+ 'num_comments' => $n,
+ 'page_type' => '<FIXME> whatever'
+ );
+
+ $_ob .= '';
+ $_ob .= ( $n == 0 ) ? $lang->get('comment_msg_count_zero', $subst) : ( $n == 1 ? $lang->get('comment_msg_count_one', $subst) : $lang->get('comment_msg_count_plural', $subst) );
+
+ if ( $session->get_permissions('mod_comments') && $num_unapp > 0 )
{
- $_ob .= '
There are currently no comments on this '.strtolower($namespace).'';
- if($namespace != 'Article') $_ob .= ' page';
- $_ob .= '.
';
- } else $_ob .= 'There ' . $s . ' on this article.';
- if($session->get_permissions('mod_comments') && $num_unapp > 0) $_ob .= ' ' . $num_unapp . ' of those are unapproved. ';
- elseif(!$session->get_permissions('mod_comments') && $num_unapp > 0) { $u = ($num_unapp == 1) ? "is $num_unapp comment" : "are $num_unapp comments"; $_ob .= ' However, there ' . $u . ' awating approval.'; }
+ $_ob .= ' ' . $lang->get('comment_msg_count_unapp_mod', array( 'num_unapp' => $num_unapp )) . ' ';
+ }
+ else if ( !$session->get_permissions('mod_comments') && $num_unapp > 0 )
+ {
+ $ls = ( $num_unapp == 1 ) ? 'comment_msg_count_unapp_one' : 'comment_msg_count_unapp_plural';
+ $_ob .= ' ' . $lang->get($ls, array( 'num_unapp' => $num_unapp )) . ' ';
+ }
$_ob .= '
';
$list = 'list = { ';
// _die(htmlspecialchars($ttext));
$i = -1;
- while($row = $db->fetchrow($lq))
+ while ( $row = $db->fetchrow($lq) )
{
$i++;
$strings = Array();
@@ -995,14 +1025,14 @@
// Determine the name, and whether to link to the user page or not
$name = '';
- if($row['user_id'] > 0) $name .= '';
+ if($row['user_id'] > 1) $name .= ' ';
$name .= $row['name'];
- if($row['user_id'] > 0) $name .= ' ';
+ if($row['user_id'] > 1) $name .= '';
$strings['NAME'] = $name; unset($name);
// Subject
$s = $row['subject'];
- if(!$row['approved']) $s .= ' (Unapproved) ';
+ if(!$row['approved']) $s .= ' ' . $lang->get('comment_msg_note_unapp') . ' ';
$strings['SUBJECT'] = $s;
// Date and time
@@ -1013,16 +1043,17 @@
{
default:
case USER_LEVEL_GUEST:
- $l = 'Guest';
+ $l = $lang->get('user_type_guest');
break;
case USER_LEVEL_MEMBER:
- $l = 'Member';
+ case USER_LEVEL_CHPREF:
+ $l = $lang->get('user_type_member');
break;
case USER_LEVEL_MOD:
- $l = 'Moderator';
+ $l = $lang->get('user_type_mod');
break;
case USER_LEVEL_ADMIN:
- $l = 'Administrator';
+ $l = $lang->get('user_type_admin');
break;
}
$strings['USER_LEVEL'] = $l; unset($l);
@@ -1033,10 +1064,10 @@
if($session->get_permissions('edit_comments'))
{
// Edit link
- $strings['EDIT_LINK'] = 'edit ';
+ $strings['EDIT_LINK'] = '' . $lang->get('comment_btn_edit') . ' ';
// Delete link
- $strings['DELETE_LINK'] = 'delete ';
+ $strings['DELETE_LINK'] = '' . $lang->get('comment_btn_delete') . ' ';
}
else
{
@@ -1048,19 +1079,19 @@
}
// Send PM link
- $strings['SEND_PM_LINK'] = ( $session->user_logged_in && $row['user_id'] > 0 ) ? 'Send private message ' : '';
+ $strings['SEND_PM_LINK'] = ( $session->user_logged_in && $row['user_id'] > 1 ) ? '' . $lang->get('comment_btn_send_privmsg') . ' ' : '';
// Add Buddy link
- $strings['ADD_BUDDY_LINK'] = ( $session->user_logged_in && $row['user_id'] > 0 ) ? 'Add to buddy list ' : '';
+ $strings['ADD_BUDDY_LINK'] = ( $session->user_logged_in && $row['user_id'] > 1 ) ? '' . $lang->get('comment_btn_add_buddy') . ' ' : '';
// Mod links
$applink = '';
$applink .= '';
- if($row['approved']) $applink .= 'Unapprove';
- else $applink .= 'Approve';
+ if($row['approved']) $applink .= $lang->get('comment_btn_mod_unapprove');
+ else $applink .= $lang->get('comment_btn_mod_approve');
$applink .= ' ';
$strings['MOD_APPROVE_LINK'] = $applink; unset($applink);
- $strings['MOD_DELETE_LINK'] = 'Delete ';
+ $strings['MOD_DELETE_LINK'] = '' . $lang->get('comment_btn_mod_delete') . ' ';
// Signature
$strings['SIGNATURE'] = '';
@@ -1078,32 +1109,31 @@
}
if(getConfig('comments_need_login') != '2' || $session->user_logged_in)
{
- if(!$session->get_permissions('post_comments'))
- {
- $_ob .= 'Got something to say? Access to post comments on this page is denied.
';
- }
- else
+ if($session->get_permissions('post_comments'))
{
- $_ob .= 'Got something to say? If you have comments or suggestions on this article, you can shout it out here.';
- if(getConfig('approve_comments')=='1') $_ob .= ' Before your comment will be visible to the public, a moderator will have to approve it.';
- if(getConfig('comments_need_login') == '1' && !$session->user_logged_in) $_ob .= ' Because you are not logged in, you will need to enter a visual confirmation before your comment will be posted.';
+ $_ob .= '' . $lang->get('comment_postform_title') . ' ';
+ $_ob .= $lang->get('comment_postform_blurb');
+ if(getConfig('approve_comments')=='1') $_ob .= ' ' . $lang->get('comment_postform_blurb_unapp');
+ if(getConfig('comments_need_login') == '1' && !$session->user_logged_in)
+ {
+ $_ob .= ' ' . $lang->get('comment_postform_blurb_captcha');
+ }
$sn = $session->user_logged_in ? $session->username . ' ' : ' ';
- $_ob .= '
+ $_ob .= '
';
@@ -1818,6 +1848,7 @@
function pagediff($page_id, $namespace, $id1, $id2)
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
if(!$session->get_permissions('history_view'))
return 'Access denied';
if(!preg_match('#^([0-9]+)$#', (string)$id1) ||
@@ -1836,7 +1867,7 @@
$time1 = date('F d, Y h:i a', $id1);
$time2 = date('F d, Y h:i a', $id2);
$_ob = "
- Comparing revisions: {$time1} → {$time2}
+ " . $lang->get('history_lbl_comparingrevisions') . " {$time1} → {$time2}
";
// Free some memory
unset($row1, $row2, $q1, $q2);