WordPress.org

Make WordPress Core

Ticket #13395: _e_x.diff

File _e_x.diff, 19.1 KB (added by westi, 4 years ago)

a patch

  • wp-admin/edit-form-comment.php

    ### Eclipse Workspace Patch 1.0
    #P trunk.domain
     
    4747<div id="misc-publishing-actions"> 
    4848 
    4949<div class="misc-pub-section" id="comment-status-radio"> 
    50 <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 /> 
    51 <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 /> 
    52 <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> 
     50<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php /* translators: comment type radio button */ _e_x('Approved', 'adjective') ?></label><br /> 
     51<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php /* translators: comment type radio button */ _e_x('Pending', 'adjective') ?></label><br /> 
     52<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ _e_x('Spam', 'adjective'); ?></label> 
    5353</div> 
    5454 
    5555<div class="misc-pub-section curtime misc-pub-section-last"> 
  • wp-includes/l10n.php

     
    190190        return translate_with_gettext_context( $single, $context, $domain ); 
    191191} 
    192192 
     193/** 
     194 * Displays translated string with gettext context 
     195 *  
     196 * @see _x 
     197 * @since 3.0.0 
     198 * 
     199 * @param string $text Text to translate 
     200 * @param string $context Context information for the translators 
     201 * @param string $domain Optional. Domain to retrieve the translated text 
     202 * @return string Translated context string without pipe 
     203 */ 
     204function _e_x( $single, $context, $domain = 'default' ) { 
     205        echo _x( $single, $context, $domain ); 
     206} 
     207 
    193208function esc_attr_x( $single, $context, $domain = 'default' ) { 
    194209        return esc_attr( translate_with_gettext_context( $single, $context, $domain ) ); 
    195210} 
  • wp-admin/edit-tag-form.php

     
    3333<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-tag_' . $tag_ID); ?> 
    3434        <table class="form-table"> 
    3535                <tr class="form-field form-required"> 
    36                         <th scope="row" valign="top"><label for="name"><?php echo _x('Name', 'Taxonomy Name'); ?></label></th> 
     36                        <th scope="row" valign="top"><label for="name"><?php _e_x('Name', 'Taxonomy Name'); ?></label></th> 
    3737                        <td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" /> 
    3838                        <p class="description"><?php _e('The name is how it appears on your site.'); ?></p></td> 
    3939                </tr> 
    4040<?php if ( !global_terms_enabled() ) { ?> 
    4141                <tr class="form-field"> 
    42                         <th scope="row" valign="top"><label for="slug"><?php echo _x('Slug', 'Taxonomy Slug'); ?></label></th> 
     42                        <th scope="row" valign="top"><label for="slug"><?php _e_x('Slug', 'Taxonomy Slug'); ?></label></th> 
    4343                        <td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo esc_attr(apply_filters('editable_slug', $tag->slug)); ?>" size="40" /> 
    4444                        <p class="description"><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td> 
    4545                </tr> 
    4646<?php } ?> 
    4747<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?> 
    4848                <tr class="form-field"> 
    49                         <th scope="row" valign="top"><label for="parent"><?php echo _x('Parent', 'Taxonomy Parent'); ?></label></th> 
     49                        <th scope="row" valign="top"><label for="parent"><?php _e_x('Parent', 'Taxonomy Parent'); ?></label></th> 
    5050                        <td> 
    5151                                <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br /> 
    5252                                <?php if ( 'category' == $taxonomy ) : ?> 
     
    5656                </tr> 
    5757<?php endif; // is_taxonomy_hierarchical() ?> 
    5858                <tr class="form-field"> 
    59                         <th scope="row" valign="top"><label for="description"><?php echo _x('Description', 'Taxonomy Description'); ?></label></th> 
     59                        <th scope="row" valign="top"><label for="description"><?php _e_x('Description', 'Taxonomy Description'); ?></label></th> 
    6060                        <td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo esc_html($tag->description); ?></textarea><br /> 
    6161                        <span class="description"><?php _e('The description is not prominent by default, however some themes may show it.'); ?></span></td> 
    6262                </tr> 
  • wp-admin/includes/template.php

     
    36013601<div id="screen-options-wrap" class="hidden"> 
    36023602        <form id="adv-settings" action="" method="post"> 
    36033603        <?php if ( isset($wp_meta_boxes[$screen->id]) ) : ?> 
    3604                 <h5><?php echo _x('Show on screen', 'Metaboxes') ?></h5> 
     3604                <h5><?php _e_x('Show on screen', 'Metaboxes') ?></h5> 
    36053605                <div class="metabox-prefs"> 
    36063606                        <?php meta_box_prefs($screen); ?> 
    36073607                        <br class="clear" /> 
    36083608                </div> 
    36093609                <?php endif; 
    36103610                if ( ! empty($column_screens) ) : ?> 
    3611                 <h5><?php echo _x('Show on screen', 'Columns') ?></h5> 
     3611                <h5><?php _e_x('Show on screen', 'Columns') ?></h5> 
    36123612                <div class="metabox-prefs"> 
    36133613                        <?php manage_columns_prefs($screen); ?> 
    36143614                        <br class="clear" /> 
  • wp-admin/comment.php

     
    159159</tr> 
    160160<?php } ?> 
    161161<tr> 
    162 <th scope="row" valign="top"><?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?></th> 
     162<th scope="row" valign="top"><?php /* translators: field name in comment form */ _e_x('Comment', 'noun'); ?></th> 
    163163<td><?php echo $comment->comment_content; ?></td> 
    164164</tr> 
    165165</table> 
  • wp-admin/upload.php

     
    363363<tr> 
    364364        <th scope="col" class="check-column"><input type="checkbox" /></th> 
    365365        <th scope="col"></th> 
    366         <th scope="col"><?php /* translators: column name in media */ echo _x('Media', 'media column name'); ?></th> 
    367         <th scope="col"><?php /* translators: column name in media */ echo _x('Author', 'media column name'); ?></th> 
    368         <th scope="col"><?php /* translators: column name in media */ echo _x('Date Added', 'media column name'); ?></th> 
     366        <th scope="col"><?php /* translators: column name in media */ _e_x('Media', 'media column name'); ?></th> 
     367        <th scope="col"><?php /* translators: column name in media */ _e_x('Author', 'media column name'); ?></th> 
     368        <th scope="col"><?php /* translators: column name in media */ _e_x('Date Added', 'media column name'); ?></th> 
    369369</tr> 
    370370</thead> 
    371371 
     
    373373<tr> 
    374374        <th scope="col" class="check-column"><input type="checkbox" /></th> 
    375375        <th scope="col"></th> 
    376         <th scope="col"><?php /* translators: column name in media */ echo _x('Media', 'media column name'); ?></th> 
    377         <th scope="col"><?php /* translators: column name in media */ echo _x('Author', 'media column name'); ?></th> 
    378         <th scope="col"><?php /* translators: column name in media */ echo _x('Date Added', 'media column name'); ?></th> 
     376        <th scope="col"><?php /* translators: column name in media */ _e_x('Media', 'media column name'); ?></th> 
     377        <th scope="col"><?php /* translators: column name in media */ _e_x('Author', 'media column name'); ?></th> 
     378        <th scope="col"><?php /* translators: column name in media */ _e_x('Date Added', 'media column name'); ?></th> 
    379379</tr> 
    380380</tfoot> 
    381381 
  • wp-admin/ms-users.php

     
    130130                                <select name="action"> 
    131131                                        <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option> 
    132132                                        <option value="delete"><?php _e( 'Delete' ); ?></option> 
    133                                         <option value="spam"><?php echo _x( 'Mark as Spam', 'user' ); ?></option> 
    134                                         <option value="notspam"><?php echo _x( 'Not Spam', 'user' ); ?></option> 
     133                                        <option value="spam"><?php _e_x( 'Mark as Spam', 'user' ); ?></option> 
     134                                        <option value="notspam"><?php _e_x( 'Not Spam', 'user' ); ?></option> 
    135135                                </select> 
    136136                                <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" /> 
    137137                                <?php wp_nonce_field( 'bulk-ms-users' ); ?> 
     
    324324                                <select name="action2"> 
    325325                                        <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option> 
    326326                                        <option value="delete"><?php _e( 'Delete' ); ?></option> 
    327                                         <option value="spam"><?php echo _x( 'Mark as Spam', 'user' ); ?></option> 
    328                                         <option value="notspam"><?php echo _x( 'Not Spam', 'user' ); ?></option> 
     327                                        <option value="spam"><?php _e_x( 'Mark as Spam', 'user' ); ?></option> 
     328                                        <option value="notspam"><?php _e_x( 'Not Spam', 'user' ); ?></option> 
    329329                                </select> 
    330330                                <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
    331331                        </div> 
  • wp-admin/includes/media.php

     
    17191719<?php _e('Sort Order:'); ?> 
    17201720<a href="#" id="asc"><?php _e('Ascending'); ?></a> | 
    17211721<a href="#" id="desc"><?php _e('Descending'); ?></a> | 
    1722 <a href="#" id="clear"><?php echo _x('Clear', 'verb'); ?></a> 
     1722<a href="#" id="clear"><?php _e_x('Clear', 'verb'); ?></a> 
    17231723</div> 
    17241724<form enctype="multipart/form-data" method="post" action="<?php echo esc_attr($form_action_url); ?>" class="media-upload-form validate" id="gallery-form"> 
    17251725<?php wp_nonce_field('media-form'); ?> 
  • wp-admin/theme-editor.php

     
    172172                <li><a href="theme-editor.php?file=<?php echo "$template_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>&amp;dir=theme"><?php echo $filedesc ?></a></li> 
    173173<?php endwhile; ?> 
    174174        </ul> 
    175         <h3><?php /* translators: Theme stylesheets in theme editor */ echo _x('Styles', 'Theme stylesheets in theme editor'); ?></h3> 
     175        <h3><?php /* translators: Theme stylesheets in theme editor */ _e_x('Styles', 'Theme stylesheets in theme editor'); ?></h3> 
    176176        <ul> 
    177177<?php 
    178178        $template_mapping = array(); 
  • wp-admin/includes/plugin-install.php

     
    169169                <select name="type" id="typeselector"> 
    170170                        <option value="term"<?php selected('term', $type) ?>><?php _e('Term'); ?></option> 
    171171                        <option value="author"<?php selected('author', $type) ?>><?php _e('Author'); ?></option> 
    172                         <option value="tag"<?php selected('tag', $type) ?>><?php echo _x('Tag', 'Plugin Installer'); ?></option> 
     172                        <option value="tag"<?php selected('tag', $type) ?>><?php _e_x('Tag', 'Plugin Installer'); ?></option> 
    173173                </select> 
    174174                <input type="text" name="s" value="<?php echo esc_attr($term) ?>" /> 
    175175                <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label> 
  • wp-admin/edit-tags.php

     
    348348<?php wp_nonce_field('add-tag'); ?> 
    349349 
    350350<div class="form-field form-required"> 
    351         <label for="tag-name"><?php echo _x('Name', 'Taxonomy Name'); ?></label> 
     351        <label for="tag-name"><?php _e_x('Name', 'Taxonomy Name'); ?></label> 
    352352        <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" /> 
    353353        <p><?php _e('The name is how it appears on your site.'); ?></p> 
    354354</div> 
    355355<?php if ( ! global_terms_enabled() ) : ?> 
    356356<div class="form-field"> 
    357         <label for="tag-slug"><?php echo _x('Slug', 'Taxonomy Slug'); ?></label> 
     357        <label for="tag-slug"><?php _e_x('Slug', 'Taxonomy Slug'); ?></label> 
    358358        <input name="slug" id="tag-slug" type="text" value="" size="40" /> 
    359359        <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> 
    360360</div> 
    361361<?php endif; // is_multisite() ?> 
    362362<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?> 
    363363<div class="form-field"> 
    364         <label for="parent"><?php echo _x('Parent', 'Taxonomy Parent'); ?></label> 
     364        <label for="parent"><?php _e_x('Parent', 'Taxonomy Parent'); ?></label> 
    365365        <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'taxonomy' => $taxonomy, 'name' => 'parent', 'orderby' => 'name', 'hierarchical' => true, 'show_option_none' => __('None'))); ?> 
    366366        <?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?> 
    367367                <p><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p> 
     
    369369</div> 
    370370<?php endif; // is_taxonomy_hierarchical() ?> 
    371371<div class="form-field"> 
    372         <label for="tag-description"><?php echo _x('Description', 'Taxonomy Description'); ?></label> 
     372        <label for="tag-description"><?php _e_x('Description', 'Taxonomy Description'); ?></label> 
    373373        <textarea name="description" id="tag-description" rows="5" cols="40"></textarea> 
    374374        <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> 
    375375</div> 
  • wp-admin/edit-comments.php

     
    316316<option value="approve"><?php _e('Approve'); ?></option> 
    317317<?php endif; ?> 
    318318<?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?> 
    319 <option value="spam"><?php echo _x('Mark as Spam', 'comment'); ?></option> 
     319<option value="spam"><?php _e_x('Mark as Spam', 'comment'); ?></option> 
    320320<?php endif; ?> 
    321321<?php if ( 'trash' == $comment_status ): ?> 
    322322<option value="untrash"><?php _e('Restore'); ?></option> 
    323323<?php elseif ( 'spam' == $comment_status ): ?> 
    324 <option value="unspam"><?php echo _x('Not Spam', 'comment'); ?></option> 
     324<option value="unspam"><?php _e_x('Not Spam', 'comment'); ?></option> 
    325325<?php endif; ?> 
    326326<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?> 
    327327<option value="delete"><?php _e('Delete Permanently'); ?></option> 
     
    416416<option value="approve"><?php _e('Approve'); ?></option> 
    417417<?php endif; ?> 
    418418<?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?> 
    419 <option value="spam"><?php echo _x('Mark as Spam', 'comment'); ?></option> 
     419<option value="spam"><?php _e_x('Mark as Spam', 'comment'); ?></option> 
    420420<?php endif; ?> 
    421421<?php if ( 'trash' == $comment_status ): ?> 
    422422<option value="untrash"><?php _e('Restore'); ?></option> 
     
    424424<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?> 
    425425<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    426426<?php elseif ( 'spam' == $comment_status ): ?> 
    427 <option value="unspam"><?php echo _x('Not Spam', 'comment'); ?></option> 
     427<option value="unspam"><?php _e_x('Not Spam', 'comment'); ?></option> 
    428428<?php else: ?> 
    429429<option value="trash"><?php _e('Move to Trash'); ?></option> 
    430430<?php endif; ?> 
  • wp-admin/ms-sites.php

     
    113113                                                        <?php } ?> 
    114114                                                </tr> 
    115115                                                <tr class="form-field"> 
    116                                                         <th scope="row"><?php echo _x( 'Registered', 'site' ) ?></th> 
     116                                                        <th scope="row"><?php _e_x( 'Registered', 'site' ) ?></th> 
    117117                                                        <td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" size="40" /></td> 
    118118                                                </tr> 
    119119                                                <tr class="form-field"> 
     
    414414                        <select name="action"> 
    415415                                <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option> 
    416416                                <option value="delete"><?php _e( 'Delete' ); ?></option> 
    417                                 <option value="spam"><?php echo _x( 'Mark as Spam', 'site' ); ?></option> 
    418                                 <option value="notspam"><?php echo _x( 'Not Spam', 'site' ); ?></option> 
     417                                <option value="spam"><?php _e_x( 'Mark as Spam', 'site' ); ?></option> 
     418                                <option value="notspam"><?php _e_x( 'Not Spam', 'site' ); ?></option> 
    419419                        </select> 
    420420                        <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" /> 
    421421                        <?php wp_nonce_field( 'bulk-ms-sites' ); ?> 
     
    665665                        <select name="action2"> 
    666666                                <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option> 
    667667                                <option value="delete"><?php _e( 'Delete' ); ?></option> 
    668                                 <option value="spam"><?php echo _x( 'Mark as Spam', 'site' ); ?></option> 
    669                                 <option value="notspam"><?php echo _x( 'Not Spam', 'site' ); ?></option> 
     668                                <option value="spam"><?php _e_x( 'Mark as Spam', 'site' ); ?></option> 
     669                                <option value="notspam"><?php _e_x( 'Not Spam', 'site' ); ?></option> 
    670670                        </select> 
    671671                        <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
    672672                        </div> 
  • wp-admin/includes/theme-install.php

     
    156156        <select name="type" id="typeselector"> 
    157157        <option value="term" <?php selected('term', $type) ?>><?php _e('Term'); ?></option> 
    158158        <option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></option> 
    159         <option value="tag" <?php selected('tag', $type) ?>><?php echo _x('Tag', 'Theme Installer'); ?></option> 
     159        <option value="tag" <?php selected('tag', $type) ?>><?php _e_x('Tag', 'Theme Installer'); ?></option> 
    160160        </select> 
    161161        <input type="text" name="s" size="30" value="<?php echo esc_attr($term) ?>" /> 
    162162        <input type="submit" name="search" value="<?php esc_attr_e('Search'); ?>" class="button" />