Make WordPress Core

Ticket #3474: i18n-reloaded.diff

File i18n-reloaded.diff, 39.7 KB (added by nbachiyski, 17 years ago)

more changes, more improvements ;)

  • wp-login.php

     
    9191
    9292        if ( $_POST ) {
    9393                if ( empty( $_POST['user_login'] ) )
    94                         $errors['user_login'] = __('<strong>ERROR</strong>: The username field is empty.');
     94                        $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('The username field is empty.');
    9595                if ( empty( $_POST['user_email'] ) )
    96                         $errors['user_email'] = __('<strong>ERROR</strong>: The e-mail field is empty.');
     96                        $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('The e-mail field is empty.');
    9797
    9898                do_action('lostpassword_post');
    9999               
     
    104104                        $user_email = $user_data->user_email;
    105105
    106106                        if (!$user_email || $user_email != $_POST['user_email']) {
    107                                 $errors['invalidcombo'] = __('<strong>ERROR</strong>: Invalid username / e-mail combination.');
     107                                $errors['invalidcombo'] = __('<strong>ERROR</strong>:').' '.__('Invalid username / e-mail combination.');
    108108                        } else {
    109109                                do_action('retreive_password', $user_login);  // Misspelled and deprecated
    110110                                do_action('retrieve_password', $user_login);
     
    216216
    217217                // Check the username
    218218                if ( $user_login == '' )
    219                         $errors['user_login'] = __('<strong>ERROR</strong>: Please enter a username.');
     219                        $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('Please enter a username.');
    220220                elseif ( !validate_username( $user_login ) ) {
    221                         $errors['user_login'] = __('<strong>ERROR</strong>: This username is invalid.  Please enter a valid username.');
     221                        $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('This username is invalid.  Please enter a valid username.');
    222222                        $user_login = '';
    223223                } elseif ( username_exists( $user_login ) )
    224                         $errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.');
     224                        $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('This username is already registered, please choose another one.');
    225225
    226226                // Check the e-mail address
    227227                if ($user_email == '') {
    228                         $errors['user_email'] = __('<strong>ERROR</strong>: Please type your e-mail address.');
     228                        $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('Please type your e-mail address.');
    229229                } elseif ( !is_email( $user_email ) ) {
    230                         $errors['user_email'] = __('<strong>ERROR</strong>: The email address isn&#8217;t correct.');
     230                        $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('The email address isn&#8217;t correct.');
    231231                        $user_email = '';
    232232                } elseif ( email_exists( $user_email ) )
    233                         $errors['user_email'] = __('<strong>ERROR</strong>: This email is already registered, please choose another one.');
     233                        $errors['user_email'] = __('<strong>ERROR</strong>:').' '.__('This email is already registered, please choose another one.');
    234234
    235235                do_action('register_post');
    236236
     
    241241
    242242                        $user_id = wp_create_user( $user_login, $user_pass, $user_email );
    243243                        if ( !$user_id )
    244                                 $errors['registerfail'] = sprintf(__('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_option('admin_email'));
     244                                $errors['registerfail'] = sprintf(__('<strong>ERROR</strong>:').' '.__('Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_option('admin_email'));
    245245                        else {
    246246                                wp_new_user_notification($user_id, $user_pass);
    247247
     
    327327        }
    328328       
    329329        if ( $_POST && empty( $user_login ) )
    330                 $errors['user_login'] = __('<strong>ERROR</strong>: The username field is empty.');
     330                $errors['user_login'] = __('<strong>ERROR</strong>:').' '.__('The username field is empty.');
    331331        if ( $_POST && empty( $user_pass ) )
    332                 $errors['user_pass'] = __('<strong>ERROR</strong>: The password field is empty.');
     332                $errors['user_pass'] = __('<strong>ERROR</strong>:').' '.__('The password field is empty.');
    333333
    334334        // Some parts of this script use the main login form to display a message
    335335        if              ( TRUE == $_GET['loggedout'] )                  $errors['loggedout']            = __('Successfully logged you out.');
  • wp-includes/formatting.php

     
    738738        $diff = (int) abs($to - $from);
    739739        if ($diff <= 3600) {
    740740                $mins = round($diff / 60);
    741                 if ($mins <= 1)
    742                         $since = __('1 min');
    743                 else
    744                         $since = sprintf( __('%s mins'), $mins);
     741                if ($mins <= 1) {
     742                        $mins = 1;
     743                }
     744                $since = sprintf(__n('%s min', '%s mins', $mins), $mins);
    745745        } else if (($diff <= 86400) && ($diff > 3600)) {
    746746                $hours = round($diff / 3600);
    747                 if ($hours <= 1)
    748                         $since = __('1 hour');
    749                 else
    750                         $since = sprintf( __('%s hours'), $hours );
     747                if ($hours <= 1) {
     748                        $hour = 1;
     749                }
     750                $since = sprintf(__n('%s hour', '%s hours', $hours), $hours);
    751751        } elseif ($diff >= 86400) {
    752752                $days = round($diff / 86400);
    753                 if ($days <= 1)
    754                         $since = __('1 day');
    755                 else
    756                         $since = sprintf( __('%s days'), $days );
     753                if ($days <= 1) {
     754                        $days = 1;
     755                }
     756                $since = sprintf(__('%s day', '%s days', $days), $days);
    757757        }
    758758        return $since;
    759759}
  • wp-includes/pluggable.php

     
    174174                return false;
    175175
    176176        if ( '' == $password ) {
    177                 $error = __('<strong>ERROR</strong>: The password field is empty.');
     177                $error = __('<strong>ERROR</strong>:').' '.__('The password field is empty.');
    178178                return false;
    179179        }
    180180
     
    182182        //$login = $wpdb->get_row("SELECT ID, user_login, user_pass FROM $wpdb->users WHERE user_login = '$username'");
    183183
    184184        if (!$login) {
    185                 $error = __('<strong>ERROR</strong>: Invalid username.');
     185                $error = __('<strong>ERROR</strong>:').' '.__('Invalid username.');
    186186                return false;
    187187        } else {
    188188                // If the password is already_md5, it has been double hashed.
     
    190190                if ( ($already_md5 && md5($login->user_pass) == $password) || ($login->user_login == $username && $login->user_pass == md5($password)) ) {
    191191                        return true;
    192192                } else {
    193                         $error = __('<strong>ERROR</strong>: Incorrect password.');
     193                        $error = __('<strong>ERROR</strong>:').' '.__('Incorrect password.');
    194194                        $pwd = '';
    195195                        return false;
    196196                }
  • wp-includes/l10n.php

     
    3838}
    3939
    4040// Return the plural form.
    41 function __ngettext($single, $plural, $number, $domain = 'default') {
     41function __n($single, $plural, $number, $domain = 'default') {
    4242        global $l10n;
    4343
    4444        if (isset($l10n[$domain])) {
  • wp-admin/users.php

     
    290290                case 'del_many':
    291291                ?>
    292292                        <?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>
    294294                <?php
    295295                        break;
    296296                case 'add':
  • wp-admin/edit-comments.php

     
    4545  <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
    4646  <input type="submit" name="submit" value="<?php _e('Search') ?>"  /> 
    4747  <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.').')'; ?>
    4949  </fieldset>
    5050</form>
    5151<p><a href="?mode=view"><?php _e('View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p>
     
    6767                }
    6868        endforeach;
    6969        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        }
    7475        echo '</p></div>';
    7576endif;
    7677
     
    157158<?php
    158159if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    159160        echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" .  __('Edit') . '</a>';
    160         echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $comment->comment_post_ID . '&amp;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 &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
     161        echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $comment->comment_post_ID . '&amp;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> ';
    161162        if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
    162163                echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
    163164                echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
    164165        }
    165         echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=" . $comment->comment_post_ID . "&amp;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 &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), $comment->comment_author))  . "', theCommentList );\">" . __('Spam') . "</a> ";
     166        echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=" . $comment->comment_post_ID . "&amp;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> ";
    166167}
    167168$post = get_post($comment->comment_post_ID);
    168169$post_title = wp_specialchars( $post->post_title, 'double' );
  • wp-admin/admin-ajax.php

     
    2121        $r .= "</td><td><textarea name='meta[$mid][value]' tabindex='6' rows='2' cols='30'>$value</textarea></td><td align='center'>";
    2222        $r .= "<input name='updatemeta' type='button' class='updatemeta' tabindex='6' value='Update' onclick='return theList.ajaxUpdater(&#039;meta&#039;,&#039;meta-$mid&#039;);' /><br />";
    2323        $r .= "<input name='deletemeta[$mid]' type='submit' onclick=\"return deleteSomething( 'meta', $mid, '";
    24         $r .= sprintf(__("You are about to delete the &quot;%s&quot; custom field on this post.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; 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));
    2525        $r .= "' );\" class='deletemeta' tabindex='6' value='Delete' /></td></tr>";
    2626        return $r;
    2727}
  • wp-admin/admin-functions.php

     
    4040        if ( $_POST['post_author'] != $_POST['user_ID'] ) {
    4141                if ( 'page' == $_POST['post_type'] ) {
    4242                        if ( !current_user_can( 'edit_others_pages' ) )
    43                                 return new WP_Error( 'edit_others_pages', __( 'You cannot create pages as this user.' ) );
     43                                return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) );
    4444                } else {
    4545                        if ( !current_user_can( 'edit_others_posts' ) )
    46                                 return new WP_Error( 'edit_others_posts', __( 'You cannot post as this user.' ) );
     46                                return new WP_Error( 'edit_others_posts', __( 'You are not allowed to post as this user.' ) );
    4747
    4848                }
    4949        }
     
    184184        if ( $_POST['post_author'] != $_POST['user_ID'] ) {
    185185                if ( 'page' == $_POST['post_type'] ) {
    186186                        if ( !current_user_can( 'edit_others_pages' ) )
    187                                 wp_die( __('You cannot edit pages as this user.' ));
     187                                wp_die( __('You are not allowed to edit pages as this user.' ));
    188188                } else {
    189189                        if ( !current_user_can( 'edit_others_posts' ) )
    190                                 wp_die( __('You cannot edit posts as this user.' ));
     190                                wp_die( __('You are not allowed edit posts as this user.' ));
    191191
    192192                }
    193193        }
     
    467467
    468468        /* checking that username has been typed */
    469469        if ( $user->user_login == '' )
    470                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ));
     470                $errors->add( 'user_login', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'Please enter a username.' ));
    471471
    472472        /* checking the password has been typed twice */
    473473        do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 ));
    474474
    475475        if (!$update ) {
    476476                if ( $pass1 == '' || $pass2 == '' )
    477                         $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password twice.' ));
     477                        $errors->add( 'pass', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'Please enter your password twice.' ));
    478478        } else {
    479479                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.' ));
    481481        }
    482482
    483483        /* Check for "\" in password */
    484484        if( strpos( " ".$pass1, "\\" ) )
    485                 $errors->add( 'pass', __( '<strong>ERROR</strong>: Passwords may not contain the character "\\".' ));
     485                $errors->add( 'pass', __( '<strong>ERROR</strong>:' ) . ' '. __( 'Passwords may not contain the character "\\".' ));
    486486
    487487        /* checking the password has been typed twice the same */
    488488        if ( $pass1 != $pass2 )
    489                 $errors->add( 'pass', __( '<strong>ERROR</strong>: Please type the same password in the two password fields.' ));
     489                $errors->add( 'pass', __( '<strong>ERROR</strong>:' ) . ' '. __( 'Please type the same password in the two password fields.' ));
    490490
    491491        if (!empty ( $pass1 ))
    492492                $user->user_pass = $pass1;
    493493
    494494        if ( !validate_username( $user->user_login ) )
    495                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid.  Please enter a valid username.' ));
     495                $errors->add( 'user_login', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'This username is invalid.  Please enter a valid username.' ));
    496496
    497497        if (!$update && username_exists( $user->user_login ))
    498                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.' ));
     498                $errors->add( 'user_login', __( '<strong>ERROR</strong>:' ) . ' ' . __( 'This username is already registered, please choose another one.' ));
    499499
    500500        /* checking e-mail address */
    501501        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' ));
    503503        } else
    504504                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' ));
    506506                }
    507507
    508508        if ( $errors->get_error_codes() )
     
    555555
    556556function edit_link( $link_id = '' ) {
    557557        if (!current_user_can( 'manage_links' ))
    558                 wp_die( __("Cheatin' uh ?" ));
     558                wp_die( __( 'Cheatin&8217; uh?' ));
    559559
    560560        $_POST['link_url'] = wp_specialchars( $_POST['link_url'] );
    561561        $_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'];
     
    744744                $default_link_cat_id = get_option( 'default_link_category' );
    745745
    746746                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&amp;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 &quot;%s&quot;.\\nAll of its posts will go into the default category of &quot;%s&quot;\\nAll of its bookmarks will go into the default category of &quot;%s&quot;.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; 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&amp;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>";
    748748                else
    749                         $edit .= "<td style='text-align:center'>".__( "Default" );
     749                        $edit .= "<td style='text-align:center'>".__( 'Default' );
    750750        } else
    751751                $edit = '';
    752752
     
    791791    <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>
    792792        <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td>
    793793    <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&amp;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&amp;post=$id", 'delete-page_' . $id ) .  "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf( __("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; 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&amp;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>
    795795  </tr>
    796796
    797797<?php
     
    820820        $r .= "\n\t\t<td align='center'>";
    821821        if ( $numposts > 0 ) {
    822822                $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);
    824824                $r .= '</a>';
    825825        }
    826826        $r .= "</td>\n\t\t<td>";
     
    10631063<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />
    10641064<?php
    10651065        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 );
    10691067        }
    10701068?>
    10711069</fieldset>
  • wp-admin/edit-page-form.php

     
    8484
    8585<?php if ( 0 != count( get_page_templates() ) ) { ?>
    8686<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>
    8888<div class="dbx-content"><p><select name="page_template">
    8989                <option value='default'><?php _e('Default Template'); ?></option>
    9090                <?php page_template_dropdown($post->page_template); ?>
     
    188188<?php if ('edit' == $action) :
    189189        $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID );
    190190        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;\""; ?> />
    192192<?php endif; ?>
    193193</div>
    194194
  • wp-admin/moderation.php

     
    7272        $ignored  = (int) $_GET['ignored'];
    7373        $spam     = (int) $_GET['spam'];
    7474        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";
    8077        }
    8178        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";
    8781        }
    8882        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";
    9485        }
    9586        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";
    10189        }
    10290        echo "</p></div>\n";
    10391}
  • wp-admin/index.php

     
    107107$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories");
    108108if (0 < $numcats) $numcats = number_format($numcats);
    109109?>
    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
     115printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p>
    111116</div>
    112117
    113118<?php do_action('activity_box_end'); ?>
  • wp-admin/edit-link-form.php

     
    237237                                        echo 'selected="selected"';
    238238                                echo('>'.$r.'</option>');
    239239                        }
    240                 ?></select>&nbsp;<?php _e('(Leave at 0 for no rating.)') ?>
     240                ?></select>&nbsp;<?php echo '('.__('Leave at 0 for no rating.').')'; ?>
    241241                </td>
    242242        </tr>
    243243</table>
  • wp-admin/edit-form-comment.php

     
    6767
    6868        <tr>
    6969                <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;\""; ?> />
    7171                <input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" />
    7272                <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" />
    7373                <input type="hidden" name="noredir" value="1" />
  • wp-admin/edit-form.php

     
    5151
    5252<input type="hidden" name="post_pingback" value="<?php echo get_option('default_pingback_flag') ?>" id="post_pingback" />
    5353
    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 />'; ?>
    5555        <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>
    5656
    5757<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
  • wp-admin/edit-form-advanced.php

     
    206206<h3 class="dbx-handle"><?php _e('Trackbacks') ?></h3>
    207207</div>
    208208<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'); ?>)
    210210<?php
    211211if ( ! empty($pings) )
    212212        echo $pings;
  • wp-admin/options-discussion.php

     
    1313<?php wp_nonce_field('update-options') ?>
    1414<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
    1515<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>
    1717<ul>
    1818<li>
    1919<label for="default_pingback_flag">
     
    2323<li>
    2424<label for="default_ping_status">
    2525<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>
    2727</li>
    2828<li>
    2929<label for="default_comment_status">
     
    8383</form>
    8484</div>
    8585
    86 <?php include('./admin-footer.php'); ?>
    87  No newline at end of file
     86<?php include('./admin-footer.php'); ?>
  • wp-admin/plugins.php

     
    7979
    8080if (empty($plugins)) {
    8181        echo '<p>';
    82         _e("Couldn't open plugins directory or there are no plugins available."); // TODO: make more helpful
     82        _e("Couldn&8217;t open plugins directory or there are no plugins available."); // TODO: make more helpful
    8383        echo '</p>';
    8484} else {
    8585?>
  • wp-admin/link-add.php

     
    2828
    2929<div id="wp-link-bookmarklet"  class="wrap">
    3030<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 were 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>
    3232<?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&amp;linkurl='+escape(location.href)+'&amp;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();") ?>
    3333</div>
    3434
  • wp-admin/edit.php

     
    221221
    222222        case 'control_delete':
    223223                ?>
    224                 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . sprintf(__("You are about to delete this post &quot;%s&quot;.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; 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&amp;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>
    225225                <?php
    226226                break;
    227227
     
    283283<?php
    284284if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    285285        echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" .  __('Edit') . '</a>';
    286         echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $post->ID . '&amp;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 &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
     286        echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $post->ID . '&amp;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> ';
    287287        if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
    288288                echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $post->ID . '&amp;c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
    289289                echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $post->ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
    290290        }
    291         echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=".$comment->comment_post_ID."&amp;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 &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), js_escape( $comment->comment_author))  . "', theCommentList );\">" . __('Spam') . "</a> ]";
     291        echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=".$comment->comment_post_ID."&amp;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> ]";
    292292} // end if any comments to show
    293293?>
    294294</p>
  • wp-admin/link-manager.php

     
    6565if ( isset($_GET['deleted']) ) {
    6666        echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>';
    6767        $deleted = (int) $_GET['deleted'];
    68         printf(__('%s links deleted.'), $deleted);
     68        printf(__n('%s link deleted.', '%s links deleted', $deleted), $deleted);
    6969        echo '</p></div>';
    7070}
    7171?>
     
    175175                                        break;
    176176                                case 'action':
    177177                                        echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>';
    178                                         echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the &quot;%s&quot; link to %s.\n&quot;Cancel&quot; to stop, &quot;OK&quot; 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.'&amp;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>';
    179179                                        break;
    180180                                default:
    181181                                        ?>
  • wp-admin/install.php

     
    7070                $public = (int) $_POST['blog_public'];
    7171                // check e-mail address
    7272                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'));
    7474                } 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'));
    7676                }
    7777
    7878?>
     
    107107
    108108<p id="footer"><?php _e('<a href="http://wordpress.org/">WordPress</a>, personal publishing platform.'); ?></p>
    109109</body>
    110 </html>
    111  No newline at end of file
     110</html>
  • wp-admin/export.php

     
    1414<div class="narrow">
    1515<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
    1616<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>
    1818<form action="" method="get">
    1919<h3><?php _e('Optional options'); ?></h3>
    2020
  • wp-admin/categories.php

     
    3434
    3535        // Don't delete the default cats.
    3636    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));
    3838
    3939    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));
    4141
    4242        wp_delete_category($cat_ID);
    4343