Ticket #3474: i18n-reloaded.diff
File i18n-reloaded.diff, 39.7 KB (added by , 18 years ago) |
---|
-
wp-login.php
91 91 92 92 if ( $_POST ) { 93 93 if ( empty( $_POST['user_login'] ) ) 94 $errors['user_login'] = __('<strong>ERROR</strong>: 94 $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('The username field is empty.'); 95 95 if ( empty( $_POST['user_email'] ) ) 96 $errors['user_email'] = __('<strong>ERROR</strong>: 96 $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('The e-mail field is empty.'); 97 97 98 98 do_action('lostpassword_post'); 99 99 … … 104 104 $user_email = $user_data->user_email; 105 105 106 106 if (!$user_email || $user_email != $_POST['user_email']) { 107 $errors['invalidcombo'] = __('<strong>ERROR</strong>: 107 $errors['invalidcombo'] = __('<strong>ERROR</strong>:').' '.__('Invalid username / e-mail combination.'); 108 108 } else { 109 109 do_action('retreive_password', $user_login); // Misspelled and deprecated 110 110 do_action('retrieve_password', $user_login); … … 216 216 217 217 // Check the username 218 218 if ( $user_login == '' ) 219 $errors['user_login'] = __('<strong>ERROR</strong>: 219 $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('Please enter a username.'); 220 220 elseif ( !validate_username( $user_login ) ) { 221 $errors['user_login'] = __('<strong>ERROR</strong>: 221 $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('This username is invalid. Please enter a valid username.'); 222 222 $user_login = ''; 223 223 } elseif ( username_exists( $user_login ) ) 224 $errors['user_login'] = __('<strong>ERROR</strong>: 224 $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('This username is already registered, please choose another one.'); 225 225 226 226 // Check the e-mail address 227 227 if ($user_email == '') { 228 $errors['user_email'] = __('<strong>ERROR</strong>: 228 $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('Please type your e-mail address.'); 229 229 } elseif ( !is_email( $user_email ) ) { 230 $errors['user_email'] = __('<strong>ERROR</strong>: 230 $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('The email address isn’t correct.'); 231 231 $user_email = ''; 232 232 } elseif ( email_exists( $user_email ) ) 233 $errors['user_email'] = __('<strong>ERROR</strong>: 233 $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('This email is already registered, please choose another one.'); 234 234 235 235 do_action('register_post'); 236 236 … … 241 241 242 242 $user_id = wp_create_user( $user_login, $user_pass, $user_email ); 243 243 if ( !$user_id ) 244 $errors['registerfail'] = sprintf(__('<strong>ERROR</strong>: 244 $errors['registerfail'] = sprintf(__('<strong>ERROR</strong>:').' '.__('Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_option('admin_email')); 245 245 else { 246 246 wp_new_user_notification($user_id, $user_pass); 247 247 … … 327 327 } 328 328 329 329 if ( $_POST && empty( $user_login ) ) 330 $errors['user_login'] = __('<strong>ERROR</strong>: 330 $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('The username field is empty.'); 331 331 if ( $_POST && empty( $user_pass ) ) 332 $errors['user_pass'] = __('<strong>ERROR</strong>: 332 $errors['user_pass'] = __('<strong>ERROR</strong>:').' '.__('The password field is empty.'); 333 333 334 334 // Some parts of this script use the main login form to display a message 335 335 if ( TRUE == $_GET['loggedout'] ) $errors['loggedout'] = __('Successfully logged you out.'); -
wp-includes/formatting.php
738 738 $diff = (int) abs($to - $from); 739 739 if ($diff <= 3600) { 740 740 $mins = round($diff / 60); 741 if ($mins <= 1) 742 $ since = __('1 min');743 else744 $since = sprintf( __('%s mins'), $mins);741 if ($mins <= 1) { 742 $mins = 1; 743 } 744 $since = sprintf(__n('%s min', '%s mins', $mins), $mins); 745 745 } else if (($diff <= 86400) && ($diff > 3600)) { 746 746 $hours = round($diff / 3600); 747 if ($hours <= 1) 748 $ since = __('1 hour');749 else750 $since = sprintf( __('%s hours'), $hours);747 if ($hours <= 1) { 748 $hour = 1; 749 } 750 $since = sprintf(__n('%s hour', '%s hours', $hours), $hours); 751 751 } elseif ($diff >= 86400) { 752 752 $days = round($diff / 86400); 753 if ($days <= 1) 754 $ since = __('1 day');755 else756 $since = sprintf( __('%s days'), $days);753 if ($days <= 1) { 754 $days = 1; 755 } 756 $since = sprintf(__('%s day', '%s days', $days), $days); 757 757 } 758 758 return $since; 759 759 } -
wp-includes/pluggable.php
174 174 return false; 175 175 176 176 if ( '' == $password ) { 177 $error = __('<strong>ERROR</strong>: 177 $error = __('<strong>ERROR</strong>:').' '.__('The password field is empty.'); 178 178 return false; 179 179 } 180 180 … … 182 182 //$login = $wpdb->get_row("SELECT ID, user_login, user_pass FROM $wpdb->users WHERE user_login = '$username'"); 183 183 184 184 if (!$login) { 185 $error = __('<strong>ERROR</strong>: 185 $error = __('<strong>ERROR</strong>:').' '.__('Invalid username.'); 186 186 return false; 187 187 } else { 188 188 // If the password is already_md5, it has been double hashed. … … 190 190 if ( ($already_md5 && md5($login->user_pass) == $password) || ($login->user_login == $username && $login->user_pass == md5($password)) ) { 191 191 return true; 192 192 } else { 193 $error = __('<strong>ERROR</strong>: 193 $error = __('<strong>ERROR</strong>:').' '.__('Incorrect password.'); 194 194 $pwd = ''; 195 195 return false; 196 196 } -
wp-includes/l10n.php
38 38 } 39 39 40 40 // Return the plural form. 41 function __n gettext($single, $plural, $number, $domain = 'default') {41 function __n($single, $plural, $number, $domain = 'default') { 42 42 global $l10n; 43 43 44 44 if (isset($l10n[$domain])) { -
wp-admin/users.php
290 290 case 'del_many': 291 291 ?> 292 292 <?php $delete_count = (int) $_GET['delete_count']; ?> 293 <div id="message" class="updated fade"><p><?php printf(__ ('%1$s %2$s deleted.'), $delete_count, __ngettext('user', 'users', $delete_count)); ?></p></div>293 <div id="message" class="updated fade"><p><?php printf(__n('%s user deleted', '%s users deleted', $delete_count), $delete_count); ?></p></div> 294 294 <?php 295 295 break; 296 296 case 'add': -
wp-admin/edit-comments.php
45 45 <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" /> 46 46 <input type="submit" name="submit" value="<?php _e('Search') ?>" /> 47 47 <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 48 <?php _e('(Searches within comment text, e-mail, URL, and IP address.)')?>48 <?php echo '('.__('Searches within comment text, e-mail, URL, and IP address.').')'; ?> 49 49 </fieldset> 50 50 </form> 51 51 <p><a href="?mode=view"><?php _e('View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p> … … 67 67 } 68 68 endforeach; 69 69 echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>'; 70 if ( !empty( $_POST['spam_button'] ) ) 71 printf(__('%s comments marked as spam.'), $i); 72 else 73 printf(__('%s comments deleted.'), $i); 70 if ( !empty( $_POST['spam_button'] ) ) { 71 printf(__n('%s comment marked as spam', '%s comments marked as spam.', $i), $i); 72 } else { 73 printf(__n('%s comment deleted.', '%s comments deleted.', $i), $i); 74 } 74 75 echo '</p></div>'; 75 76 endif; 76 77 … … 157 158 <?php 158 159 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 159 160 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>'; 160 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK"to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';161 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 161 162 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 162 163 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 163 164 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 164 165 } 165 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK"to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ";166 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> "; 166 167 } 167 168 $post = get_post($comment->comment_post_ID); 168 169 $post_title = wp_specialchars( $post->post_title, 'double' ); -
wp-admin/admin-ajax.php
21 21 $r .= "</td><td><textarea name='meta[$mid][value]' tabindex='6' rows='2' cols='30'>$value</textarea></td><td align='center'>"; 22 22 $r .= "<input name='updatemeta' type='button' class='updatemeta' tabindex='6' value='Update' onclick='return theList.ajaxUpdater('meta','meta-$mid');' /><br />"; 23 23 $r .= "<input name='deletemeta[$mid]' type='submit' onclick=\"return deleteSomething( 'meta', $mid, '"; 24 $r .= sprintf(__("You are about to delete the "%s" custom field on this post.\\n"OK" to delete, "Cancel" to stop."), $key_js);24 $r .= js_escape(sprintf(__("You are about to delete the '%s' custom field on this post.\n'OK' to delete, 'Cancel' to stop."), $key_js)); 25 25 $r .= "' );\" class='deletemeta' tabindex='6' value='Delete' /></td></tr>"; 26 26 return $r; 27 27 } -
wp-admin/admin-functions.php
40 40 if ( $_POST['post_author'] != $_POST['user_ID'] ) { 41 41 if ( 'page' == $_POST['post_type'] ) { 42 42 if ( !current_user_can( 'edit_others_pages' ) ) 43 return new WP_Error( 'edit_others_pages', __( 'You cannotcreate pages as this user.' ) );43 return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) ); 44 44 } else { 45 45 if ( !current_user_can( 'edit_others_posts' ) ) 46 return new WP_Error( 'edit_others_posts', __( 'You cannotpost as this user.' ) );46 return new WP_Error( 'edit_others_posts', __( 'You are not allowed to post as this user.' ) ); 47 47 48 48 } 49 49 } … … 184 184 if ( $_POST['post_author'] != $_POST['user_ID'] ) { 185 185 if ( 'page' == $_POST['post_type'] ) { 186 186 if ( !current_user_can( 'edit_others_pages' ) ) 187 wp_die( __('You cannotedit pages as this user.' ));187 wp_die( __('You are not allowed to edit pages as this user.' )); 188 188 } else { 189 189 if ( !current_user_can( 'edit_others_posts' ) ) 190 wp_die( __('You cannotedit posts as this user.' ));190 wp_die( __('You are not allowed edit posts as this user.' )); 191 191 192 192 } 193 193 } … … 467 467 468 468 /* checking that username has been typed */ 469 469 if ( $user->user_login == '' ) 470 $errors->add( 'user_login', __( '<strong>ERROR</strong>: 470 $errors->add( 'user_login', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'Please enter a username.' )); 471 471 472 472 /* checking the password has been typed twice */ 473 473 do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 )); 474 474 475 475 if (!$update ) { 476 476 if ( $pass1 == '' || $pass2 == '' ) 477 $errors->add( 'pass', __( '<strong>ERROR</strong>: 477 $errors->add( 'pass', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'Please enter your password twice.' )); 478 478 } else { 479 479 if ((empty ( $pass1 ) && !empty ( $pass2 ) ) || (empty ( $pass2 ) && !empty ( $pass1 ) ) ) 480 $errors->add( 'pass', __( "<strong>ERROR</strong>: you typed your new password only once."));480 $errors->add( 'pass', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'You typed your new password only once.' )); 481 481 } 482 482 483 483 /* Check for "\" in password */ 484 484 if( strpos( " ".$pass1, "\\" ) ) 485 $errors->add( 'pass', __( '<strong>ERROR</strong>: 485 $errors->add( 'pass', __( '<strong>ERROR</strong>:' ) . ' '. __( 'Passwords may not contain the character "\\".' )); 486 486 487 487 /* checking the password has been typed twice the same */ 488 488 if ( $pass1 != $pass2 ) 489 $errors->add( 'pass', __( '<strong>ERROR</strong>: 489 $errors->add( 'pass', __( '<strong>ERROR</strong>:' ) . ' '. __( 'Please type the same password in the two password fields.' )); 490 490 491 491 if (!empty ( $pass1 )) 492 492 $user->user_pass = $pass1; 493 493 494 494 if ( !validate_username( $user->user_login ) ) 495 $errors->add( 'user_login', __( '<strong>ERROR</strong>: 495 $errors->add( 'user_login', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'This username is invalid. Please enter a valid username.' )); 496 496 497 497 if (!$update && username_exists( $user->user_login )) 498 $errors->add( 'user_login', __( '<strong>ERROR</strong>: 498 $errors->add( 'user_login', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'This username is already registered, please choose another one.' )); 499 499 500 500 /* checking e-mail address */ 501 501 if ( empty ( $user->user_email ) ) { 502 $errors->add( 'user_email', __( "<strong>ERROR</strong>: please type an e-mail address"));502 $errors->add( 'user_email', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'Please type an e-mail address' )); 503 503 } else 504 504 if (!is_email( $user->user_email ) ) { 505 $errors->add( 'user_email', __( "<strong>ERROR</strong>: the email address isn't correct"));505 $errors->add( 'user_email', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'The email address isn&8217;t correct' )); 506 506 } 507 507 508 508 if ( $errors->get_error_codes() ) … … 555 555 556 556 function edit_link( $link_id = '' ) { 557 557 if (!current_user_can( 'manage_links' )) 558 wp_die( __( "Cheatin' uh ?"));558 wp_die( __( 'Cheatin&8217; uh?' )); 559 559 560 560 $_POST['link_url'] = wp_specialchars( $_POST['link_url'] ); 561 561 $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url']; … … 744 744 $default_link_cat_id = get_option( 'default_link_category' ); 745 745 746 746 if ( ($category->cat_ID != $default_cat_id ) && ($category->cat_ID != $default_link_cat_id ) ) 747 $edit .= "<td><a href='" . wp_nonce_url( "categories.php?action=delete&cat_ID=$category->cat_ID", 'delete-category_' . $category->cat_ID ) . "' onclick=\"return deleteSomething( 'cat', $category->cat_ID, '" . sprintf( __("You are about to delete the category "%s".\\nAll of its posts will go into the default category of "%s"\\nAll of its bookmarks will go into the default category of "%s".\\n"OK" to delete, "Cancel" to stop." ), js_escape( $category->cat_name ), js_escape( get_catname( $default_cat_id )), js_escape( get_catname( $default_link_cat_id ) )) . "' );\" class='delete'>".__( 'Delete' )."</a>";747 $edit .= "<td><a href='" . wp_nonce_url( "categories.php?action=delete&cat_ID=$category->cat_ID", 'delete-category_' . $category->cat_ID ) . "' onclick=\"return deleteSomething( 'cat', $category->cat_ID, '" . js_escape(sprintf( __("You are about to delete the category '%s'.\nAll of its posts will go into the default category of '%s'\nAll of its bookmarks will go into the default category of '%s'.\n'OK' to delete, 'Cancel' to stop." ), js_escape( $category->cat_name ), js_escape( get_catname( $default_cat_id )), js_escape( get_catname( $default_link_cat_id ) ) )) . "' );\" class='delete'>".__( 'Delete' )."</a>"; 748 748 else 749 $edit .= "<td style='text-align:center'>".__( "Default");749 $edit .= "<td style='text-align:center'>".__( 'Default' ); 750 750 } else 751 751 $edit = ''; 752 752 … … 791 791 <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( 'Y-m-d g:i a', $post->post_modified ); ?></td> 792 792 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td> 793 793 <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td> 794 <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf( __("You are about to delete the "%s" page.\\n"OK" to delete, "Cancel" to stop." ), js_escape( get_the_title() )) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td>794 <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), js_escape( get_the_title() ) )) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td> 795 795 </tr> 796 796 797 797 <?php … … 820 820 $r .= "\n\t\t<td align='center'>"; 821 821 if ( $numposts > 0 ) { 822 822 $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>"; 823 $r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts ));823 $r .= sprintf(__n( 'View %s post', 'View %s posts', $numposts ), $numposts); 824 824 $r .= '</a>'; 825 825 } 826 826 $r .= "</td>\n\t\t<td>"; … … 1063 1063 <input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> 1064 1064 <?php 1065 1065 if ( $edit ) { 1066 _e( 'Existing timestamp' ); 1067 //echo ': ' . $wp_locale->get_month( $mm ) . "$jj, $aa @ $hh:$mn"; 1068 echo sprintf( __(': %1$s %2$s, %3$s @ %4$s:%5$s' ), $wp_locale->get_month( $mm ), $jj, $aa, $hh, $mn ); 1066 printf( __('Existing timestamp: %1$s %2$s, %3$s @ %4$s:%5$s' ), $wp_locale->get_month( $mm ), $jj, $aa, $hh, $mn ); 1069 1067 } 1070 1068 ?> 1071 1069 </fieldset> -
wp-admin/edit-page-form.php
84 84 85 85 <?php if ( 0 != count( get_page_templates() ) ) { ?> 86 86 <fieldset id="pagetemplate" class="dbx-box"> 87 <h3 class="dbx-handle"><?php _e('Page Template :') ?></h3>87 <h3 class="dbx-handle"><?php _e('Page Template') ?></h3> 88 88 <div class="dbx-content"><p><select name="page_template"> 89 89 <option value='default'><?php _e('Default Template'); ?></option> 90 90 <?php page_template_dropdown($post->page_template); ?> … … 188 188 <?php if ('edit' == $action) : 189 189 $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID ); 190 190 if ( current_user_can('delete_page', $post->ID) ) ?> 191 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />191 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 192 192 <?php endif; ?> 193 193 </div> 194 194 -
wp-admin/moderation.php
72 72 $ignored = (int) $_GET['ignored']; 73 73 $spam = (int) $_GET['spam']; 74 74 if ($approved) { 75 if ('1' == $approved) { 76 echo __("1 comment approved") . " <br/>\n"; 77 } else { 78 echo sprintf(__("%s comments approved <br />"), $approved) . "\n"; 79 } 75 printf(__n('%s comment approved', '%s comments approved', $approved), $approved); 76 echo "<br/>\n"; 80 77 } 81 78 if ($deleted) { 82 if ('1' == $deleted) { 83 echo __("1 comment deleted") . " <br/>\n"; 84 } else { 85 echo sprintf(__("%s comments deleted"), $deleted) . " <br/>\n"; 86 } 79 printf(__n('%s comment deleted', '%s comments deleted', $deleted), $deleted); 80 echo "<br/>\n"; 87 81 } 88 82 if ($spam) { 89 if ('1' == $spam) { 90 echo __("1 comment marked as spam") . " <br/>\n"; 91 } else { 92 echo sprintf(__("%s comments marked as spam"), $spam) . " <br/>\n"; 93 } 83 printf(__n('%s comment marked as spam', '%s comments marked as spam', $spam), $spam); 84 echo "<br/>\n"; 94 85 } 95 86 if ($ignored) { 96 if ('1' == $ignored) { 97 echo __("1 comment unchanged") . " <br/>\n"; 98 } else { 99 echo sprintf(__("%s comments unchanged"), $ignored) . " <br/>\n"; 100 } 87 printf(__n('%s comment unchanged', '%s comments unchanged', $ignored), $ignored); 88 echo "<br/>\n"; 101 89 } 102 90 echo "</p></div>\n"; 103 91 } -
wp-admin/index.php
107 107 $numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); 108 108 if (0 < $numcats) $numcats = number_format($numcats); 109 109 ?> 110 <p><?php printf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>, contained within %5$s <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p> 110 <p><?php 111 $post_str = sprintf(__n('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), $numposts, 'edit.php'); 112 $comm_str = sprintf(__n('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), $numcomms, 'edit-comments.php'); 113 $cat_str = sprintf(__n('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), $numcats, 'categories.php'); 114 115 printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p> 111 116 </div> 112 117 113 118 <?php do_action('activity_box_end'); ?> -
wp-admin/edit-link-form.php
237 237 echo 'selected="selected"'; 238 238 echo('>'.$r.'</option>'); 239 239 } 240 ?></select> <?php _e('(Leave at 0 for no rating.)')?>240 ?></select> <?php echo '('.__('Leave at 0 for no rating.').')'; ?> 241 241 </td> 242 242 </tr> 243 243 </table> -
wp-admin/edit-form-comment.php
67 67 68 68 <tr> 69 69 <th scope="row" valign="top"><?php _e('Delete'); $delete_nonce = wp_create_nonce( 'delete-comment_' . $comment->comment_ID ); ?>:</th> 70 <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . __("You are about to delete this comment \\n \'Cancel\' to stop, \'OK\' to delete.") . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true; } return false;\""; ?> />70 <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true; } return false;\""; ?> /> 71 71 <input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" /> 72 72 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> 73 73 <input type="hidden" name="noredir" value="1" /> -
wp-admin/edit-form.php
51 51 52 52 <input type="hidden" name="post_pingback" value="<?php echo get_option('default_pingback_flag') ?>" id="post_pingback" /> 53 53 54 <p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.) <br />'), 'http://wordpress.org/docs/reference/post/#trackback')?>54 <p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.)'), 'http://wordpress.org/docs/reference/post/#trackback'); echo '<br />'; ?> 55 55 <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p> 56 56 57 57 <p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" /> -
wp-admin/edit-form-advanced.php
206 206 <h3 class="dbx-handle"><?php _e('Trackbacks') ?></h3> 207 207 </div> 208 208 <div class="dbx-c-ontent-wrapper"> 209 <div class="dbx-content"><?php _e('Send trackbacks to '); ?>: <?php echo $form_trackback; ?> (<?php _e('Separate multiple URIs with spaces'); ?>)209 <div class="dbx-content"><?php _e('Send trackbacks to:'); ?> <?php echo $form_trackback; ?> (<?php _e('Separate multiple URLs with spaces'); ?>) 210 210 <?php 211 211 if ( ! empty($pings) ) 212 212 echo $pings; -
wp-admin/options-discussion.php
13 13 <?php wp_nonce_field('update-options') ?> 14 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 15 <fieldset class="options"> 16 <legend><?php _e('Usual settings for an article:<br /><small><em>(These settings may be overridden for individual articles.)</em></small>')?></legend>16 <legend><?php echo __('Usual settings for an article:').'<br /><small><em>('.__('These settings may be overridden for individual articles.').')</em></small>'; ?></legend> 17 17 <ul> 18 18 <li> 19 19 <label for="default_pingback_flag"> … … 23 23 <li> 24 24 <label for="default_ping_status"> 25 25 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> /> 26 <?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks .)') ?></label>26 <?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks).') ?></label> 27 27 </li> 28 28 <li> 29 29 <label for="default_comment_status"> … … 83 83 </form> 84 84 </div> 85 85 86 <?php include('./admin-footer.php'); ?> 87 No newline at end of file 86 <?php include('./admin-footer.php'); ?> -
wp-admin/plugins.php
79 79 80 80 if (empty($plugins)) { 81 81 echo '<p>'; 82 _e("Couldn 't open plugins directory or there are no plugins available."); // TODO: make more helpful82 _e("Couldn&8217;t open plugins directory or there are no plugins available."); // TODO: make more helpful 83 83 echo '</p>'; 84 84 } else { 85 85 ?> -
wp-admin/link-add.php
28 28 29 29 <div id="wp-link-bookmarklet" class="wrap"> 30 30 <h3><?php _e('Add Link Bookmarklet'); ?></h3> 31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we ’re working on it.'); ?></p>31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we&8217;re working on it.'); ?></p> 32 32 <?php printf('<p><a href="%s" title="'.__('Link add bookmarklet').'">'.__('Link This').'</a></p>', "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?> 33 33 </div> 34 34 -
wp-admin/edit.php
221 221 222 222 case 'control_delete': 223 223 ?> 224 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . sprintf(__("You are about to delete this post "%s".\\n"OK" to delete, "Cancel" to stop."), js_escape(get_the_title())) . "' );\">" . __('Delete') . "</a>"; } ?></td>224 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . js_escape(sprintf(__("You are about to delete this post '%s'.\n'OK' to delete, 'Cancel' to stop."), get_the_title())) . "' );\">" . __('Delete') . "</a>"; } ?></td> 225 225 <?php 226 226 break; 227 227 … … 283 283 <?php 284 284 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 285 285 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>'; 286 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK"to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';286 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 287 287 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 288 288 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 289 289 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 290 290 } 291 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=".$comment->comment_post_ID."&c=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK"to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ]";291 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=".$comment->comment_post_ID."&c=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ]"; 292 292 } // end if any comments to show 293 293 ?> 294 294 </p> -
wp-admin/link-manager.php
65 65 if ( isset($_GET['deleted']) ) { 66 66 echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>'; 67 67 $deleted = (int) $_GET['deleted']; 68 printf(__ ('%s links deleted.'), $deleted);68 printf(__n('%s link deleted.', '%s links deleted', $deleted), $deleted); 69 69 echo '</p></div>'; 70 70 } 71 71 ?> … … 175 175 break; 176 176 case 'action': 177 177 echo '<td><a href="link.php?link_id='.$link->link_id.'&action=edit" class="edit">'.__('Edit').'</a></td>'; 178 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the "%s" link to %s.\n"Cancel" to stop, "OK"to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>';178 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the '%s' link to %s.\n'Cancel' to stop, 'OK' to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>'; 179 179 break; 180 180 default: 181 181 ?> -
wp-admin/install.php
70 70 $public = (int) $_POST['blog_public']; 71 71 // check e-mail address 72 72 if (empty($admin_email)) { 73 die(__( "<strong>ERROR</strong>: please type your e-mail address"));73 die(__('<strong>ERROR</strong>:').' '.__('Please type your e-mail address')); 74 74 } else if (!is_email($admin_email)) { 75 die(__( "<strong>ERROR</strong>: the e-mail address isn't correct"));75 die(__('<strong>ERROR</strong>:').' '.__('The e-mail address isn&8217;t correct')); 76 76 } 77 77 78 78 ?> … … 107 107 108 108 <p id="footer"><?php _e('<a href="http://wordpress.org/">WordPress</a>, personal publishing platform.'); ?></p> 109 109 </body> 110 </html> 111 No newline at end of file 110 </html> -
wp-admin/export.php
14 14 <div class="narrow"> 15 15 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p> 16 16 <p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, comments, custom fields, and categories.'); ?></p> 17 <p><?php _e('Once you \'ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p>17 <p><?php _e('Once you&8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p> 18 18 <form action="" method="get"> 19 19 <h3><?php _e('Optional options'); ?></h3> 20 20 -
wp-admin/categories.php
34 34 35 35 // Don't delete the default cats. 36 36 if ( $cat_ID == get_option('default_category') ) 37 wp_die(sprintf(__("Can 't delete the <strong>%s</strong> category: this is the default one"), $cat_name));37 wp_die(sprintf(__("Can&8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 38 38 39 39 if ( $cat_ID == get_option('default_link_category') ) 40 wp_die(sprintf(__("Can 't delete the <strong>%s</strong> category: this is the default one for links"), $cat_name));40 wp_die(sprintf(__("Can&8217;t delete the <strong>%s</strong> category: this is the default one for links"), $cat_name)); 41 41 42 42 wp_delete_category($cat_ID); 43 43