Ticket #3474: i18n.diff
File i18n.diff, 16.4 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/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/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/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>