diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/js/plugin-install.js --- a/wp/wp-admin/js/plugin-install.js Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/js/plugin-install.js Tue Dec 15 13:49:49 2020 +0100 @@ -4,7 +4,7 @@ * @output wp-admin/js/plugin-install.js */ -/* global plugininstallL10n, tb_click, tb_remove, tb_position */ +/* global tb_click, tb_remove, tb_position */ jQuery( document ).ready( function( $ ) { @@ -150,13 +150,19 @@ /* * Open the Plugin details modal. The event is delegated to get also the links - * in the plugins search tab, after the AJAX search rebuilds the HTML. It's + * in the plugins search tab, after the Ajax search rebuilds the HTML. It's * delegated on the closest ancestor and not on the body to avoid conflicts * with other handlers, see Trac ticket #43082. */ $( '.wrap' ).on( 'click', '.thickbox.open-plugin-details-modal', function( e ) { // The `data-title` attribute is used only in the Plugin screens. - var title = $( this ).data( 'title' ) ? plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ) : plugininstallL10n.plugin_modal_label; + var title = $( this ).data( 'title' ) ? + wp.i18n.sprintf( + // translators: %s: Plugin name. + wp.i18n.__( 'Plugin: %s' ), + $( this ).data( 'title' ) + ) : + wp.i18n.__( 'Plugin details' ); e.preventDefault(); e.stopPropagation(); @@ -170,7 +176,7 @@ tbWindow .attr({ 'role': 'dialog', - 'aria-label': plugininstallL10n.plugin_modal_label + 'aria-label': wp.i18n.__( 'Plugin details' ) }) .addClass( 'plugin-details-modal' ); @@ -183,11 +189,12 @@ var tab = $( this ).attr( 'name' ); event.preventDefault(); - // Flip the tab + // Flip the tab. $( '#plugin-information-tabs a.current' ).removeClass( 'current' ); $( this ).addClass( 'current' ); - // Only show the fyi box in the description section, on smaller screen, where it's otherwise always displayed at the top. + // Only show the fyi box in the description section, on smaller screen, + // where it's otherwise always displayed at the top. if ( 'description' !== tab && $( window ).width() < 772 ) { $( '#plugin-information-content' ).find( '.fyi' ).hide(); } else {