Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix construction of translation strings in admin/plugins.php #925

Merged
merged 4 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 22 additions & 22 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# Documentation/Infrastructure
/admin @JustinyAhin @felixarntz
/tests/admin @JustinyAhin @felixarntz
/bin @JustinyAhin @felixarntz
/.github @JustinyAhin @felixarntz
/admin @mukeshpanchal27 @felixarntz
/tests/admin @mukeshpanchal27 @felixarntz
/bin @mukeshpanchal27 @felixarntz
/.github @mukeshpanchal27 @felixarntz

# Focus: Database
/modules/database @olliejones
/tests/modules/database @olliejones
/tests/testdata/modules/database @olliejones

# Focus: Images
/modules/images @adamsilverstein @getsource
/tests/modules/images @adamsilverstein @getsource
/tests/testdata/modules/images @adamsilverstein @getsource
/modules/images @adamsilverstein @getsource @joemcgill
/tests/modules/images @adamsilverstein @getsource @joemcgill
/tests/testdata/modules/images @adamsilverstein @getsource @joemcgill

# Focus: JS & CSS
/modules/js-and-css @aristath @sgomes
/tests/modules/js-and-css @aristath @sgomes
/tests/testdata/modules/js-and-css @aristath @sgomes
/modules/js-and-css @westonruter
/tests/modules/js-and-css @westonruter
/tests/testdata/modules/js-and-css @westonruter

# Focus: Measurement
/modules/measurement
/tests/modules/measurement
/tests/testdata/modules/measurement
/modules/measurement @joemcgill
/tests/modules/measurement @joemcgill
/tests/testdata/modules/measurement @joemcgill

# Focus: Object Cache
/modules/object-cache @tillkruss @spacedmonkey
/tests/modules/object-cache @tillkruss @spacedmonkey
/tests/testdata/modules/object-cache @tillkruss @spacedmonkey

# Module: WebP Uploads
/modules/images/webp-uploads @adamsilverstein @felixarntz @mitogh
/tests/modules/images/webp-uploads @adamsilverstein @felixarntz @mitogh
/tests/testdata/modules/images/webp-uploads @adamsilverstein @felixarntz @mitogh
/modules/images/webp-uploads @adamsilverstein @felixarntz
/tests/modules/images/webp-uploads @adamsilverstein @felixarntz
/tests/testdata/modules/images/webp-uploads @adamsilverstein @felixarntz

# Module: WebP Support Health Check
/modules/images/webp-support @adamsilverstein @kirtangajjar @mitogh
/tests/modules/images/webp-support @adamsilverstein @kirtangajjar @mitogh
/tests/testdata/modules/images/webp-support @adamsilverstein @kirtangajjar @mitogh
/modules/images/webp-support @adamsilverstein
/tests/modules/images/webp-support @adamsilverstein
/tests/testdata/modules/images/webp-support @adamsilverstein

# Module: Autoloaded Options Health Check
/modules/database/audit-autoloaded-options @manuelRod
/tests/modules/database/audit-autoloaded-options @manuelRod
/tests/testdata/modules/database/audit-autoloaded-options @manuelRod
/modules/database/audit-autoloaded-options @manuelRod @felixarntz
/tests/modules/database/audit-autoloaded-options @manuelRod @felixarntz
/tests/testdata/modules/database/audit-autoloaded-options @manuelRod @felixarntz

# Module: Enqueued Assets Health Check
/modules/js-and-css/audit-enqueued-assets @manuelRod
Expand Down
44 changes: 27 additions & 17 deletions admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,42 +288,52 @@ function perflab_render_plugin_card( array $plugin_data ) {
echo '<p>' . esc_html_e( 'This plugin does not work with your versions of WordPress and PHP.', 'default' ) . '</p>';
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
echo wp_kses_post(
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.', 'default' ),
esc_url( self_admin_url( 'update-core.php' ) ),
esc_url( wp_get_update_php_url() )
sprintf(
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.', 'default' ),
esc_url( self_admin_url( 'update-core.php' ) ),
esc_url( wp_get_update_php_url() )
)
);
wp_update_php_annotation( '<p><em>', '</em></p>' );
} elseif ( current_user_can( 'update_core' ) ) {
echo wp_kses_post(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( '<a href="%s">Please update WordPress</a>.', 'default' ),
esc_url( self_admin_url( 'update-core.php' ) )
sprintf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( '<a href="%s">Please update WordPress</a>.', 'default' ),
esc_url( self_admin_url( 'update-core.php' ) )
)
);
} elseif ( current_user_can( 'update_php' ) ) {
echo wp_kses_post(
/* translators: %s: URL to Update PHP page. */
' ' . __( '<a href="%s">Learn more about updating PHP</a>.', 'default' ),
esc_url( wp_get_update_php_url() )
sprintf(
/* translators: %s: URL to Update PHP page. */
' ' . __( '<a href="%s">Learn more about updating PHP</a>.', 'default' ),
esc_url( wp_get_update_php_url() )
)
);
wp_update_php_annotation( '<p><em>', '</em></p>' );
}
} elseif ( ! $compatible_wp ) {
esc_html_e( 'This plugin does not work with your version of WordPress.', 'default' );
if ( current_user_can( 'update_core' ) ) {
echo wp_kses_post(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( '<a href="%s">Please update WordPress</a>.', 'default' ),
esc_url( self_admin_url( 'update-core.php' ) )
sprintf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( '<a href="%s">Please update WordPress</a>.', 'default' ),
esc_url( self_admin_url( 'update-core.php' ) )
)
);
}
} elseif ( ! $compatible_php ) {
esc_html_e( 'This plugin does not work with your version of PHP.', 'default' );
if ( current_user_can( 'update_php' ) ) {
echo wp_kses_post(
/* translators: %s: URL to Update PHP page. */
' ' . __( '<a href="%s">Learn more about updating PHP</a>.', 'default' ),
esc_url( wp_get_update_php_url() )
sprintf(
/* translators: %s: URL to Update PHP page. */
' ' . __( '<a href="%s">Learn more about updating PHP</a>.', 'default' ),
esc_url( wp_get_update_php_url() )
)
);
wp_update_php_annotation( '<p><em>', '</em></p>' );
}
Expand Down Expand Up @@ -378,7 +388,7 @@ function perflab_render_plugin_card( array $plugin_data ) {
<div class="column-downloaded">
<?php
if ( $plugin_data['active_installs'] >= 1000000 ) {
$active_installs_millions = floor( $plugin_data['active_installs'] / 1000000 );
$active_installs_millions = (int) floor( $plugin_data['active_installs'] / 1000000 );
$active_installs_text = sprintf(
/* translators: %s: Number of millions. */
_nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations', 'default' ),
Expand Down