# HG changeset patch
# User Dan
# Date 1200979334 18000
# Node ID ed4f3ee072be9c4d86965a7fc98e231c8c9759cd
# Parent ee4defc9321abd3013c72aacd99780812f4a3c26
Finished localizing PageProcessor, we hope
diff -r ee4defc9321a -r ed4f3ee072be includes/pageprocess.php
--- a/includes/pageprocess.php Mon Jan 21 23:02:16 2008 -0500
+++ b/includes/pageprocess.php Tue Jan 22 00:22:14 2008 -0500
@@ -673,7 +673,7 @@
$page_data = $paths->pages[$page_id_key];
$title = ( isset($page_data['name']) ) ? $page_data['name'] : $paths->nslist[$oldtarget[1]] . htmlspecialchars( str_replace('_', ' ', dirtify_page_id( $oldtarget[0] ) ) );
$a = '' . $title . '';
- echo '(Redirected from ' . $a . ')
';
+ echo '' . $lang->get('page_msg_redirected_from', array('from' => $a)) . '
';
}
}
display_page_headers();
@@ -681,7 +681,17 @@
if ( $this->revision_id )
{
- echo '
';
+ echo '
+ ' . $lang->get('page_msg_archived_title') . '
+ ' . $lang->get('page_msg_archived_body', array(
+ 'archive_date' => enano_date('F d, Y', $this->revision_id),
+ 'archive_time' => enano_date('h:i a', $this->revision_id),
+ 'current_link' => makeUrlNS($this->namespace, $this->page_id),
+ 'restore_link' => makeUrlNS($this->namespace, $this->page_id, 'do=rollback&id='.$this->revision_id),
+ 'restore_onclick' => 'ajaxRollback(\''.$this->revision_id.'\'); return false;',
+ )) . '
+
+
';
}
if ( $redir_enabled )
@@ -948,29 +958,29 @@
// Basic user info
- echo 'All about ' . htmlspecialchars($target_username) . ' |
';
+ echo '' . $lang->get('userpage_heading_basics', array('username' => htmlspecialchars($target_username))) . ' |
';
if ( $userdata['user_has_avatar'] == '1' )
{
echo ' |
';
}
- echo 'Joined: ' . enano_date('F d, Y h:i a', $userdata['reg_time']) . ' |
';
- echo 'Total comments: ' . $userdata['n_comments'] . ' |
';
+ echo '' . $lang->get('userpage_lbl_joined') . ' ' . enano_date('F d, Y h:i a', $userdata['reg_time']) . ' |
';
+ echo '' . $lang->get('userpage_lbl_num_comments') . ' ' . $userdata['n_comments'] . ' |
';
if ( !empty($userdata['real_name']) )
{
- echo 'Real name: ' . $userdata['real_name'] . ' |
';
+ echo '' . $lang->get('userpage_lbl_real_name') . ' ' . $userdata['real_name'] . ' |
';
}
// Administer user button
if ( $session->user_level >= USER_LEVEL_ADMIN )
{
- echo 'Administer user |
';
+ echo '' . $lang->get('userpage_btn_administer_user') . ' |
';
}
// Comments
- echo '' . htmlspecialchars($target_username) . '\'s latest comments |
';
+ echo '' . $lang->get('userpage_heading_comments', array('username' => htmlspecialchars($target_username))) . ' |
';
$q = $db->sql_query('SELECT page_id, namespace, subject, time FROM '.table_prefix.'comments WHERE name=\'' . $db->escape($target_username) . '\' AND user_id=' . $userdata['authoritative_uid'] . ' AND approved=1 ORDER BY time DESC LIMIT 5;');
if ( !$q )
$db->_die();
@@ -1001,7 +1011,7 @@
$tpl = '
class="wikilink-nonexistent">{PAGE}
- Posted {DATE}
+ {lang:userpage_comments_lbl_posted} {DATE}
{SUBJECT}
|
';
@@ -1040,7 +1050,7 @@
}
else
{
- echo 'This user has not posted any comments. |
';
+ echo '' . $lang->get('userpage_msg_no_comments') . ' |
';
}
echo '';
@@ -1093,7 +1103,7 @@
// Contact information
- echo 'Get in touch |
';
+ echo '' . $lang->get('userpage_heading_contact') . ' |
';
$class = 'row3';
@@ -1101,71 +1111,71 @@
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
$email_link = $email->encryptEmail($userdata['email']);
- echo 'E-mail address: ' . $email_link . ' |
';
+ echo '' . $lang->get('userpage_lbl_email') . ' ' . $email_link . ' |
';
}
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
if ( $session->user_logged_in )
{
- echo 'Send ' . htmlspecialchars($target_username) . ' a Private Message! |
';
+ echo '' . $lang->get('userpage_btn_send_pm', array('username' => htmlspecialchars($target_username), 'pm_link' => makeUrlNS('Special', 'PrivateMessages/Compose/to/' . $this->page_id, false, true))) . ' |
';
}
else
{
- echo 'You could send ' . htmlspecialchars($target_username) . ' a private message if you were logged in. |
';
+ echo '' . $lang->get('userpage_btn_send_pm_guest', array('username' => htmlspecialchars($target_username), 'login_flags' => 'href="' . makeUrlNS('Special', 'Login/' . $paths->nslist[$this->namespace] . $this->page_id) . '" onclick="ajaxStartLogin(); return false;"')) . ' |
';
}
if ( !empty($userdata['user_aim']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo 'AIM: ' . $userdata['user_aim'] . ' |
';
+ echo '' . $lang->get('userpage_lbl_aim') . ' ' . $userdata['user_aim'] . ' |
';
}
if ( !empty($userdata['user_yahoo']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo 'Yahoo! IM: ' . $userdata['user_yahoo'] . ' |
';
+ echo '' . $lang->get('userpage_lbl_yim') . ' ' . $userdata['user_yahoo'] . ' |
';
}
if ( !empty($userdata['user_msn']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
$email_link = $email->encryptEmail($userdata['user_msn']);
- echo 'WLM: ' . $email_link . ' |
';
+ echo '' . $lang->get('userpage_lbl_wlm') . ' ' . $email_link . ' |
';
}
if ( !empty($userdata['user_xmpp']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
$email_link = $email->encryptEmail($userdata['user_xmpp']);
- echo 'XMPP/Jabber: ' . $email_link . ' |
';
+ echo '' . $lang->get('userpage_lbl_xmpp') . ' ' . $email_link . ' |
';
}
// Real life
- echo '' . htmlspecialchars($target_username) . ' in real life |
';
+ echo '' . $lang->get('userpage_heading_real_life', array('username' => htmlspecialchars($target_username))) . ' |
';
if ( !empty($userdata['user_location']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo 'Location: ' . $userdata['user_location'] . ' |
';
+ echo '' . $lang->get('userpage_lbl_location') . ' ' . $userdata['user_location'] . ' |
';
}
if ( !empty($userdata['user_job']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo 'Job/occupation: ' . $userdata['user_job'] . ' |
';
+ echo '' . $lang->get('userpage_lbl_job') . ' ' . $userdata['user_job'] . ' |
';
}
if ( !empty($userdata['user_hobbies']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo 'Enjoys: ' . $userdata['user_hobbies'] . ' |
';
+ echo '' . $lang->get('userpage_lbl_hobbies') . ' ' . $userdata['user_hobbies'] . ' |
';
}
if ( empty($userdata['user_location']) && empty($userdata['user_job']) && empty($userdata['user_hobbies']) )
{
$class = ( $class == 'row1' ) ? 'row3' : 'row1';
- echo '' . htmlspecialchars($target_username) . ' hasn\'t posted any real-life contact information. |
';
+ echo '' . $lang->get('userpage_msg_no_contact_info', array('username' => htmlspecialchars($target_username))) . ' |
';
}
$code = $plugins->setHook('userpage_sidebar_right');
@@ -1181,7 +1191,10 @@
else:
- echo 'Additional information: user "' . htmlspecialchars($target_username) . '" does not exist.
';
+ if ( !is_valid_ip($target_username) )
+ {
+ echo '' . $lang->get('userpage_msg_user_not_exist', array('username' => htmlspecialchars($target_username))) . '
';
+ }
endif;
diff -r ee4defc9321a -r ed4f3ee072be language/english/core.json
--- a/language/english/core.json Mon Jan 21 23:02:16 2008 -0500
+++ b/language/english/core.json Tue Jan 22 00:22:14 2008 -0500
@@ -110,6 +110,10 @@
To create a redirect page, make the first characters in the page content #redirect [[Page_ID]]. For more information, see the
Enano Wiki formatting guide.
This page redirects to %redirect_target%.',
+ msg_redirected_from: '(Redirected from %from%)',
+
+ msg_archived_title: 'Notice:',
+ msg_archived_body: 'The page you are viewing was archived on %archive_date% at %archive_time%.
View current version | Restore this version',
autosuggest_heading: 'Page name matches',
autosuggest_col_name: 'Page title',
diff -r ee4defc9321a -r ed4f3ee072be language/english/user.json
--- a/language/english/user.json Mon Jan 21 23:02:16 2008 -0500
+++ b/language/english/user.json Tue Jan 22 00:22:14 2008 -0500
@@ -12,7 +12,7 @@
var enano_lang = {
categories: [
- 'user', 'usercp', 'groupcp', 'privmsgs', 'userfuncs',
+ 'user', 'usercp', 'groupcp', 'privmsgs', 'userfuncs', 'userpage',
],
strings: {
meta: {
@@ -21,6 +21,7 @@
groupcp: 'Group control panel',
privmsgs: 'Private message and buddy list CP',
userfuncs: 'User management pages',
+ userpage: 'User pages',
},
user: {
login_message_short: 'Please enter your username and password to log in.',
@@ -475,6 +476,30 @@
ml_msg_matches_zero: 'Search returned no matches',
ml_msg_matches_one: 'Search returned 1 match',
ml_msg_matches: 'Search returned %matches% matches',
+ },
+ userpage: {
+ heading_basics: 'All about %username%',
+ lbl_joined: 'Joined:',
+ lbl_num_comments: 'Total comments:',
+ lbl_real_name: 'Real name:',
+ btn_administer_user: 'Administer user',
+ heading_comments: '%username%\'s latest comments',
+ comments_lbl_posted: 'Posted',
+ msg_no_comments: 'This user has not posted any comments.',
+ heading_contact: 'Get in touch',
+ lbl_email: 'E-mail address:',
+ btn_send_pm: 'Send %username% a Private Message!',
+ btn_send_pm_guest: 'You could send %username% a Private Message if you were logged in.',
+ lbl_aim: 'AIM:',
+ lbl_yim: 'Yahoo! IM:',
+ lbl_wlm: 'WLM:',
+ lbl_xmpp: 'XMPP/Jabber™:',
+ heading_real_life: '%username% in real life',
+ lbl_location: 'Location:',
+ lbl_job: 'Job/occupation:',
+ lbl_hobbies: 'Enjoys:',
+ msg_no_contact_info: '%username% hasn\'t posted any real-life contact information.',
+ msg_user_not_exist: 'Additional information: user "%username%" does not exist.',
}
}
};