Skip to content

Commit a7cc577

Browse files
committed
Mark strings for translation.
git-svn-id: https://develop.svn.wordpress.org/trunk@1161 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1ddc358 commit a7cc577

1 file changed

Lines changed: 43 additions & 40 deletions

File tree

wp-admin/profile.php

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<?php $title = "Profile";
1+
<?php
2+
require_once('../wp-includes/wp-l10n.php');
3+
4+
$title = "Profile";
25
/* <Profile | My Profile> */
36

47
function add_magic_quotes($array) {
@@ -44,36 +47,36 @@ function add_magic_quotes($array) {
4447

4548
/* checking the nickname has been typed */
4649
if (empty($_POST["newuser_nickname"])) {
47-
die ("<strong>ERROR</strong>: please enter your nickname (can be the same as your login)");
50+
die (__("<strong>ERROR</strong>: please enter your nickname (can be the same as your login)"));
4851
return false;
4952
}
5053

5154
/* if the ICQ UIN has been entered, check to see if it has only numbers */
5255
if (!empty($_POST["newuser_icq"])) {
5356
if ((ereg("^[0-9]+$",$_POST["newuser_icq"]))==false) {
54-
die ("<strong>ERROR</strong>: your ICQ UIN can only be a number, no letters allowed");
57+
die (__("<strong>ERROR</strong>: your ICQ UIN can only be a number, no letters allowed"));
5558
return false;
5659
}
5760
}
5861

5962
/* checking e-mail address */
6063
if (empty($_POST["newuser_email"])) {
61-
die ("<strong>ERROR</strong>: please type your e-mail address");
64+
die (__("<strong>ERROR</strong>: please type your e-mail address"));
6265
return false;
6366
} else if (!is_email($_POST["newuser_email"])) {
64-
die ("<strong>ERROR</strong>: the email address isn't correct");
67+
die (__("<strong>ERROR</strong>: the email address isn't correct"));
6568
return false;
6669
}
6770

6871
if ($_POST["pass1"] == "") {
6972
if ($_POST["pass2"] != "")
70-
die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
73+
die (__("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice."));
7174
$updatepassword = "";
7275
} else {
7376
if ($_POST["pass2"] == "")
74-
die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
77+
die (__("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice."));
7578
if ($_POST["pass1"] != $_POST["pass2"])
76-
die ("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that.");
79+
die (__("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that."));
7780
$newuser_pass = $_POST["pass1"];
7881
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
7982
setcookie("wordpresspass_".$cookiehash,md5($newuser_pass),time()+31536000);
@@ -94,7 +97,7 @@ function add_magic_quotes($array) {
9497
$query = "UPDATE $tableusers SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description' WHERE ID = $user_ID";
9598
$result = $wpdb->query($query);
9699
if (!$result) {
97-
die ("<strong>ERROR</strong>: couldn't update your profile...");
100+
die (__("<strong>ERROR</strong>: couldn't update your profile..."));
98101
}
99102
header('Location: profile.php?updated=true');
100103
break;
@@ -109,7 +112,7 @@ function add_magic_quotes($array) {
109112
include_once('admin-header.php');
110113
?>
111114

112-
<h2>View Profile &#8220;
115+
<h2><?php _e('View Profile') ?> &#8220;
113116
<?php
114117
switch($profiledata->user_idmode) {
115118
case 'nickname':
@@ -137,36 +140,36 @@ function add_magic_quotes($array) {
137140

138141
<div id="profile">
139142
<p>
140-
<strong>Login</strong> <?php echo $profiledata->user_login ?>
141-
| <strong>User #</strong> <?php echo $profiledata->ID ?> | <strong>Level</strong>
142-
<?php echo $profiledata->user_level ?> | <strong>Posts</strong>
143+
<strong><?php _e('Login') ?></strong> <?php echo $profiledata->user_login ?>
144+
| <strong><?php _e('User #') ?></strong> <?php echo $profiledata->ID ?> | <strong><?php _e('Level') ?></strong>
145+
<?php echo $profiledata->user_level ?> | <strong><?php _e('Posts') ?></strong>
143146
<?php
144147
$posts = get_usernumposts($user);
145148
echo $posts;
146149
?>
147150
</p>
148151

149-
<p> <strong>First name:</strong> <?php echo $profiledata->user_firstname ?> </p>
152+
<p> <strong><?php _e('First name:') ?></strong> <?php echo $profiledata->user_firstname ?> </p>
150153

151-
<p> <strong>Last name:</strong> <?php echo $profiledata->user_lastname ?> </p>
154+
<p> <strong><?php _e('Last name:') ?></strong> <?php echo $profiledata->user_lastname ?> </p>
152155

153-
<p> <strong>Nickname:</strong> <?php echo $profiledata->user_nickname ?> </p>
156+
<p> <strong><?php _e('Nickname:') ?></strong> <?php echo $profiledata->user_nickname ?> </p>
154157

155-
<p> <strong>Email:</strong> <?php echo make_clickable($profiledata->user_email) ?>
158+
<p> <strong><?php _e('Email:') ?></strong> <?php echo make_clickable($profiledata->user_email) ?>
156159
</p>
157160

158-
<p> <strong>Website:</strong> <?php echo $profiledata->user_url ?> </p>
161+
<p> <strong><?php _e('Website:') ?></strong> <?php echo $profiledata->user_url ?> </p>
159162

160-
<p> <strong>ICQ:</strong>
163+
<p> <strong><?php _e('ICQ:') ?></strong>
161164
<?php if ($profiledata->user_icq > 0) { echo make_clickable("icq:".$profiledata->user_icq); } ?>
162165
</p>
163166

164-
<p> <strong>AIM:</strong> <?php echo "<a href='aim:goim?screenname=". str_replace(' ', '+', $profiledata->user_aim) ."&message=Howdy'>$profiledata->user_aim</a>"; ?>
167+
<p> <strong><?php _e('AIM:') ?></strong> <?php echo "<a href='aim:goim?screenname=". str_replace(' ', '+', $profiledata->user_aim) ."&message=Howdy'>$profiledata->user_aim</a>"; ?>
165168
</p>
166169

167-
<p> <strong>MSN IM:</strong> <?php echo $profiledata->user_msn ?> </p>
170+
<p> <strong><?php _e('MSN IM:') ?></strong> <?php echo $profiledata->user_msn ?> </p>
168171

169-
<p> <strong>Yahoo IM:</strong> <?php echo $profiledata->user_yim ?> </p>
172+
<p> <strong><?php _e('Yahoo IM:') ?></strong> <?php echo $profiledata->user_yim ?> </p>
170173

171174
</div>
172175

@@ -223,7 +226,7 @@ function add_magic_quotes($array) {
223226
?>
224227
<?php if ($updated) { ?>
225228
<div class="updated">
226-
<p><strong>Profile updated.</strong></p>
229+
<p><strong><?php _e('Profile updated.') ?></strong></p>
227230
</div>
228231
<?php } ?>
229232
<div class="wrap">
@@ -232,8 +235,8 @@ function add_magic_quotes($array) {
232235
<input type="hidden" name="action" value="update" />
233236
<input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" />
234237
</p>
235-
<p><strong>Login:</strong> <?php echo $profiledata->user_login ?> | <strong>Level:</strong>
236-
<?php echo $profiledata->user_level ?> | <strong>Posts:</strong>
238+
<p><strong><?php _e('Login:') ?></strong> <?php echo $profiledata->user_login ?> | <strong><?php _e('Level:') ?></strong>
239+
<?php echo $profiledata->user_level ?> | <strong><?php _e('Posts:') ?></strong>
237240
<?php
238241
$posts = get_usernumposts($user_ID);
239242
echo $posts;
@@ -244,47 +247,47 @@ function add_magic_quotes($array) {
244247
</style>
245248
<table width="99%" border="0" cellspacing="2" cellpadding="3">
246249
<tr>
247-
<th width="33%" scope="row">First name:</th>
250+
<th width="33%" scope="row"><?php _e('First name:') ?></th>
248251
<td width="73%"><input type="text" name="newuser_firstname" id="newuser_firstname" value="<?php echo $profiledata->user_firstname ?>" /></td>
249252
</tr>
250253
<tr>
251-
<th scope="row">Last name:</th>
254+
<th scope="row"><?php _e('Last name:') ?></th>
252255
<td><input type="text" name="newuser_lastname" id="newuser_lastname2" value="<?php echo $profiledata->user_lastname ?>" /></td>
253256
</tr>
254257
<tr>
255-
<th scope="row">Profile:</th>
258+
<th scope="row"><?php _e('Profile:') ?></th>
256259
<td><textarea name="user_description" rows="5" id="textarea2" style="width: 99%; "><?php echo $profiledata->user_description ?></textarea></td>
257260
</tr>
258261
<tr>
259-
<th scope="row">Nickname:</th>
262+
<th scope="row"><?php _e('Nickname:') ?></th>
260263
<td><input type="text" name="newuser_nickname" id="newuser_nickname2" value="<?php echo $profiledata->user_nickname ?>" /></td>
261264
</tr>
262265
<tr>
263-
<th scope="row">Email:</th>
266+
<th scope="row"><?php _e('Email:') ?></th>
264267
<td><input type="text" name="newuser_email" id="newuser_email2" value="<?php echo $profiledata->user_email ?>" /></td>
265268
</tr>
266269
<tr>
267-
<th scope="row">Website:</th>
270+
<th scope="row"><?php _e('Website:') ?></th>
268271
<td><input type="text" name="newuser_url" id="newuser_url2" value="<?php echo $profiledata->user_url ?>" /></td>
269272
</tr>
270273
<tr>
271-
<th scope="row">ICQ:</th>
274+
<th scope="row"><?php _e('ICQ:') ?></th>
272275
<td><input type="text" name="newuser_icq" id="newuser_icq2" value="<?php if ($profiledata->user_icq > 0) { echo $profiledata->user_icq; } ?>" /></td>
273276
</tr>
274277
<tr>
275-
<th scope="row">AIM:</th>
278+
<th scope="row"><?php _e('AIM:') ?></th>
276279
<td><input type="text" name="newuser_aim" id="newuser_aim2" value="<?php echo $profiledata->user_aim ?>" /></td>
277280
</tr>
278281
<tr>
279-
<th scope="row">MSN IM: </th>
282+
<th scope="row"><?php _e('MSN IM:') ?> </th>
280283
<td><input type="text" name="newuser_msn" id="newuser_msn2" value="<?php echo $profiledata->user_msn ?>" /></td>
281284
</tr>
282285
<tr>
283-
<th scope="row">Yahoo IM: </th>
286+
<th scope="row"><?php _e('Yahoo IM:') ?> </th>
284287
<td> <input type="text" name="newuser_yim" id="newuser_yim2" value="<?php echo $profiledata->user_yim ?>" /> </td>
285288
</tr>
286289
<tr>
287-
<th scope="row">Identity on blog: </th>
290+
<th scope="row"><?php _e('Identity on blog:') ?> </th>
288291
<td><select name="newuser_idmode">
289292
<option value="nickname"<?php
290293
if ($profiledata->user_idmode == 'nickname')
@@ -307,14 +310,14 @@ function add_magic_quotes($array) {
307310
</select> </td>
308311
</tr>
309312
<tr>
310-
<th scope="row">New <strong>Password</strong> (Leave blank to stay the same.)</th>
313+
<th scope="row"><?php _e('New <strong>Password</strong> (Leave blank to stay the same.)') ?></th>
311314
<td><input type="password" name="pass1" size="16" value="" />
312315
<br>
313316
<input type="password" name="pass2" size="16" value="" /></td>
314317
</tr>
315318
</table>
316319
<p class="submit">
317-
<input type="submit" value="Update &raquo;" name="submit" />
320+
<input type="submit" value="<?php _e('Update &raquo;') ?>" name="submit" />
318321
</p>
319322
</div>
320323
</form>
@@ -327,7 +330,7 @@ function addPanel()
327330
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
328331
window.sidebar.addPanel("WordPress Post: <?php echo get_settings('blogname'); ?>","<?php echo get_settings('siteurl'); ?>/wp-admin/sidebar.php","");
329332
else
330-
alert('No Sidebar found! You must use Mozilla 0.9.4 or later!');
333+
alert(<?php __("'No Sidebar found! You must use Mozilla 0.9.4 or later!'") ?>);
331334
}
332335
</script>
333336
<strong>SideBar</strong><br />
@@ -348,4 +351,4 @@ function addPanel()
348351

349352
/* </Profile | My Profile> */
350353
include('admin-footer.php');
351-
?>
354+
?>

0 commit comments

Comments
 (0)