Make WordPress Core

Ticket #10738: add-new-context.diff

File add-new-context.diff, 6.3 KB (added by nbachiyski, 17 years ago)
  • wp-includes/l10n.php

     
    207207        return esc_attr( translate_with_gettext_context( $single, $context, $domain ) );
    208208}
    209209
     210function esc_html_x( $single, $context, $domain = 'default' ) {
     211        return esc_html( translate_with_gettext_context( $single, $context, $domain ) );
     212}
     213
    210214function __ngettext() {
    211215        _deprecated_function( __FUNCTION__, '2.8', '_n()' );
    212216        $args = func_get_args();
  • wp-admin/users.php

     
    239239
    240240<div class="wrap">
    241241<?php screen_icon(); ?>
    242 <h2><?php echo esc_html( $title ); ?>  <a href="user-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
     242<h2><?php echo esc_html( $title ); ?>  <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'user'); ?></a> <?php
    243243if ( isset($_GET['usersearch']) && $_GET['usersearch'] )
    244244        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $_GET['usersearch'] ) ); ?>
    245245</h2>
  • wp-admin/includes/media.php

     
    15971597<?php _e('Sort Order:'); ?>
    15981598<a href="#" id="asc"><?php _e('Ascending'); ?></a> |
    15991599<a href="#" id="desc"><?php _e('Descending'); ?></a> |
    1600 <a href="#" id="clear"><?php _e('Clear'); ?></a>
     1600<a href="#" id="clear"><?php echo _x('Clear', 'verb'); ?></a>
    16011601</div>
    16021602<form enctype="multipart/form-data" method="post" action="<?php echo esc_attr($form_action_url); ?>" class="media-upload-form validate" id="gallery-form">
    16031603<?php wp_nonce_field('media-form'); ?>
  • wp-admin/upload.php

     
    195195
    196196<div class="wrap">
    197197<?php screen_icon(); ?>
    198 <h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
     198<h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a> <?php
    199199if ( isset($_GET['s']) && $_GET['s'] )
    200200        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
    201201</h2>
  • wp-admin/menu.php

     
    7070$menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top', 'menu-appearance', 'div' );
    7171        $submenu['themes.php'][5]  = array(__('Themes'), 'switch_themes', 'themes.php');
    7272        $submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php');
    73         $submenu['themes.php'][15] = array(__('Add New Themes'), 'install_themes', 'theme-install.php');
     73        $submenu['themes.php'][15] = array(_x('Add New', 'theme'), 'install_themes', 'theme-install.php');
    7474
    7575$update_plugins = get_transient( 'update_plugins' );
    7676$update_count = 0;
     
    9191if ( current_user_can('edit_users') ) {
    9292        $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
    9393        $submenu['users.php'][5] = array(__('Authors &amp; Users'), 'edit_users', 'users.php');
    94         $submenu['users.php'][10] = array(__('Add New'), 'create_users', 'user-new.php');
     94        $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
    9595        $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
    9696} else {
    9797        $_wp_real_parent_file['users.php'] = 'profile.php';
  • wp-admin/plugins.php

     
    270270
    271271<div class="wrap">
    272272<?php screen_icon(); ?>
    273 <h2><?php echo esc_html( $title ); ?> <a href="plugin-install.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a></h2>
     273<h2><?php echo esc_html( $title ); ?> <a href="plugin-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a></h2>
    274274
    275275<?php
    276276
  • wp-admin/edit.php

     
    134134
    135135<div class="wrap">
    136136<?php screen_icon(); ?>
    137 <h2><?php echo esc_html( $title ); ?> <a href="post-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
     137<h2><?php echo esc_html( $title ); ?> <a href="post-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'post'); ?></a> <?php
    138138if ( isset($_GET['s']) && $_GET['s'] )
    139139        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
    140140</h2>
  • wp-admin/edit-pages.php

     
    138138
    139139<div class="wrap">
    140140<?php screen_icon(); ?>
    141 <h2><?php echo esc_html( $title ); ?> <a href="page-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
     141<h2><?php echo esc_html( $title ); ?> <a href="page-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'page'); ?></a> <?php
    142142if ( isset($_GET['s']) && $_GET['s'] )
    143143        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
    144144</h2>
  • wp-admin/themes.php

     
    127127
    128128<div class="wrap">
    129129<?php screen_icon(); ?>
    130 <h2><?php echo esc_html( $title ); ?> <a href="theme-install.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a></h2>
     130<h2><?php echo esc_html( $title ); ?> <a href="theme-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a></h2>
    131131
    132132<h3><?php _e('Current Theme'); ?></h3>
    133133<div id="current-theme">