# HG changeset patch # User Dan # Date 1198878723 18000 # Node ID ac34de9207628dde6e561105055c628a56bca5af # Parent 993fb077944feac136c8e8a1e0a74cbba2eb8ba9 Finished localization of SpecialUserFuncs diff -r 993fb077944f -r ac34de920762 language/english/user.json --- a/language/english/user.json Fri Dec 28 00:07:53 2007 -0500 +++ b/language/english/user.json Fri Dec 28 16:52:03 2007 -0500 @@ -365,6 +365,31 @@ passreset_err_failed_score: 'ERROR: Your password did not pass the complexity score requirement. You need %config.pw_strength_minimum% points to pass; your password received a score of %inp_score%. Go back', passreset_err_pass_expired: 'Your temporary password has expired. Please request another one.', + // Special:Memberlist + ml_column_username: 'Username', + ml_column_userlevel: 'Title', + ml_column_email: 'E-mail', + ml_column_regtime: 'Registered', + ml_level_guest: 'Guest', + ml_level_member: 'Member', + ml_level_mod: 'Moderator', + ml_level_admin: 'Site administrator', + ml_level_unknown: 'Unknown (level %level%)', + ml_email_nonpublic: 'Non-public', + ml_date_daysago: '%days_ago% days ago', + ml_date_today: 'Today', + ml_date_yesterday: 'Yesterday', + ml_btn_adminuser: 'Administer user', + ml_tip_userpage: 'Click to view this user\'s userpage', + ml_tip_nouserpage: 'This user hasn\'t created a userpage yet, but you can still view profile details by clicking this link.', + ml_lbl_finduser: 'Find a member:', + ml_btn_go: 'Go', + ml_tip_wildcard: 'You may use the following wildcards: * to match multiple characters, ? to match a single character.', + ml_err_nousers_find: 'Sorry - no users that matched your query could be found. Please try some different search terms.', + ml_err_nousers: 'Sorry - no users with usernames that start with that letter could be found.', + ml_msg_matches_zero: 'Search returned no matches', + ml_msg_matches_one: 'Search returned 1 match', + ml_msg_matches: 'Search returned %matches% matches', } } }; diff -r 993fb077944f -r ac34de920762 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Fri Dec 28 00:07:53 2007 -0500 +++ b/plugins/SpecialUserFuncs.php Fri Dec 28 16:52:03 2007 -0500 @@ -1655,16 +1655,16 @@ #
Sorry - no users that matched your query could be found. Please try some different search terms.
' : 'Sorry - no users with usernames that start with that letter could be found.
'; + echo ( isset($_GET['finduser']) ) ? '' . $lang->get('userfuncs_ml_err_nousers_find') . '
' : + '' . $lang->get('userfuncs_ml_err_nousers') . '
'; } else { @@ -1745,37 +1755,41 @@ function username($username, $row) { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + $userpage = $paths->nslist['User'] . sanitize_page_id($username); - $class = ( isPage($userpage) ) ? ' title="Click to view this user\'s userpage"' : ' class="wikilink-nonexistent" title="This user hasn\'t created a userpage yet, but you can still view profile details by clicking this link."'; + $class = ( isPage($userpage) ) ? ' title="' . $lang->get('userfuncs_ml_tip_userpage') . '"' : ' class="wikilink-nonexistent" title="' . $lang->get('userfuncs_ml_tip_nouserpage') . '"'; $anchor = '' . htmlspecialchars($username) . ''; if ( $session->user_level >= USER_LEVEL_ADMIN ) { $anchor .= ' - Administer user'; + onclick="ajaxAdminUser(\'' . addslashes(htmlspecialchars($username)) . '\'); return false;">' . $lang->get('userfuncs_ml_btn_adminuser') . ''; } return $anchor; } function user_level($level, $row) { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; switch ( $level ) { case USER_LEVEL_GUEST: - $s_level = 'Guest'; break; + $s_level = $lang->get('userfuncs_ml_level_guest'); break; case USER_LEVEL_MEMBER: case USER_LEVEL_CHPREF: - $s_level = 'Member'; break; + $s_level = $lang->get('userfuncs_ml_level_member'); break; case USER_LEVEL_MOD: - $s_level = 'Moderator'; break; + $s_level = $lang->get('userfuncs_ml_level_mod'); break; case USER_LEVEL_ADMIN: - $s_level = 'Site administrator'; break; + $s_level = $lang->get('userfuncs_ml_level_admin'); break; default: - $s_level = 'Unknown (level ' . $level . ')'; + $s_level = $lang->get('userfuncs_ml_level_unknown', array( 'level' => $level )); } return $s_level; } function email($addy, $row) { + global $lang; if ( $row['email_public'] == '1' ) { global $email; @@ -1784,7 +1798,7 @@ } else { - return '<Non-public>'; + return '<' . $lang->get('userfuncs_ml_email_nonpublic') . '>'; } } /** @@ -1795,6 +1809,7 @@ function format_date($time) { + global $lang; // Our formattting string to pass to date() // This should not include minute/second info, only today's date in whatever format suits your fancy $formatstring = 'F j, Y'; @@ -1814,16 +1829,16 @@ if ( $then == $days_ago ) { // yes, return $i - return "$i days ago"; + return $lang->get('userfuncs_ml_date_daysago', array('days_ago' => $i)); } } // either yesterday, today, or before 6 days ago switch($then) { case $today: - return 'Today'; + return $lang->get('userfuncs_ml_date_today'); case $yesterday: - return 'Yesterday'; + return $lang->get('userfuncs_ml_date_yesterday'); default: return $then; }