<!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" />
<title>[38057] trunk: Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/38057">38057</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/38057","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>ocean90</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-07-13 17:31:15 +0000 (Wed, 13 Jul 2016)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.

Props swissspidy, SergeyBiryukov.
Fixes <a href="https://core.trac.wordpress.org/ticket/37290">#37290</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesajaxactionsphp">trunk/src/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunksrcwpadminincludesthemephp">trunk/src/wp-admin/includes/theme.php</a></li>
<li><a href="#trunksrcwpadminincludesupdatephp">trunk/src/wp-admin/includes/update.php</a></li>
<li><a href="#trunksrcwpadminjsupdatesjs">trunk/src/wp-admin/js/updates.js</a></li>
<li><a href="#trunksrcwpadminthemeinstallphp">trunk/src/wp-admin/theme-install.php</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
<li><a href="#trunktestsqunitfixturesupdatesjs">trunk/tests/qunit/fixtures/updates.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/ajax-actions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ajax-actions.php      2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/src/wp-admin/includes/ajax-actions.php        2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3344,6 +3344,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_send_json_error( $status );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        $status['themeName'] = wp_get_theme( $slug )->get( 'Name' );
+
</ins><span class="cx" style="display: block; padding: 0 10px">         if ( current_user_can( 'switch_themes' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_multisite() ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $status['activateUrl'] = add_query_arg( array(
</span></span></pre></div>
<a id="trunksrcwpadminincludesthemephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/theme.php     2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/src/wp-admin/includes/theme.php       2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -635,7 +635,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        <# if ( ! data.active ) { #>
</span><span class="cx" style="display: block; padding: 0 10px">                                <div class="theme-actions">
</span><span class="cx" style="display: block; padding: 0 10px">                                        <div class="inactive-theme">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                <a href="<?php echo $preview_url; ?>" target="_top" class="button button-primary"><?php _e( 'Live Preview' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         <?php
+                                               /* translators: %s: Theme name */
+                                               $aria_label = sprintf( __( 'Preview %s' ), '{{ data.name }}' );
+                                               ?>
+                                               <a href="<?php echo $preview_url; ?>" target="_top" class="button button-primary" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Live Preview' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         </div>
</span><span class="cx" style="display: block; padding: 0 10px">                                </div>
</span><span class="cx" style="display: block; padding: 0 10px">                        <# } #>
</span></span></pre></div>
<a id="trunksrcwpadminincludesupdatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/update.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/update.php    2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/src/wp-admin/includes/update.php      2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -690,7 +690,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  *         @type string colspan The number of table columns this row spans.
</span><span class="cx" style="display: block; padding: 0 10px">  *         @type string content The row content.
</span><span class="cx" style="display: block; padding: 0 10px">  *     }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *              
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px">  * The delete template takes one argument with four values:
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  *     param {object} data {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -716,13 +716,23 @@
</span><span class="cx" style="display: block; padding: 0 10px">        <script id="tmpl-item-deleted-row" type="text/template">
</span><span class="cx" style="display: block; padding: 0 10px">                <tr class="plugin-deleted-tr inactive deleted" id="{{ data.slug }}-deleted" data-slug="{{ data.slug }}" <# if ( data.plugin ) { #>data-plugin="{{ data.plugin }}"<# } #>>
</span><span class="cx" style="display: block; padding: 0 10px">                        <td colspan="{{ data.colspan }}" class="plugin-update colspanchange">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <?php
-                               printf(
-                                       /* translators: %s: Plugin or Theme name */
-                                       __( '%s was successfully deleted.' ),
-                                       '<strong>{{{ data.name }}}</strong>'
-                               );
-                               ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <# if ( data.plugin ) { #>
+                                       <?php
+                                       printf(
+                                               /* translators: %s: Plugin name */
+                                               _x( '%s was successfully deleted.', 'plugin' ),
+                                               '<strong>{{{ data.name }}}</strong>'
+                                       );
+                                       ?>
+                               <# } else { #>
+                                       <?php
+                                       printf(
+                                               /* translators: %s: Theme name */
+                                               _x( '%s was successfully deleted.', 'theme' ),
+                                               '<strong>{{{ data.name }}}</strong>'
+                                       );
+                                       ?>
+                               <# } #>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </td>
</span><span class="cx" style="display: block; padding: 0 10px">                </tr>
</span><span class="cx" style="display: block; padding: 0 10px">        </script>
</span></span></pre></div>
<a id="trunksrcwpadminjsupdatesjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/updates.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/updates.js  2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/src/wp-admin/js/updates.js    2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -508,7 +508,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $message.text( wp.updates.l10n.installing );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $message.addClass( 'updating-message' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $message
+                       .addClass( 'updating-message' )
+                       .attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -535,6 +537,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $message
</span><span class="cx" style="display: block; padding: 0 10px">                        .removeClass( 'updating-message' )
</span><span class="cx" style="display: block; padding: 0 10px">                        .addClass( 'updated-message installed button-disabled' )
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        .attr( 'aria-label', wp.updates.l10n.pluginInstalledLabel.replace( '%s', response.pluginName ) )
</ins><span class="cx" style="display: block; padding: 0 10px">                         .text( wp.updates.l10n.installed );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -547,6 +550,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                // Transform the 'Install' button into an 'Activate' button.
</span><span class="cx" style="display: block; padding: 0 10px">                                $message.removeClass( 'install-now installed button-disabled updated-message' ).addClass( 'activate-now button-primary' )
</span><span class="cx" style="display: block; padding: 0 10px">                                        .attr( 'href', response.activateUrl )
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        .attr( 'aria-label', wp.updates.l10n.activatePluginLabel.replace( '%s', response.pluginName ) )
</ins><span class="cx" style="display: block; padding: 0 10px">                                         .text( wp.updates.l10n.activatePlugin );
</span><span class="cx" style="display: block; padding: 0 10px">                        }, 1000 );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -595,7 +599,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $button
</span><span class="cx" style="display: block; padding: 0 10px">                        .removeClass( 'updating-message' ).addClass( 'button-disabled' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        .attr( 'aria-label', wp.updates.l10n.installFailedLabel.replace( '%s', response.pluginName ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 .attr( 'aria-label', wp.updates.l10n.pluginInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) )
</ins><span class="cx" style="display: block; padding: 0 10px">                         .text( wp.updates.l10n.installFailedShort );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp.a11y.speak( errorMessage, 'assertive' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1003,7 +1007,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $message.data( 'originaltext', $message.html() );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $message.text( wp.updates.l10n.installing );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $message
+                       .text( wp.updates.l10n.installing )
+                       .attr( 'aria-label', wp.updates.l10n.themeInstallingLabel.replace( '%s', $message.data( 'name' ) ) );
</ins><span class="cx" style="display: block; padding: 0 10px">                 wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Remove previous error messages, if any.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1032,6 +1038,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $message = $card.find( '.button-primary' )
</span><span class="cx" style="display: block; padding: 0 10px">                        .removeClass( 'updating-message' )
</span><span class="cx" style="display: block; padding: 0 10px">                        .addClass( 'updated-message disabled' )
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        .attr( 'aria-label', wp.updates.l10n.themeInstalledLabel.replace( '%s', response.themeName ) )
</ins><span class="cx" style="display: block; padding: 0 10px">                         .text( wp.updates.l10n.installed );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1045,6 +1052,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        .attr( 'href', response.activateUrl )
</span><span class="cx" style="display: block; padding: 0 10px">                                        .removeClass( 'theme-install updated-message disabled' )
</span><span class="cx" style="display: block; padding: 0 10px">                                        .addClass( 'activate' )
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        .attr( 'aria-label', wp.updates.l10n.activateThemeLabel.replace( '%s', response.themeName ) )
</ins><span class="cx" style="display: block; padding: 0 10px">                                         .text( wp.updates.l10n.activateTheme );
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1098,7 +1106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $button
</span><span class="cx" style="display: block; padding: 0 10px">                        .removeClass( 'updating-message' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        .attr( 'aria-label', wp.updates.l10n.installFailedLabel.replace( '%s', $card.find( '.theme-name' ).text() ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 .attr( 'aria-label', wp.updates.l10n.themeInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) )
</ins><span class="cx" style="display: block; padding: 0 10px">                         .text( wp.updates.l10n.installFailedShort );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp.a11y.speak( errorMessage, 'assertive' );
</span></span></pre></div>
<a id="trunksrcwpadminthemeinstallphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/theme-install.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/theme-install.php      2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/src/wp-admin/theme-install.php        2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -248,17 +248,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        <div class="theme-actions">
</span><span class="cx" style="display: block; padding: 0 10px">                <# if ( data.installed ) { #>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        <?php
+                       /* translators: %s: Theme name */
+                       $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
+                       ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <# if ( data.activate_url ) { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <a class="button button-primary activate" href="{{ data.activate_url }}"><?php esc_html_e( 'Activate' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">                        <# if ( data.customize_url ) { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <a class="button button-secondary load-customize" href="{{ data.customize_url }}"><?php esc_html_e( 'Live Preview' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <a class="button button-secondary load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <# } else { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <button class="button-secondary preview install-theme-preview"><?php esc_html_e( 'Preview' ); ?></button>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">                <# } else { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <a class="button button-primary theme-install" data-slug="{{ data.id }}" href="{{ data.install_url }}"><?php esc_html_e( 'Install' ); ?></a>
-                       <button class="button-secondary preview install-theme-preview"><?php esc_html_e( 'Preview' ); ?></button>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <?php
+                       /* translators: %s: Theme name */
+                       $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
+                       ?>
+                       <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
+                       <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px">                 <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">        </div>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -274,9 +282,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        <button class="previous-theme"><span class="screen-reader-text"><?php _ex( 'Previous', 'Button label for a theme' ); ?></span></button>
</span><span class="cx" style="display: block; padding: 0 10px">                        <button class="next-theme"><span class="screen-reader-text"><?php _ex( 'Next', 'Button label for a theme' ); ?></span></button>
</span><span class="cx" style="display: block; padding: 0 10px">                        <# if ( data.installed ) { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <a class="button button-primary activate" href="{{ data.activate_url }}"><?php esc_html_e( 'Activate' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <a class="button button-primary activate" href="{{ data.activate_url }}"><?php _e( 'Activate' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <# } else { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <a href="{{ data.install_url }}" class="button button-primary theme-install" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">                </div>
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="wp-full-overlay-sidebar-content">
</span></span></pre></div>
<a id="trunksrcwpadminthemesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/themes.php     2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/src/wp-admin/themes.php       2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -277,7 +277,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        <a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php } ?>
</span><span class="cx" style="display: block; padding: 0 10px">        <?php } else { ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>"><?php _e( 'Activate' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php
+               /* translators: %s: Theme name */
+               $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
+               ?>
+               <a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                 <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        <a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php } ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -402,7 +406,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                <a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px">                        <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">                <# } else { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <a class="button button-secondary activate" href="{{{ data.actions.activate }}}"><?php _e( 'Activate' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <?php
+                       /* translators: %s: Theme name */
+                       $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
+                       ?>
+                       <a class="button button-secondary activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px">                <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">        </div>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -456,8 +464,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                <?php echo implode( ' ', $current_theme_actions ); ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        </div>
</span><span class="cx" style="display: block; padding: 0 10px">                        <div class="inactive-theme">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                <?php
+                               /* translators: %s: Theme name */
+                               $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
+                               ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <# if ( data.actions.activate ) { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        <a href="{{{ data.actions.activate }}}" class="button button-secondary activate"><?php _e( 'Activate' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 <a href="{{{ data.actions.activate }}}" class="button button-secondary activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">                                <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px">                        </div>
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php   2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/src/wp-includes/script-loader.php     2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -628,12 +628,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'installFailedShort'         => __( 'Install Failed!' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: Error string for a failed installation */
</span><span class="cx" style="display: block; padding: 0 10px">                                'installFailed'              => __( 'Installation failed: %s' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                /* translators: Plugin/Theme name and version */
-                               'installingLabel'            => __( 'Installing %s...' ), // no ellipsis
-                               /* translators: Plugin/Theme name and version */
-                               'installedLabel'             => __( '%s installed!' ),
-                               /* translators: Plugin/Theme name and version */
-                               'installFailedLabel'         => __( '%s installation failed' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         /* translators: Plugin name and version */
+                               'pluginInstallingLabel'      => _x( 'Installing %s...', 'plugin' ), // no ellipsis
+                               /* translators: Theme name and version */
+                               'themeInstallingLabel'       => _x( 'Installing %s...', 'theme' ), // no ellipsis
+                               /* translators: Plugin name and version */
+                               'pluginInstalledLabel'       => _x( '%s installed!', 'plugin' ),
+                               /* translators: Theme name and version */
+                               'themeInstalledLabel'        => _x( '%s installed!', 'theme' ),
+                               /* translators: Plugin name and version */
+                               'pluginInstallFailedLabel'   => _x( '%s installation failed', 'plugin' ),
+                               /* translators: Theme name and version */
+                               'themeInstallFailedLabel'    => _x( '%s installation failed', 'theme' ),
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'installingMsg'              => __( 'Installing... please wait.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'installedMsg'               => __( 'Installation completed successfully.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                /* translators: Activation URL */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -649,10 +655,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'deleteFailed'               => __( 'Deletion failed: %s' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'deleted'                    => __( 'Deleted!' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'livePreview'                => __( 'Live Preview' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                /* translators: %s: Theme name */
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'activatePlugin'             => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'activateTheme'              => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                /* translators: %s: Plugin name */
+                               'activatePluginLabel'        => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ),
+                               /* translators: %s: Theme name */
+                               'activateThemeLabel'         => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ),
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'activateImporter'           => __( 'Activate importer' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'unknownError'               => __( 'An unknown error occured' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'unknownError'               => __( 'An unknown error occurred' ),
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'pluginsFound'               => __( 'Number of plugins found: %d' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span></span></pre></div>
<a id="trunktestsqunitfixturesupdatesjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/qunit/fixtures/updates.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/qunit/fixtures/updates.js     2016-07-13 17:03:54 UTC (rev 38056)
+++ trunk/tests/qunit/fixtures/updates.js       2016-07-13 17:31:15 UTC (rev 38057)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,9 +22,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                'installed': 'Installed!',
</span><span class="cx" style="display: block; padding: 0 10px">                'installFailedShort': 'Install Failed!',
</span><span class="cx" style="display: block; padding: 0 10px">                'installFailed': 'Installation failed: %s',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                'installingLabel': 'Installing %s...', // No ellipsis
-               'installedLabel': '%s installed!',
-               'installFailedLabel': '%s installation failed',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         'pluginInstallingLabel': 'Installing %s...', // No ellipsis
+               'themeInstallingLabel': 'Installing %s...', // No ellipsis
+               'pluginInstalledLabel': '%s installed!',
+               'themeInstalledLabel': '%s installed!',
+               'pluginInstallFailedLabel': '%s installation failed',
+               'themeInstallFailedLabel': '%s installation failed',
</ins><span class="cx" style="display: block; padding: 0 10px">                 'installingMsg': 'Installing... please wait.',
</span><span class="cx" style="display: block; padding: 0 10px">                'installedMsg': 'Installation completed successfully.',
</span><span class="cx" style="display: block; padding: 0 10px">                'importerInstalledMsg': 'Importer installed successfully. <a href="%s">Activate plugin &#38; run importer</a>',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,9 +40,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                'deleted': 'Deleted!',
</span><span class="cx" style="display: block; padding: 0 10px">                'livePreview': 'Live Preview',
</span><span class="cx" style="display: block; padding: 0 10px">                'activatePlugin': 'Activate',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                'activateTheme': 'Activate',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         'activateTheme':       'Activate',
+               'activatePluginLabel': 'Activate %s',
+               'activateThemeLabel':  'Activate %s',
</ins><span class="cx" style="display: block; padding: 0 10px">                 'activateImporter': 'Activate importer',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                'unknownError': 'An unknown error occured',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         'unknownError': 'An unknown error occurred',
</ins><span class="cx" style="display: block; padding: 0 10px">                 'pluginsFound': 'Number of plugins found: %d',
</span><span class="cx" style="display: block; padding: 0 10px">                'noPluginsFound': 'No plugins found. Try a different search.'
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre>
</div>
</div>

</body>
</html>