From 8f305ea9482349230e3dadee1ade8dcf98070f6f Mon Sep 17 00:00:00 2001 From: Deepak Kumar Date: Wed, 2 Sep 2026 17:05:44 +0530 Subject: [PATCH] Administration: Correct the message shown when build files are unavailable --- src/wp-admin/font-library.php | 8 ++++++-- src/wp-admin/options-connectors.php | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/font-library.php b/src/wp-admin/font-library.php index abc2ea4f4da70..1dc345a96d2e0 100644 --- a/src/wp-admin/font-library.php +++ b/src/wp-admin/font-library.php @@ -18,11 +18,15 @@ ); } -// Check if Gutenberg build files are available +// Check if the build files are available. if ( ! function_exists( 'wp_font_library_wp_admin_render_page' ) ) { wp_die( '

' . __( 'Font Library is not available.' ) . '

' . - '

' . __( 'The Font Library requires Gutenberg build files. Please run npm install to build the necessary files.' ) . '

', + '

' . sprintf( + /* translators: %s: npm run build */ + __( 'The Font Library requires build files. Please run %s to build the necessary files.' ), + 'npm run build' + ) . '

', 503 ); } diff --git a/src/wp-admin/options-connectors.php b/src/wp-admin/options-connectors.php index c67d857b2b60d..d3ad0e02211de 100644 --- a/src/wp-admin/options-connectors.php +++ b/src/wp-admin/options-connectors.php @@ -21,7 +21,11 @@ if ( ! class_exists( '\WordPress\AiClient\AiClient' ) || ! function_exists( 'wp_options_connectors_wp_admin_render_page' ) ) { wp_die( '

' . __( 'Connectors are not available.' ) . '

' . - '

' . __( 'The Connectors page requires build files. Please run npm install to build the necessary files.' ) . '

', + '

' . sprintf( + /* translators: %s: npm run build */ + __( 'The Connectors page requires build files. Please run %s to build the necessary files.' ), + 'npm run build' + ) . '

', 503 ); }