Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implemented translation with Interpolation.
Co-authored-by: Felix Arntz <flixos90@gmail.com>
  • Loading branch information
narenin and felixarntz authored Sep 25, 2024
commit 9298221f0923bbb86f8039e277cea96e4ab638de
9 changes: 8 additions & 1 deletion plugins/performance-lab/includes/admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ function perflab_query_plugin_info( string $plugin_slug ) {
$response = wp_remote_get( 'https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[author]=wordpressdotorg&request[tag]=performance&request[per_page]=100' );

if ( is_wp_error( $response ) ) {
return new WP_Error( 'api_error', __( 'Failed to retrieve plugins data from WordPress.org API: ' . $request->get_error_message(), 'performance-lab' ) );
return new WP_Error(
'api_error',
sprintf(
/* translators: %s: API error message */
__( 'Failed to retrieve plugins data from WordPress.org API: %s', 'performance-lab' ),
$request->get_error_message()
)
);
}

$body = wp_remote_retrieve_body( $response );
Expand Down