-
The rank-math-wizard script is missing proper internationalization support due to a missing wp_set_script_translation() call after script enqueuing.
Issue Description
The wizard.js script is enqueued without setting up script translations, which prevents the script from accessing translated strings in non-English WordPress installations.Current Code Location
The issue is located where the wizard script is enqueued:wp_enqueue_script( 'rank-math-wizard', rank_math()->plugin_url() . 'assets/admin/js/wizard.js', [ 'media-editor', 'select2-rm', 'lodash', 'rank-math-common', 'rank-math-components' ], rank_math()->version, true );
Expected Fix
Add the following line immediately after the wp_enqueue_script() call:wp_set_script_translation( 'rank-math-wizard', 'rank-math' );
Complete Fixed Codewp_enqueue_script( 'rank-math-wizard', rank_math()->plugin_url() . 'assets/admin/js/wizard.js', [ 'media-editor', 'select2-rm', 'lodash', 'rank-math-common', 'rank-math-components' ], rank_math()->version, true ); wp_set_script_translation( 'rank-math-wizard', 'rank-math' );
Impact
Non-English users see untranslated strings in the wizard interface
Breaks the internationalization experience for multilingual sites
Inconsistent with WordPress best practices for script localization
The ticket ‘Missing Script Translation for Wizard Script’ is closed to new replies.