From d34b59a5d2cc77e6a4ae58856d42f7b749684bfa Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 20 Sep 2015 03:01:24 +0000 Subject: [PATCH] Plugins Admin: Avoid using HTML tags in translation strings, add translator strings. Props swissspidy, voldemortensen. Fixes #32269. Built from https://develop.svn.wordpress.org/trunk@34344 git-svn-id: http://core.svn.wordpress.org/trunk@34308 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/plugins.php | 28 +++++++++++++++++++++++----- wp-includes/version.php | 2 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 4a9fbb133e..b12f0f1d50 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -372,14 +372,24 @@ get_current_screen()->add_help_tab( array( 'title' => __('Overview'), 'content' => '

' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '

' . - '

' . sprintf(__('You can find additional plugins for your site by using the Plugin Browser/Installer functionality or by browsing the WordPress Plugin Directory directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your /wp-content/plugins directory. Once a plugin has been installed, you can activate it here.'), 'plugin-install.php', 'https://wordpress.org/plugins/') . '

' + '

' . sprintf( + /* translators: 1: Plugin Browser/Installer URL, 2: WordPress Plugin Directory URL 3: local plugin directory */ + __( 'You can find additional plugins for your site by using the Plugin Browser/Installer functionality or by browsing the WordPress Plugin Directory directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your %3$s directory. Once a plugin has been installed, you can activate it here.' ), + 'plugin-install.php', + 'https://wordpress.org/plugins/', + '/wp-content/plugins' + ) . '

' ) ); get_current_screen()->add_help_tab( array( 'id' => 'compatibility-problems', 'title' => __('Troubleshooting'), 'content' => '

' . __('Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin’s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.') . '

' . - '

' . sprintf( __('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.'), WP_PLUGIN_DIR) . '

' + '

' . sprintf( + /* translators: WP_PLUGIN_DIR constant value */ + __( 'If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.' ), + '' . WP_PLUGIN_DIR . '' + ) . '

' ) ); get_current_screen()->set_help_sidebar( @@ -394,9 +404,17 @@ $parent_file = 'plugins.php'; require_once(ABSPATH . 'wp-admin/admin-header.php'); $invalid = validate_active_plugins(); -if ( !empty($invalid) ) - foreach ( $invalid as $plugin_file => $error ) - echo '

' . sprintf(__('The plugin %s has been deactivated due to an error: %s'), esc_html($plugin_file), $error->get_error_message()) . '

'; +if ( ! empty( $invalid ) ) { + foreach ( $invalid as $plugin_file => $error ) { + echo '

'; + printf( + /* translators: 1: plugin file 2: error message */ + __( 'The plugin %1$s has been deactivated due to an error: %2$s' ), + '' . esc_html( $plugin_file ) . '', + $error->get_error_message() ); + echo '

'; + } +} ?>