<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12231] trunk: Add context to strings.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12231">12231</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2009-11-19 22:49:16 +0000 (Thu, 19 Nov 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add context to strings. Props nbachiyski. fixes <a href="http://trac.wordpress.org/ticket/10738">#10738</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditpagesphp">trunk/wp-admin/edit-pages.php</a></li>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminthemesphp">trunk/wp-admin/themes.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
<li><a href="#trunkwpadminusersphp">trunk/wp-admin/users.php</a></li>
<li><a href="#trunkwpincludesl10nphp">trunk/wp-includes/l10n.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditpagesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-pages.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-pages.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/edit-pages.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php echo esc_html( $title ); ?> <a href="page-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
</del><ins>+<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
</ins><span class="cx"> if ( isset($_GET['s']) && $_GET['s'] )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/edit.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php echo esc_html( $title ); ?> <a href="post-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
</del><ins>+<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
</ins><span class="cx"> if ( isset($_GET['s']) && $_GET['s'] )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/includes/media.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -1657,7 +1657,7 @@
</span><span class="cx"> <?php _e('Sort Order:'); ?>
</span><span class="cx"> <a href="#" id="asc"><?php _e('Ascending'); ?></a> |
</span><span class="cx"> <a href="#" id="desc"><?php _e('Descending'); ?></a> |
</span><del>-<a href="#" id="clear"><?php _e('Clear'); ?></a>
</del><ins>+<a href="#" id="clear"><?php echo _x('Clear', 'verb'); ?></a>
</ins><span class="cx"> </div>
</span><span class="cx"> <form enctype="multipart/form-data" method="post" action="<?php echo esc_attr($form_action_url); ?>" class="media-upload-form validate" id="gallery-form">
</span><span class="cx"> <?php wp_nonce_field('media-form'); ?>
</span></span></pre></div>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/menu.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top', 'menu-appearance', 'div' );
</span><span class="cx">         $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php');
</span><span class="cx">         $submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php');
</span><del>-        $submenu['themes.php'][15] = array(__('Add New Themes'), 'install_themes', 'theme-install.php');
</del><ins>+        $submenu['themes.php'][15] = array(_x('Add New', 'theme'), 'install_themes', 'theme-install.php');
</ins><span class="cx">
</span><span class="cx"> $update_plugins = get_transient( 'update_plugins' );
</span><span class="cx"> $update_count = 0;
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> if ( current_user_can('edit_users') ) {
</span><span class="cx">         $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
</span><span class="cx">         $submenu['users.php'][5] = array(__('Authors &amp; Users'), 'edit_users', 'users.php');
</span><del>-        $submenu['users.php'][10] = array(__('Add New'), 'create_users', 'user-new.php');
</del><ins>+        $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
</ins><span class="cx">         $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
</span><span class="cx"> } else {
</span><span class="cx">         $_wp_real_parent_file['users.php'] = 'profile.php';
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/plugins.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -270,7 +270,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php echo esc_html( $title ); ?> <a href="plugin-install.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a></h2>
</del><ins>+<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>
</ins><span class="cx">
</span><span class="cx"> <?php
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/themes.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/themes.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/themes.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php echo esc_html( $title ); ?> <a href="theme-install.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a></h2>
</del><ins>+<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>
</ins><span class="cx">
</span><span class="cx"> <h3><?php _e('Current Theme'); ?></h3>
</span><span class="cx"> <div id="current-theme">
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/upload.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
</del><ins>+<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
</ins><span class="cx"> if ( isset($_GET['s']) && $_GET['s'] )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-admin/users.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php echo esc_html( $title ); ?> <a href="user-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
</del><ins>+<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
</ins><span class="cx"> if ( isset($_GET['usersearch']) && $_GET['usersearch'] )
</span><span class="cx">         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $_GET['usersearch'] ) ); ?>
</span><span class="cx"> </h2>
</span></span></pre></div>
<a id="trunkwpincludesl10nphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/l10n.php (12230 => 12231)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/l10n.php        2009-11-19 22:47:11 UTC (rev 12230)
+++ trunk/wp-includes/l10n.php        2009-11-19 22:49:16 UTC (rev 12231)
</span><span class="lines">@@ -207,6 +207,10 @@
</span><span class="cx">         return esc_attr( translate_with_gettext_context( $single, $context, $domain ) );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function esc_html_x( $single, $context, $domain = 'default' ) {
+        return esc_html( translate_with_gettext_context( $single, $context, $domain ) );
+}
+
</ins><span class="cx"> function __ngettext() {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '2.8', '_n()' );
</span><span class="cx">         $args = func_get_args();
</span></span></pre>
</div>
</div>
</body>
</html>