Use _x() and extracted comments. Props nbachiyski. see #9112
git-svn-id: http://svn.automattic.com/wordpress/trunk@10680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
00b6ce601c
commit
0bf194de3b
|
@ -123,7 +123,7 @@ if ( 'spam' == $_GET['dt'] ) {
|
|||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row" valign="top"><?php echo _c('Comment|noun'); ?></th>
|
||||
<th scope="row" valign="top"><?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?></th>
|
||||
<td><?php echo $comment->comment_content; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -191,7 +191,8 @@ if ( 'private' == $post->post_status ) {
|
|||
|
||||
|
||||
<?php
|
||||
$datef = _c( 'M j, Y @ G:i|Publish box date format');
|
||||
// translators: Publish box date formt, see http://php.net/date
|
||||
$datef = __( 'M j, Y @ G:i' );
|
||||
if ( 0 != $post->ID ) {
|
||||
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
||||
$stamp = __('Scheduled for: <b>%1$s</b>');
|
||||
|
@ -468,7 +469,9 @@ function post_comment_meta_box($post) {
|
|||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="column-author"><?php _e('Author') ?></th>
|
||||
<th scope="col" class="column-comment"><?php echo _c('Comment|noun') ?></th>
|
||||
<th scope="col" class="column-comment">
|
||||
<?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="the-comment-list" class="list:comment">
|
||||
|
|
|
@ -48,14 +48,15 @@ $url = attribute_escape( $comment->comment_author_url );
|
|||
<div id="misc-publishing-actions">
|
||||
|
||||
<div class="misc-pub-section" id="comment-status-radio">
|
||||
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php echo _c('Approved|adjective') ?></label><br />
|
||||
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php echo _c('Pending|adjective') ?></label><br />
|
||||
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php echo _c('Spam|adjective'); ?></label>
|
||||
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php /* translators: comment type radio button */ echo _x('Approved', 'adjective') ?></label><br />
|
||||
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php /* translators: comment type radio button */ echo _x('Pending', 'adjective') ?></label><br />
|
||||
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ echo _x('Spam', 'adjective'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="misc-pub-section curtime misc-pub-section-last">
|
||||
<?php
|
||||
$datef = _c( 'M j, Y @ G:i|Publish box date format');
|
||||
// translators: Publish box date formt, see http://php.net/date
|
||||
$datef = __( 'M j, Y @ G:i' );
|
||||
$stamp = __('Submitted on: <b>%1$s</b>');
|
||||
$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
|
||||
?>
|
||||
|
|
|
@ -181,7 +181,8 @@ if ( 'private' == $post->post_status ) {
|
|||
</div><?php // /misc-pub-section ?>
|
||||
|
||||
<?php
|
||||
$datef = _c( 'M j, Y @ G:i|Publish box date format');
|
||||
// translators: Publish box date formt, see http://php.net/date
|
||||
$datef = __( 'M j, Y @ G:i' );
|
||||
if ( 0 != $post->ID ) {
|
||||
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
||||
$stamp = __('Scheduled for: <b>%1$s</b>');
|
||||
|
|
|
@ -290,7 +290,9 @@ if ( 1 == count($posts) && is_singular() ) :
|
|||
<table class="widefat" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="column-comment"><?php echo _c('Comment|noun') ?></th>
|
||||
<th scope="col" class="column-comment">
|
||||
<?php /* translators: column name */ echo _x('Comment', 'column name') ?>
|
||||
</th>
|
||||
<th scope="col" class="column-author"><?php _e('Author') ?></th>
|
||||
<th scope="col" class="column-date"><?php _e('Submitted') ?></th>
|
||||
</tr>
|
||||
|
|
|
@ -20,6 +20,12 @@ function __() {}
|
|||
*/
|
||||
function _c() {}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function _x() {}
|
||||
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
|
|
@ -526,7 +526,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||
$actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
|
||||
//$actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>';
|
||||
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . _c( 'Spam|verb' ) . '</a>';
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
|
||||
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
|
||||
|
||||
$actions = apply_filters( 'comment_row_actions', $actions, $comment );
|
||||
|
@ -566,8 +566,8 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||
endswitch;
|
||||
$type = wp_specialchars( $type );
|
||||
?>
|
||||
|
||||
<h4 class="comment-meta"><?php printf( __( '%1$s on %2$s' ), "<strong>$type</strong>", $comment_post_link ); ?></h4>
|
||||
<?php /* translators: %1$s is type of comment, %2$s is link to the post */ ?>
|
||||
<h4 class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link ); ?></h4>
|
||||
<p class="comment-author"><?php comment_author_link(); ?></p>
|
||||
|
||||
<?php endif; // comment_type ?>
|
||||
|
@ -630,19 +630,22 @@ function wp_dashboard_incoming_links_output() {
|
|||
$content = wp_html_excerpt($content, 50) . ' ...';
|
||||
|
||||
if ( $link )
|
||||
$text = _c( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"|feed_display' );
|
||||
/* translators: incoming links feed, %1$s is other person, %3$s is content */
|
||||
$text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' );
|
||||
else
|
||||
$text = _c( '%1$s linked here saying, "%3$s"|feed_display' );
|
||||
/* translators: incoming links feed, %1$s is other person, %3$s is content */
|
||||
$text = __( '%1$s linked here saying, "%3$s"' );
|
||||
|
||||
if ( $show_date ) {
|
||||
if ( $show_author || $show_summary )
|
||||
$text .= _c( ' on %4$s|feed_display' );
|
||||
/* translators: incoming links feed, %4$s is the date */
|
||||
$text .= ' ' . __( 'on %4$s' );
|
||||
$date = wp_specialchars( strip_tags( $item->get_date() ) );
|
||||
$date = strtotime( $date );
|
||||
$date = gmdate( get_option( 'date_format' ), $date );
|
||||
}
|
||||
|
||||
echo "\t<li>" . sprintf( _c( "$text|feed_display" ), $publisher, $link, $content, $date ) . "</li>\n";
|
||||
echo "\t<li>" . sprintf( $text, $publisher, $link, $content, $date ) . "</li>\n";
|
||||
}
|
||||
|
||||
echo "</ul>\n";
|
||||
|
|
|
@ -735,7 +735,8 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '', $taxonomy = 'po
|
|||
function wp_manage_posts_columns() {
|
||||
$posts_columns = array();
|
||||
$posts_columns['cb'] = '<input type="checkbox" />';
|
||||
$posts_columns['title'] = _c('Post|noun');
|
||||
/* translators: manage posts column name */
|
||||
$posts_columns['title'] = _x('Post', 'column name');
|
||||
$posts_columns['author'] = __('Author');
|
||||
$posts_columns['categories'] = __('Categories');
|
||||
$posts_columns['tags'] = __('Tags');
|
||||
|
@ -759,13 +760,16 @@ function wp_manage_media_columns() {
|
|||
$posts_columns = array();
|
||||
$posts_columns['cb'] = '<input type="checkbox" />';
|
||||
$posts_columns['icon'] = '';
|
||||
$posts_columns['media'] = _c('File|media column header');
|
||||
/* translators: column name */
|
||||
$posts_columns['media'] = _x('File', 'column name');
|
||||
$posts_columns['author'] = __('Author');
|
||||
//$posts_columns['tags'] = _c('Tags|media column header');
|
||||
$posts_columns['parent'] = _c('Attached to|media column header');
|
||||
/* translators: column name */
|
||||
$posts_columns['parent'] = _x('Attached to', 'column name');
|
||||
$posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="images/comment-grey-bubble.png" /></div>';
|
||||
//$posts_columns['comments'] = __('Comments');
|
||||
$posts_columns['date'] = _c('Date|media column header');
|
||||
/* translators: column name */
|
||||
$posts_columns['date'] = _x('Date', 'column name');
|
||||
$posts_columns = apply_filters('manage_media_columns', $posts_columns);
|
||||
|
||||
return $posts_columns;
|
||||
|
@ -823,7 +827,8 @@ function get_column_headers($page) {
|
|||
$_wp_column_headers[$page] = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'author' => __('Author'),
|
||||
'comment' => _c('Comment|noun'),
|
||||
/* translators: column name */
|
||||
'comment' => _x('Comment', 'column name'),
|
||||
//'date' => __('Submitted'),
|
||||
'response' => __('In Response To')
|
||||
);
|
||||
|
@ -1060,8 +1065,12 @@ function inline_edit_row( $type ) {
|
|||
<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
|
||||
</label>
|
||||
|
||||
<em style="margin:5px 10px 0 0" class="alignleft"><?php echo _c( '–OR–|Between password field and private checkbox on post quick edit interface' ); ?></em>
|
||||
|
||||
<em style="margin:5px 10px 0 0" class="alignleft">
|
||||
<?php
|
||||
/* translators: Between password field and private checkbox on post quick edit interface */
|
||||
echo __( '–OR–' );
|
||||
?>
|
||||
</em>
|
||||
<label class="alignleft inline-edit-private">
|
||||
<input type="checkbox" name="keep_private" value="private" />
|
||||
<span class="checkbox-title"><?php echo $is_page ? __('Private page') : __('Private post'); ?></span>
|
||||
|
@ -2104,7 +2113,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
|
|||
}
|
||||
}
|
||||
if ( 'spam' != $the_comment_status )
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . _c( 'Spam|verb' ) . '</a>';
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
|
||||
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
|
||||
$actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
|
||||
$actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>';
|
||||
|
@ -2509,7 +2518,8 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
|
|||
$year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="5"' . $tab_index_attribute . ' autocomplete="off" />';
|
||||
$hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
||||
$minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
||||
printf(_c('%1$s%2$s, %3$s @ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute);
|
||||
/* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */
|
||||
printf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute);
|
||||
|
||||
echo '<input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
|
||||
|
||||
|
@ -3278,7 +3288,8 @@ function _post_states($post) {
|
|||
if ( 'draft' == $post->post_status && 'draft' != $post_status )
|
||||
$post_states[] = __('Draft');
|
||||
if ( 'pending' == $post->post_status && 'pending' != $post_status )
|
||||
$post_states[] = _c('Pending|post state');
|
||||
/* translators: post state */
|
||||
$post_states[] = _x('Pending', 'post state');
|
||||
if ( is_sticky($post->ID) )
|
||||
$post_states[] = __('Sticky');
|
||||
|
||||
|
|
|
@ -263,7 +263,8 @@ function wp_widget_control( $sidebar_args ) {
|
|||
unset($wp_registered_widgets[$widget_id]['_callback']);
|
||||
|
||||
if ( $widget_title && $widget_title != $sidebar_args['widget_name'] )
|
||||
$widget_title = sprintf( _c('%1$s: %2$s|1: widget name, 2: widget title' ), $sidebar_args['widget_name'], $widget_title );
|
||||
/* translators: 1: widget name, 2: widget title */
|
||||
$widget_title = sprintf( _x('%1$s: %2$s', 'widget' ), $sidebar_args['widget_name'], $widget_title );
|
||||
else
|
||||
$widget_title = wp_specialchars( strip_tags( $sidebar_args['widget_name'] ) );
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@ $menu[4] = array( '', 'read', '', '', 'wp-menu-separator' );
|
|||
|
||||
$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'wp-menu-open menu-top', 'menu-posts', 'div' );
|
||||
$submenu['edit.php'][5] = array( __('Edit'), 'edit_posts', 'edit.php' );
|
||||
$submenu['edit.php'][10] = array( _c('Add New|post'), 'edit_posts', 'post-new.php' );
|
||||
/* translators: add new post */
|
||||
$submenu['edit.php'][10] = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' );
|
||||
|
||||
$i = 15;
|
||||
foreach ( $wp_taxonomies as $tax ) {
|
||||
|
@ -46,16 +47,19 @@ $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'wp-menu-open menu-
|
|||
|
||||
$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top', 'menu-media', 'div' );
|
||||
$submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
|
||||
$submenu['upload.php'][10] = array( _c('Add New|file'), 'upload_files', 'media-new.php');
|
||||
/* translators: add new file */
|
||||
$submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');
|
||||
|
||||
$menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top', 'menu-links', 'div' );
|
||||
$submenu['link-manager.php'][5] = array( __('Edit'), 'manage_links', 'link-manager.php' );
|
||||
$submenu['link-manager.php'][10] = array( _c('Add New|links'), 'manage_links', 'link-add.php' );
|
||||
/* translators: add new links */
|
||||
$submenu['link-manager.php'][10] = array( _x('Add New', 'links'), 'manage_links', 'link-add.php' );
|
||||
$submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' );
|
||||
|
||||
$menu[20] = array( __('Pages'), 'edit_pages', 'edit-pages.php', '', 'menu-top', 'menu-pages', 'div' );
|
||||
$submenu['edit-pages.php'][5] = array( __('Edit'), 'edit_pages', 'edit-pages.php' );
|
||||
$submenu['edit-pages.php'][10] = array( _c('Add New|page'), 'edit_pages', 'page-new.php' );
|
||||
/* translators: add new page */
|
||||
$submenu['edit-pages.php'][10] = array( _x('Add New', 'page'), 'edit_pages', 'page-new.php' );
|
||||
|
||||
$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top', 'menu-comments', 'div' );
|
||||
|
||||
|
@ -75,7 +79,8 @@ if ( !empty($update_plugins->response) )
|
|||
|
||||
$menu[65] = array( sprintf( __('Plugins %s'), "<span class='update-plugins count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'activate_plugins', 'plugins.php', '', 'menu-top', 'menu-plugins', 'div' );
|
||||
$submenu['plugins.php'][5] = array( __('Installed'), 'activate_plugins', 'plugins.php' );
|
||||
$submenu['plugins.php'][10] = array(_c('Add New|plugin'), 'install_plugins', 'plugin-install.php');
|
||||
/* translators: add new plugin */
|
||||
$submenu['plugins.php'][10] = array(_x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php');
|
||||
$submenu['plugins.php'][15] = array( __('Editor'), 'edit_plugins', 'plugin-editor.php' );
|
||||
|
||||
if ( current_user_can('edit_users') )
|
||||
|
|
|
@ -108,7 +108,9 @@ function theme_update_available( $theme ) {
|
|||
<?php if ( $ct->screenshot ) : ?>
|
||||
<img src="<?php echo WP_CONTENT_URL . $ct->stylesheet_dir . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" />
|
||||
<?php endif; ?>
|
||||
<h4><?php printf(_c('%1$s %2$s by %3$s|1: theme title, 2: theme version, 3: theme author'), $ct->title, $ct->version, $ct->author) ; ?></h4>
|
||||
<h4><?php
|
||||
/* translators: 1: theme title, 2: theme version, 3: theme author */
|
||||
printf(__('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h4>
|
||||
<p class="description"><?php echo $ct->description; ?></p>
|
||||
<?php if ($ct->parent_theme) { ?>
|
||||
<p><?php printf(__('The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.'), $ct->title, $ct->template_dir, $ct->stylesheet_dir, $ct->title, $ct->parent_theme); ?></p>
|
||||
|
|
|
@ -302,8 +302,8 @@ foreach ($arc_result as $arc_row) {
|
|||
<tr>
|
||||
<th scope="col" class="check-column"><input type="checkbox" /></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"><?php echo _c('Media|media column header'); ?></th>
|
||||
<th scope="col"><?php echo _c('Date Added|media column header'); ?></th>
|
||||
<th scope="col"><?php /* translators: column name in media */ echo _x('Media', 'media column name'); ?></th>
|
||||
<th scope="col"><?php /* translators: column name in media */ echo _x('Date Added', 'media column name'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -311,8 +311,8 @@ foreach ($arc_result as $arc_row) {
|
|||
<tr>
|
||||
<th scope="col" class="check-column"><input type="checkbox" /></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"><?php echo _c('Media|media column header'); ?></th>
|
||||
<th scope="col"><?php echo _c('Date Added|media column header'); ?></th>
|
||||
<th scope="col"><?php /* translators: column name in media */ echo _x('Media', 'media column name'); ?></th>
|
||||
<th scope="col"><?php /* translators: column name in media */ echo _x('Date Added', 'media column name'); ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
|
|
Loading…
Reference in New Issue