Make WordPress Core

Changeset 10680


Ignore:
Timestamp:
03/02/2009 07:20:19 PM (18 years ago)
Author:
ryan
Message:

Use _x() and extracted comments. Props nbachiyski. see #9112

Location:
trunk/wp-admin
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/comment.php

    r10150 r10680  
    124124<?php } ?>
    125125<tr>
    126 <th scope="row" valign="top"><?php echo _c('Comment|noun'); ?></th>
     126<th scope="row" valign="top"><?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?></th>
    127127<td><?php echo $comment->comment_content; ?></td>
    128128</tr>
  • trunk/wp-admin/edit-form-advanced.php

    r10670 r10680  
    192192
    193193<?php
    194 $datef = _c( 'M j, Y @ G:i|Publish box date format');
     194// translators: Publish box date formt, see http://php.net/date
     195$datef = __( 'M j, Y @ G:i' );
    195196if ( 0 != $post->ID ) {
    196197        if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
     
    469470        <tr>
    470471    <th scope="col" class="column-author"><?php _e('Author') ?></th>
    471     <th scope="col" class="column-comment"><?php echo _c('Comment|noun') ?></th>
     472    <th scope="col" class="column-comment">
     473                <?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?>
     474        </th>
    472475  </tr>
    473476</thead>
  • trunk/wp-admin/edit-form-comment.php

    r10150 r10680  
    4949
    5050<div class="misc-pub-section" id="comment-status-radio">
    51 <label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php echo _c('Approved|adjective') ?></label><br />
    52 <label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php echo _c('Pending|adjective') ?></label><br />
    53 <label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php echo _c('Spam|adjective'); ?></label>
     51<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 />
     52<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 />
     53<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>
    5454</div>
    5555
    5656<div class="misc-pub-section curtime misc-pub-section-last">
    5757<?php
    58 $datef = _c( 'M j, Y @ G:i|Publish box date format');
     58// translators: Publish box date formt, see http://php.net/date
     59$datef = __( 'M j, Y @ G:i' );
    5960$stamp = __('Submitted on: <b>%1$s</b>');
    6061$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
  • trunk/wp-admin/edit-page-form.php

    r10458 r10680  
    182182
    183183<?php
    184 $datef = _c( 'M j, Y @ G:i|Publish box date format');
     184// translators: Publish box date formt, see http://php.net/date
     185$datef = __( 'M j, Y @ G:i' );
    185186if ( 0 != $post->ID ) {
    186187        if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
  • trunk/wp-admin/edit-pages.php

    r10606 r10680  
    291291<thead>
    292292  <tr>
    293     <th scope="col" class="column-comment"><?php echo _c('Comment|noun') ?></th>
     293    <th scope="col" class="column-comment">
     294                <?php  /* translators: column name */ echo _x('Comment', 'column name') ?>
     295        </th>
    294296    <th scope="col" class="column-author"><?php _e('Author') ?></th>
    295297    <th scope="col" class="column-date"><?php _e('Submitted') ?></th>
  • trunk/wp-admin/gears-manifest.php

    r10337 r10680  
    2020 */
    2121function _c() {}
     22
     23/**
     24 * @ignore
     25 */
     26function _x() {}
     27
    2228
    2329/**
  • trunk/wp-admin/includes/dashboard.php

    r10666 r10680  
    527527                //$actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick&nbsp;Edit') . '</a>';
    528528                $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>';
    529                 $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>';
     529                $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>';
    530530                $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
    531531
     
    567567                                $type = wp_specialchars( $type );
    568568                        ?>
    569 
    570                         <h4 class="comment-meta"><?php printf( __( '%1$s on %2$s' ), "<strong>$type</strong>", $comment_post_link ); ?></h4>
     569                        <?php /* translators: %1$s is type of comment, %2$s is link to the post */ ?>
     570                        <h4 class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link ); ?></h4>
    571571                        <p class="comment-author"><?php comment_author_link(); ?></p>
    572572
     
    631631
    632632                if ( $link )
    633                         $text = _c( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"|feed_display' );
     633                        /* translators: incoming links feed, %1$s is other person, %3$s is content */
     634                        $text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' );
    634635                else
    635                         $text = _c( '%1$s linked here saying, "%3$s"|feed_display' );
     636                        /* translators: incoming links feed, %1$s is other person, %3$s is content */
     637                        $text = __( '%1$s linked here saying, "%3$s"' );
    636638
    637639                if ( $show_date ) {
    638640                        if ( $show_author || $show_summary )
    639                                 $text .= _c( ' on %4$s|feed_display' );
     641                                /* translators: incoming links feed, %4$s is the date */
     642                                $text .= ' ' . __( 'on %4$s' );
    640643                        $date = wp_specialchars( strip_tags( $item->get_date() ) );
    641644                        $date = strtotime( $date );
     
    643646                }
    644647
    645                 echo "\t<li>" . sprintf( _c( "$text|feed_display" ), $publisher, $link, $content, $date ) . "</li>\n";
     648                echo "\t<li>" . sprintf( $text, $publisher, $link, $content, $date ) . "</li>\n";
    646649        }
    647650
  • trunk/wp-admin/includes/template.php

    r10662 r10680  
    736736        $posts_columns = array();
    737737        $posts_columns['cb'] = '<input type="checkbox" />';
    738         $posts_columns['title'] = _c('Post|noun');
     738        /* translators: manage posts column name */
     739        $posts_columns['title'] = _x('Post', 'column name');
    739740        $posts_columns['author'] = __('Author');
    740741        $posts_columns['categories'] = __('Categories');
     
    760761        $posts_columns['cb'] = '<input type="checkbox" />';
    761762        $posts_columns['icon'] = '';
    762         $posts_columns['media'] = _c('File|media column header');
     763        /* translators: column name */
     764        $posts_columns['media'] = _x('File', 'column name');
    763765        $posts_columns['author'] = __('Author');
    764766        //$posts_columns['tags'] = _c('Tags|media column header');
    765         $posts_columns['parent'] = _c('Attached to|media column header');
     767        /* translators: column name */
     768        $posts_columns['parent'] = _x('Attached to', 'column name');
    766769        $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="images/comment-grey-bubble.png" /></div>';
    767770        //$posts_columns['comments'] = __('Comments');
    768         $posts_columns['date'] = _c('Date|media column header');
     771        /* translators: column name */
     772        $posts_columns['date'] = _x('Date', 'column name');
    769773        $posts_columns = apply_filters('manage_media_columns', $posts_columns);
    770774
     
    824828                                'cb' => '<input type="checkbox" />',
    825829                                'author' => __('Author'),
    826                                 'comment' => _c('Comment|noun'),
     830                                /* translators: column name */
     831                                'comment' => _x('Comment', 'column name'),
    827832                                //'date' => __('Submitted'),
    828833                                'response' => __('In Response To')
     
    10611066                        </label>
    10621067
    1063                         <em style="margin:5px 10px 0 0" class="alignleft"><?php echo _c( '&ndash;OR&ndash;|Between password field and private checkbox on post quick edit interface' ); ?></em>
    1064 
     1068                        <em style="margin:5px 10px 0 0" class="alignleft">
     1069                                <?php
     1070                                /* translators: Between password field and private checkbox on post quick edit interface */
     1071                                echo __( '&ndash;OR&ndash;' );
     1072                                ?>
     1073                        </em>
    10651074                        <label class="alignleft inline-edit-private">
    10661075                                <input type="checkbox" name="keep_private" value="private" />
     
    21052114                                        }
    21062115                                        if ( 'spam' != $the_comment_status )
    2107                                                 $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>';
     2116                                                $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>';
    21082117                                        $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
    21092118                                        $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
     
    25102519        $hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    25112520        $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    2512         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);
     2521        /* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */
     2522        printf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute);
    25132523
    25142524        echo '<input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
     
    32793289                $post_states[] = __('Draft');
    32803290        if ( 'pending' == $post->post_status && 'pending' != $post_status )
    3281                 $post_states[] = _c('Pending|post state');
     3291                /* translators: post state */
     3292                $post_states[] = _x('Pending', 'post state');
    32823293        if ( is_sticky($post->ID) )
    32833294                $post_states[] = __('Sticky');
  • trunk/wp-admin/includes/widgets.php

    r9944 r10680  
    264264
    265265        if ( $widget_title && $widget_title != $sidebar_args['widget_name'] )
    266                 $widget_title = sprintf( _c('%1$s: %2$s|1: widget name, 2: widget title' ), $sidebar_args['widget_name'], $widget_title );
     266                /* translators: 1: widget name, 2: widget title */
     267                $widget_title = sprintf( _x('%1$s: %2$s', 'widget' ), $sidebar_args['widget_name'], $widget_title );
    267268        else
    268269                $widget_title = wp_specialchars( strip_tags( $sidebar_args['widget_name'] ) );
  • trunk/wp-admin/menu.php

    r10568 r10680  
    3232$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'wp-menu-open menu-top', 'menu-posts', 'div' );
    3333        $submenu['edit.php'][5]  = array( __('Edit'), 'edit_posts', 'edit.php' );
    34         $submenu['edit.php'][10]  = array( _c('Add New|post'), 'edit_posts', 'post-new.php' );
     34        /* translators: add new post */
     35        $submenu['edit.php'][10]  = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' );
    3536
    3637        $i = 15;
     
    4748$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top', 'menu-media', 'div' );
    4849        $submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
    49         $submenu['upload.php'][10] = array( _c('Add New|file'), 'upload_files', 'media-new.php');
     50        /* translators: add new file */
     51        $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');
    5052
    5153$menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top', 'menu-links', 'div' );
    5254        $submenu['link-manager.php'][5] = array( __('Edit'), 'manage_links', 'link-manager.php' );
    53         $submenu['link-manager.php'][10] = array( _c('Add New|links'), 'manage_links', 'link-add.php' );
     55        /* translators: add new links */
     56        $submenu['link-manager.php'][10] = array( _x('Add New', 'links'), 'manage_links', 'link-add.php' );
    5457        $submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' );
    5558
    5659$menu[20] = array( __('Pages'), 'edit_pages', 'edit-pages.php', '', 'menu-top', 'menu-pages', 'div' );
    5760        $submenu['edit-pages.php'][5] = array( __('Edit'), 'edit_pages', 'edit-pages.php' );
    58         $submenu['edit-pages.php'][10] = array( _c('Add New|page'), 'edit_pages', 'page-new.php' );
     61        /* translators: add new page */
     62        $submenu['edit-pages.php'][10] = array( _x('Add New', 'page'), 'edit_pages', 'page-new.php' );
    5963
    6064$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' );
     
    7680$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' );
    7781        $submenu['plugins.php'][5]  = array( __('Installed'), 'activate_plugins', 'plugins.php' );
    78         $submenu['plugins.php'][10] = array(_c('Add New|plugin'), 'install_plugins', 'plugin-install.php');
     82        /* translators: add new plugin */
     83        $submenu['plugins.php'][10] = array(_x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php');
    7984        $submenu['plugins.php'][15] = array( __('Editor'), 'edit_plugins', 'plugin-editor.php' );
    8085
  • trunk/wp-admin/themes.php

    r10648 r10680  
    109109<img src="<?php echo WP_CONTENT_URL . $ct->stylesheet_dir . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" />
    110110<?php endif; ?>
    111 <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>
     111<h4><?php
     112        /* translators: 1: theme title, 2: theme version, 3: theme author */
     113        printf(__('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h4>
    112114<p class="description"><?php echo $ct->description; ?></p>
    113115<?php if ($ct->parent_theme) { ?>
  • trunk/wp-admin/upload.php

    r10606 r10680  
    303303        <th scope="col" class="check-column"><input type="checkbox" /></th>
    304304        <th scope="col"></th>
    305         <th scope="col"><?php echo _c('Media|media column header'); ?></th>
    306         <th scope="col"><?php echo _c('Date Added|media column header'); ?></th>
     305        <th scope="col"><?php /* translators: column name in media */ echo _x('Media', 'media column name'); ?></th>
     306        <th scope="col"><?php /* translators: column name in media */ echo _x('Date Added', 'media column name'); ?></th>
    307307</tr>
    308308</thead>
     
    312312        <th scope="col" class="check-column"><input type="checkbox" /></th>
    313313        <th scope="col"></th>
    314         <th scope="col"><?php echo _c('Media|media column header'); ?></th>
    315         <th scope="col"><?php echo _c('Date Added|media column header'); ?></th>
     314        <th scope="col"><?php /* translators: column name in media */ echo _x('Media', 'media column name'); ?></th>
     315        <th scope="col"><?php /* translators: column name in media */ echo _x('Date Added', 'media column name'); ?></th>
    316316</tr>
    317317</tfoot>
Note: See TracChangeset for help on using the changeset viewer.