diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index d260b5823b..2d50a104c0 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -40,10 +40,10 @@ function wp_write_post() { if ( $_POST['post_author'] != $_POST['user_ID'] ) { if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can( 'edit_others_pages' ) ) - return new WP_Error( 'edit_others_pages', __( 'You cannot create pages as this user.' ) ); + return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) ); } else { if ( !current_user_can( 'edit_others_posts' ) ) - return new WP_Error( 'edit_others_posts', __( 'You cannot post as this user.' ) ); + return new WP_Error( 'edit_others_posts', __( 'You are not allowed to post as this user.' ) ); } } @@ -184,10 +184,10 @@ function edit_post() { if ( $_POST['post_author'] != $_POST['user_ID'] ) { if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can( 'edit_others_pages' ) ) - wp_die( __('You cannot edit pages as this user.' )); + wp_die( __('You are not allowed to edit pages as this user.' )); } else { if ( !current_user_can( 'edit_others_posts' ) ) - wp_die( __('You cannot edit posts as this user.' )); + wp_die( __('You are not allowed to edit posts as this user.' )); } } @@ -561,7 +561,7 @@ function add_link() { function edit_link( $link_id = '' ) { if (!current_user_can( 'manage_links' )) - wp_die( __("Cheatin' uh ?" )); + wp_die( __( 'Cheatin&8217; uh?' )); $_POST['link_url'] = wp_specialchars( $_POST['link_url'] ); $_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']; @@ -826,7 +826,7 @@ function user_row( $user_object, $style = '' ) { $r .= "\n\t\t"; if ( $numposts > 0 ) { $r .= ""; - $r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts )); + $r .= sprintf(__ngettext( 'View %s post', 'View %s posts', $numposts ), $numposts); $r .= ''; } $r .= "\n\t\t"; @@ -1069,9 +1069,7 @@ function touch_time( $edit = 1, $for_post = 1 ) { get_month( $mm ) . "$jj, $aa @ $hh:$mn"; - echo sprintf( __(': %1$s %2$s, %3$s @ %4$s:%5$s' ), $wp_locale->get_month( $mm ), $jj, $aa, $hh, $mn ); + printf( __('Existing timestamp: %1$s %2$s, %3$s @ %4$s:%5$s' ), $wp_locale->get_month( $mm ), $jj, $aa, $hh, $mn ); } ?> diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 0bdd68f500..a1017270e1 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -34,10 +34,10 @@ case 'delete': // Don't delete the default cats. if ( $cat_ID == get_option('default_category') ) - wp_die(sprintf(__("Can't delete the %s category: this is the default one"), $cat_name)); + wp_die(sprintf(__("Can&8217;t delete the %s category: this is the default one"), $cat_name)); if ( $cat_ID == get_option('default_link_category') ) - wp_die(sprintf(__("Can't delete the %s category: this is the default one for links"), $cat_name)); + wp_die(sprintf(__("Can&8217;t delete the %s category: this is the default one for links"), $cat_name)); wp_delete_category($cat_ID); diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 52b2bc156d..dfa1a23efa 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -67,10 +67,11 @@ if ( !empty( $_POST['delete_comments'] ) ) : } endforeach; echo '

'; - if ( !empty( $_POST['spam_button'] ) ) - printf(__('%s comments marked as spam.'), $i); - else - printf(__('%s comments deleted.'), $i); + if ( !empty( $_POST['spam_button'] ) ) { + printf(__ngettext('%s comment marked as spam', '%s comments marked as spam.', $i), $i); + } else { + printf(__ngettext('%s comment deleted.', '%s comments deleted.', $i), $i); + } echo '

'; endif; diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 4e2858718e..133e7dd32e 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -206,7 +206,7 @@ if (current_user_can('upload_files')) {

-
: () +
() comment_ID ); ?>: - /> + /> diff --git a/wp-admin/edit-form.php b/wp-admin/edit-form.php index d907a629e6..8ed3d54374 100644 --- a/wp-admin/edit-form.php +++ b/wp-admin/edit-form.php @@ -51,7 +51,7 @@ edCanvas = document.getElementById('content'); -

(Separate multiple URLs with spaces.)
'), 'http://wordpress.org/docs/reference/post/#trackback') ?> +

(Separate multiple URLs with spaces.)'), 'http://wordpress.org/docs/reference/post/#trackback'); echo '
'; ?>

diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 9d48a85931..5247f17932 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -52,13 +52,13 @@ addLoadEvent(focusit); +

-

+

@@ -67,12 +67,12 @@ addLoadEvent(focusit);
-

+

-

+

page_template); ?> @@ -92,7 +92,7 @@ addLoadEvent(focusit);

-

+

@@ -125,7 +125,7 @@ endforeach;
- +
@@ -138,12 +138,12 @@ endforeach;

- -" style="font-weight: bold;" tabindex="4" /> +post_status || 0 == $post_ID): ?> - +

diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 70e8289c8c..d9ad85bc0c 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -221,7 +221,7 @@ foreach($posts_columns as $column_name=>$column_display_name) { case 'control_delete': ?> - ID) ) { echo "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') . ""; } ?> + ID) ) { echo "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') . ""; } ?> comment_post_ID) ) { echo " " . __('Edit') . ''; - echo ' | comment_author)) . "', theCommentList );\">" . __('Delete') . ' '; + echo ' | comment_author)) . "', theCommentList );\">" . __('Delete') . ' '; if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { echo ' | ' . __('Unapprove') . ' '; echo ' | ' . __('Approve') . ' '; } - echo " | 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') . " ]"; + echo " | 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') . " ]"; } // end if any comments to show ?>

diff --git a/wp-admin/export.php b/wp-admin/export.php index 51dc828f5c..80439ffb82 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -14,7 +14,7 @@ require_once ('admin-header.php');

-

+

diff --git a/wp-admin/index.php b/wp-admin/index.php index 3fb5509748..92702e329f 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -107,7 +107,12 @@ if (0 < $numcomms) $numcomms = number_format($numcomms); $numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); if (0 < $numcats) $numcats = number_format($numcats); ?> -

posts and %3$s comments, contained within %5$s categories.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?>

+

post', '%1$s posts', $numposts), $numposts, 'edit.php'); +$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), $numcomms, 'edit-comments.php'); +$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), $numcats, 'categories.php'); + +printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?>

diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index c871e53310..2f7ed78282 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -28,7 +28,7 @@ require('admin-header.php'); diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index fe885e6aec..a45c0d7c07 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -65,7 +65,7 @@ function checkAll(form) if ( isset($_GET['deleted']) ) { echo '

'; $deleted = (int) $_GET['deleted']; - printf(__('%s links deleted.'), $deleted); + printf(__ngettext('%s link deleted.', '%s links deleted', $deleted), $deleted); echo '

'; } ?> diff --git a/wp-admin/moderation.php b/wp-admin/moderation.php index cfc6b95e2f..22bcf26eca 100644 --- a/wp-admin/moderation.php +++ b/wp-admin/moderation.php @@ -72,32 +72,20 @@ if ( isset($_GET['deleted']) || isset($_GET['approved']) || isset($_GET['ignored $ignored = (int) $_GET['ignored']; $spam = (int) $_GET['spam']; if ($approved) { - if ('1' == $approved) { - echo __("1 comment approved") . "
\n"; - } else { - echo sprintf(__("%s comments approved
"), $approved) . "\n"; - } + printf(__ngettext('%s comment approved', '%s comments approved', $approved), $approved); + echo "
\n"; } if ($deleted) { - if ('1' == $deleted) { - echo __("1 comment deleted") . "
\n"; - } else { - echo sprintf(__("%s comments deleted"), $deleted) . "
\n"; - } + printf(__ngettext('%s comment deleted', '%s comments deleted', $deleted), $deleted); + echo "
\n"; } if ($spam) { - if ('1' == $spam) { - echo __("1 comment marked as spam") . "
\n"; - } else { - echo sprintf(__("%s comments marked as spam"), $spam) . "
\n"; - } + printf(__ngettext('%s comment marked as spam', '%s comments marked as spam', $spam), $spam); + echo "
\n"; } if ($ignored) { - if ('1' == $ignored) { - echo __("1 comment unchanged") . "
\n"; - } else { - echo sprintf(__("%s comments unchanged"), $ignored) . "
\n"; - } + printf(__ngettext('%s comment unchanged', '%s comments unchanged', $ignored), $ignored); + echo "
\n"; } echo "

\n"; } diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index 3740695bac..08b3d97c09 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -13,7 +13,7 @@ include('admin-header.php');

-(These settings may be overridden for individual articles.)') ?> +('.__('These settings may be overridden for individual articles.').')'; ?>