Make WordPress Core


Ignore:
Timestamp:
04/25/2004 04:24:06 AM (21 years ago)
Author:
rboren
Message:

Mark strings for translation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/users.php

    r1108 r1165  
    11<?php
    2 $title = 'Users';
     2require_once('../wp-includes/wp-l10n.php');
     3
     4$title = __('Users');
    35/* <Team> */
    46   
     
    3638    /* checking login has been typed */
    3739    if ($user_login == '') {
    38         die ('<strong>ERROR</strong>: Please enter a login.');
     40        die (__('<strong>ERROR</strong>: Please enter a login.'));
    3941    }
    4042
    4143    /* checking the password has been typed twice */
    4244    if ($pass1 == '' || $pass2 == '') {
    43         die ('<strong>ERROR</strong>: Please enter your password twice.');
     45        die (__('<strong>ERROR</strong>: Please enter your password twice.'));
    4446    }
    4547
    4648    /* checking the password has been typed twice the same */
    4749    if ($pass1 != $pass2)   {
    48         die ('<strong>ERROR</strong>: Please type the same password in the two password fields.');
     50        die (__('<strong>ERROR</strong>: Please type the same password in the two password fields.'));
    4951    }
    5052    $user_nickname = $user_login;
     
    5254    /* checking e-mail address */
    5355    if ($user_email == '') {
    54         die ('<strong>ERROR</strong>: Please type your e-mail address.');
     56        die (__('<strong>ERROR</strong>: Please type your e-mail address.'));
    5557    } else if (!is_email($user_email)) {
    56         die ('<strong>ERROR</strong>: The email address isn&#8217;t correct.');
     58        die (__('<strong>ERROR</strong>: The email address isn&#8217;t correct.'));
    5759    }
    5860
     
    6062    $loginthere = $wpdb->get_var("SELECT user_login FROM $tableusers WHERE user_login = '$user_login'");
    6163    if ($loginthere) {
    62         die ('<strong>ERROR</strong>: This login is already registered, please choose another one.');
     64        die (__('<strong>ERROR</strong>: This login is already registered, please choose another one.'));
    6365    }
    6466
     
    7981   
    8082    if ($result == false) {
    81         die ('<strong>ERROR</strong>: Couldn&#8217;t register you!');
     83        die (__('<strong>ERROR</strong>: Couldn&#8217;t register you!'));
    8284    }
    8385
     
    110112
    111113    if ($user_level <= $usertopromote_level) {
    112         die('Can&#8217;t change the level of a user whose level is higher than yours.');
     114        die(__('Can&#8217;t change the level of a user whose level is higher than yours.'));
    113115    }
    114116
     
    141143
    142144    if ($user_level <= $usertodelete_level)
    143         die('Can&#8217;t delete a user whose level is higher than yours.');
     145        die(__('Can&#8217;t delete a user whose level is higher than yours.'));
    144146
    145147    $post_ids = $wpdb->get_col("SELECT ID FROM $tableposts WHERE post_author = $id");
     
    169171    ?>
    170172<?php if ($_GET['deleted']) : ?>
    171 <div class="updated"><p>User deleted.</p></div>
     173<div class="updated"><p><?php _e('User deleted.') ?></p></div>
    172174<?php endif; ?>
    173175<div class="wrap">
    174   <h2>Authors</h2>
     176  <h2><?php _e('Authors') ?></h2>
    175177  <table cellpadding="3" cellspacing="3" width="100%">
    176178    <tr>
    177     <th>ID</th>
    178     <th>Nickname</th>
    179     <th>Name</th>
    180     <th>E-mail</th>
    181     <th>URI</th>
    182     <th>Level</th>
    183     <th>Posts</th>
     179    <th><?php _e('ID') ?></th>
     180    <th><?php _e('Nickname') ?></th>
     181    <th><?php _e('Name') ?></th>
     182    <th><?php _e('E-mail') ?></th>
     183    <th><?php _e('URI') ?></th>
     184    <th><?php _e('Level') ?></th>
     185    <th><?php _e('Posts') ?></th>
    184186    </tr>
    185187    <?php
     
    197199        $style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
    198200        $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $tableposts WHERE post_author = $user->ID and post_status = 'publish'");
    199         if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title='View posts'>$numposts</a>";
     201        if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title='" . __('View posts') . "'>$numposts</a>";
    200202        echo "
    201203<tr $style>
     
    203205    <td><strong>$user_data->user_nickname</strong></td>
    204206    <td>$user_data->user_firstname $user_data->user_lastname</td>
    205     <td><a href='mailto:$email' title='e-mail: $email'>$email</a></td>
     207    <td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
    206208    <td><a href='$url' title='website: $url'>$short_url</a></td>
    207209    <td align='center'>";
     
    225227?>
    226228<div class="wrap">
    227     <h2>Users</h2>
     229    <h2><?php _e('Users') ?></h2>
    228230    <table cellpadding="3" cellspacing="3" width="100%">
    229231    <tr>
    230         <th>ID</th>
    231         <th>Nickname</th>
    232         <th>Name</th>
    233         <th>E-mail</th>
    234         <th>URI</th>
    235         <th>Level</th>
     232        <th><?php _e('ID') ?></th>
     233        <th><?php _e('Nickname') ?></th>
     234        <th><?php _e('Name') ?></th>
     235        <th><?php _e('E-mail') ?></th>
     236        <th><?php _e('URI') ?></th>
     237        <th><?php _e('Level') ?></th>
    236238    </tr>
    237239    <?php
     
    251253<td><strong>$user_data->user_nickname</td>
    252254<td>$user_data->user_firstname $user_data->user_lastname</td>
    253 <td><a href='mailto:$email' title='e-mail: $email'>$email</a></td>
     255<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
    254256<td><a href='$url' title='website: $url'>$short_url</a></td>
    255257<td align='center'>";
     
    264266   
    265267    </table>
    266       <p>To delete a user, bring his level to zero, then click on the red X.<br />
    267     <strong>Warning:</strong> deleting a user also deletes all posts made by this user.
    268   </p>
     268      <?php _e('<p>To delete a user, bring his level to zero, then click on the red X.<br />
     269    <strong>Warning:</strong> deleting a user also deletes all posts made by this user.</p>') ?>
    269270</div>
    270271
     
    272273    } ?>
    273274<div class="wrap">
    274 <h2>Add User</h2>
    275 <p>Users can <a href="<?php echo get_settings('siteurl'); ?>/wp-register.php">register themselves</a> or you can manually create users here.</p>
     275<h2><?php _e('Add User') ?></h2>
     276<?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')); ?>
    276277<form action="" method="post" name="adduser" id="adduser">
    277278  <table border="0" cellspacing="5" cellpadding="3">
    278279    <tr>
    279       <th scope="row">Nickname
     280      <th scope="row"><?php _e('Nickname') ?>
    280281      <input name="action" type="hidden" id="action" value="adduser" /></th>
    281282      <td><input name="user_login" type="text" id="user_login" /></td>
    282283    </tr>
    283284    <tr>
    284       <th scope="row">First Name </th>
     285      <th scope="row"><?php _e('First Name') ?> </th>
    285286      <td><input name="firstname" type="text" id="firstname" /></td>
    286287    </tr>
    287288    <tr>
    288       <th scope="row">Last Name </th>
     289      <th scope="row"><?php _e('Last Name') ?> </th>
    289290      <td><input name="lastname" type="text" id="lastname" /></td>
    290291    </tr>
    291292    <tr>
    292       <th scope="row">Email</th>
     293      <th scope="row"><?php _e('Email') ?></th>
    293294      <td><input name="email" type="text" id="email" /></td>
    294295    </tr>
    295296    <tr>
    296       <th scope="row">URI</th>
     297      <th scope="row"><?php _e('URI') ?></th>
    297298      <td><input name="uri" type="text" id="uri" /></td>
    298299    </tr>
    299300    <tr>
    300       <th scope="row">Password (twice) </th>
     301      <th scope="row"><?php _e('Password (twice)') ?> </th>
    301302      <td><input name="pass1" type="password" id="pass1" />
    302303      <br />
     
    305306  </table>
    306307  <p>
    307     <input name="adduser" type="submit" id="adduser" value="Add User">
     308    <input name="adduser" type="submit" id="adduser" value="<?php _e('Add User') ?>">
    308309  </p>
    309310  </form>
Note: See TracChangeset for help on using the changeset viewer.