mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Mark strings for translation.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
162414332f
commit
fea0df34e3
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
$title = 'Users';
|
||||
require_once('../wp-includes/wp-l10n.php');
|
||||
|
||||
$title = __('Users');
|
||||
/* <Team> */
|
||||
|
||||
$wpvarstoreset = array('action','standalone','redirect','profile');
|
||||
@ -35,31 +37,31 @@ case 'adduser':
|
||||
|
||||
/* checking login has been typed */
|
||||
if ($user_login == '') {
|
||||
die ('<strong>ERROR</strong>: Please enter a login.');
|
||||
die (__('<strong>ERROR</strong>: Please enter a login.'));
|
||||
}
|
||||
|
||||
/* checking the password has been typed twice */
|
||||
if ($pass1 == '' || $pass2 == '') {
|
||||
die ('<strong>ERROR</strong>: Please enter your password twice.');
|
||||
die (__('<strong>ERROR</strong>: Please enter your password twice.'));
|
||||
}
|
||||
|
||||
/* checking the password has been typed twice the same */
|
||||
if ($pass1 != $pass2) {
|
||||
die ('<strong>ERROR</strong>: Please type the same password in the two password fields.');
|
||||
die (__('<strong>ERROR</strong>: Please type the same password in the two password fields.'));
|
||||
}
|
||||
$user_nickname = $user_login;
|
||||
|
||||
/* checking e-mail address */
|
||||
if ($user_email == '') {
|
||||
die ('<strong>ERROR</strong>: Please type your e-mail address.');
|
||||
die (__('<strong>ERROR</strong>: Please type your e-mail address.'));
|
||||
} else if (!is_email($user_email)) {
|
||||
die ('<strong>ERROR</strong>: The email address isn’t correct.');
|
||||
die (__('<strong>ERROR</strong>: The email address isn’t correct.'));
|
||||
}
|
||||
|
||||
/* checking the login isn't already used by another user */
|
||||
$loginthere = $wpdb->get_var("SELECT user_login FROM $tableusers WHERE user_login = '$user_login'");
|
||||
if ($loginthere) {
|
||||
die ('<strong>ERROR</strong>: This login is already registered, please choose another one.');
|
||||
die (__('<strong>ERROR</strong>: This login is already registered, please choose another one.'));
|
||||
}
|
||||
|
||||
|
||||
@ -78,7 +80,7 @@ case 'adduser':
|
||||
('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_domain', '$user_browser', '$now', '$new_users_can_blog', 'nickname', '$user_firstname', '$user_lastname', '$user_nicename')");
|
||||
|
||||
if ($result == false) {
|
||||
die ('<strong>ERROR</strong>: Couldn’t register you!');
|
||||
die (__('<strong>ERROR</strong>: Couldn’t register you!'));
|
||||
}
|
||||
|
||||
$stars = '';
|
||||
@ -109,7 +111,7 @@ case 'promote':
|
||||
$usertopromote_level = $user_data->user_level;
|
||||
|
||||
if ($user_level <= $usertopromote_level) {
|
||||
die('Can’t change the level of a user whose level is higher than yours.');
|
||||
die(__('Can’t change the level of a user whose level is higher than yours.'));
|
||||
}
|
||||
|
||||
if ('up' == $prom) {
|
||||
@ -140,7 +142,7 @@ case 'delete':
|
||||
$usertodelete_level = $user_data->user_level;
|
||||
|
||||
if ($user_level <= $usertodelete_level)
|
||||
die('Can’t delete a user whose level is higher than yours.');
|
||||
die(__('Can’t delete a user whose level is higher than yours.'));
|
||||
|
||||
$post_ids = $wpdb->get_col("SELECT ID FROM $tableposts WHERE post_author = $id");
|
||||
$post_ids = implode(',', $post_ids);
|
||||
@ -168,19 +170,19 @@ default:
|
||||
include ('admin-header.php');
|
||||
?>
|
||||
<?php if ($_GET['deleted']) : ?>
|
||||
<div class="updated"><p>User deleted.</p></div>
|
||||
<div class="updated"><p><?php _e('User deleted.') ?></p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
<h2>Authors</h2>
|
||||
<h2><?php _e('Authors') ?></h2>
|
||||
<table cellpadding="3" cellspacing="3" width="100%">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nickname</th>
|
||||
<th>Name</th>
|
||||
<th>E-mail</th>
|
||||
<th>URI</th>
|
||||
<th>Level</th>
|
||||
<th>Posts</th>
|
||||
<th><?php _e('ID') ?></th>
|
||||
<th><?php _e('Nickname') ?></th>
|
||||
<th><?php _e('Name') ?></th>
|
||||
<th><?php _e('E-mail') ?></th>
|
||||
<th><?php _e('URI') ?></th>
|
||||
<th><?php _e('Level') ?></th>
|
||||
<th><?php _e('Posts') ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$users = $wpdb->get_results("SELECT ID FROM $tableusers WHERE user_level > 0 ORDER BY ID");
|
||||
@ -196,13 +198,13 @@ default:
|
||||
$short_url = substr($short_url, 0, 32).'...';
|
||||
$style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
|
||||
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $tableposts WHERE post_author = $user->ID and post_status = 'publish'");
|
||||
if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title='View posts'>$numposts</a>";
|
||||
if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title='" . __('View posts') . "'>$numposts</a>";
|
||||
echo "
|
||||
<tr $style>
|
||||
<td align='center'>$user_data->ID</td>
|
||||
<td><strong>$user_data->user_nickname</strong></td>
|
||||
<td>$user_data->user_firstname $user_data->user_lastname</td>
|
||||
<td><a href='mailto:$email' title='e-mail: $email'>$email</a></td>
|
||||
<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
|
||||
<td><a href='$url' title='website: $url'>$short_url</a></td>
|
||||
<td align='center'>";
|
||||
if (($user_level >= 2) and ($user_level > $user_data->user_level) and ($user_data->user_level > 0))
|
||||
@ -224,15 +226,15 @@ default:
|
||||
if ($users) {
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h2>Users</h2>
|
||||
<h2><?php _e('Users') ?></h2>
|
||||
<table cellpadding="3" cellspacing="3" width="100%">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nickname</th>
|
||||
<th>Name</th>
|
||||
<th>E-mail</th>
|
||||
<th>URI</th>
|
||||
<th>Level</th>
|
||||
<th><?php _e('ID') ?></th>
|
||||
<th><?php _e('Nickname') ?></th>
|
||||
<th><?php _e('Name') ?></th>
|
||||
<th><?php _e('E-mail') ?></th>
|
||||
<th><?php _e('URI') ?></th>
|
||||
<th><?php _e('Level') ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($users as $user) {
|
||||
@ -250,7 +252,7 @@ echo "\n<tr $style>
|
||||
<td align='center'>$user_data->ID</td>
|
||||
<td><strong>$user_data->user_nickname</td>
|
||||
<td>$user_data->user_firstname $user_data->user_lastname</td>
|
||||
<td><a href='mailto:$email' title='e-mail: $email'>$email</a></td>
|
||||
<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
|
||||
<td><a href='$url' title='website: $url'>$short_url</a></td>
|
||||
<td align='center'>";
|
||||
if ($user_level >= 3)
|
||||
@ -263,48 +265,47 @@ echo "\n<tr $style>
|
||||
?>
|
||||
|
||||
</table>
|
||||
<p>To delete a user, bring his level to zero, then click on the red X.<br />
|
||||
<strong>Warning:</strong> deleting a user also deletes all posts made by this user.
|
||||
</p>
|
||||
<?php _e('<p>To delete a user, bring his level to zero, then click on the red X.<br />
|
||||
<strong>Warning:</strong> deleting a user also deletes all posts made by this user.</p>') ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
<div class="wrap">
|
||||
<h2>Add User</h2>
|
||||
<p>Users can <a href="<?php echo get_settings('siteurl'); ?>/wp-register.php">register themselves</a> or you can manually create users here.</p>
|
||||
<h2><?php _e('Add User') ?></h2>
|
||||
<?php printf(__('<p>Users can <a href="%s/wp-register.php">register themselves</a> or you can manually create users here.</p>'), get_settings('siteurl')); ?>
|
||||
<form action="" method="post" name="adduser" id="adduser">
|
||||
<table border="0" cellspacing="5" cellpadding="3">
|
||||
<tr>
|
||||
<th scope="row">Nickname
|
||||
<th scope="row"><?php _e('Nickname') ?>
|
||||
<input name="action" type="hidden" id="action" value="adduser" /></th>
|
||||
<td><input name="user_login" type="text" id="user_login" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">First Name </th>
|
||||
<th scope="row"><?php _e('First Name') ?> </th>
|
||||
<td><input name="firstname" type="text" id="firstname" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Last Name </th>
|
||||
<th scope="row"><?php _e('Last Name') ?> </th>
|
||||
<td><input name="lastname" type="text" id="lastname" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Email</th>
|
||||
<th scope="row"><?php _e('Email') ?></th>
|
||||
<td><input name="email" type="text" id="email" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">URI</th>
|
||||
<th scope="row"><?php _e('URI') ?></th>
|
||||
<td><input name="uri" type="text" id="uri" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Password (twice) </th>
|
||||
<th scope="row"><?php _e('Password (twice)') ?> </th>
|
||||
<td><input name="pass1" type="password" id="pass1" />
|
||||
<br />
|
||||
<input name="pass2" type="password" id="pass2" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<input name="adduser" type="submit" id="adduser" value="Add User">
|
||||
<input name="adduser" type="submit" id="adduser" value="<?php _e('Add User') ?>">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
@ -315,4 +316,4 @@ break;
|
||||
|
||||
/* </Team> */
|
||||
include('admin-footer.php');
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user