Make WordPress Core

Changeset 12231


Ignore:
Timestamp:
11/19/2009 10:49:16 PM (15 years ago)
Author:
ryan
Message:

Add context to strings. Props nbachiyski. fixes #10738

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-pages.php

    r12219 r12231  
    142142<div class="wrap">
    143143<?php screen_icon(); ?>
    144 <h2><?php echo esc_html( $title ); ?> <a href="page-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
     144<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
    145145if ( isset($_GET['s']) && $_GET['s'] )
    146146    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
  • trunk/wp-admin/edit.php

    r12184 r12231  
    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() ) ); ?>
  • trunk/wp-admin/includes/media.php

    r12195 r12231  
    16581658<a href="#" id="asc"><?php _e('Ascending'); ?></a> |
    16591659<a href="#" id="desc"><?php _e('Descending'); ?></a> |
    1660 <a href="#" id="clear"><?php _e('Clear'); ?></a>
     1660<a href="#" id="clear"><?php echo _x('Clear', 'verb'); ?></a>
    16611661</div>
    16621662<form enctype="multipart/form-data" method="post" action="<?php echo esc_attr($form_action_url); ?>" class="media-upload-form validate" id="gallery-form">
  • trunk/wp-admin/menu.php

    r11450 r12231  
    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' );
     
    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 {
  • trunk/wp-admin/plugins.php

    r11930 r12231  
    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
  • trunk/wp-admin/themes.php

    r12091 r12231  
    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>
  • trunk/wp-admin/upload.php

    r12196 r12231  
    171171<div class="wrap">
    172172<?php screen_icon(); ?>
    173 <h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
     173<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
    174174if ( isset($_GET['s']) && $_GET['s'] )
    175175    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
  • trunk/wp-admin/users.php

    r11929 r12231  
    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'] ) ); ?>
  • trunk/wp-includes/l10n.php

    r12179 r12231  
    206206function esc_attr_x( $single, $context, $domain = 'default' ) {
    207207    return esc_attr( translate_with_gettext_context( $single, $context, $domain ) );
     208}
     209
     210function esc_html_x( $single, $context, $domain = 'default' ) {
     211    return esc_html( translate_with_gettext_context( $single, $context, $domain ) );
    208212}
    209213
Note: See TracChangeset for help on using the changeset viewer.