Skip to content

Fix translation registration for admin interface - #304

Merged
mlwilkerson merged 6 commits into
mainfrom
fix-translations
Jul 28, 2026
Merged

Fix translation registration for admin interface#304
mlwilkerson merged 6 commits into
mainfrom
fix-translations

Conversation

@mlwilkerson

@mlwilkerson mlwilkerson commented Jul 28, 2026

Copy link
Copy Markdown
Member

This fixes the problem reported here.

the JavaScript translations on the admin settings page (admin.php?page=font-awesome) are not being applied, even when translation files are properly installed via wp language plugin install font-awesome ja. The page always displays in English regardless of the site locale.

The fix:

Ensure wp_set_script_translations( ‘font-awesome-official-admin’, ‘font-awesome’ ) is called immediately after wp_register_script() or wp_enqueue_script(), before the script is printed. Moving it to the admin_enqueue_scripts hook alongside the script registration should resolve the issue.

Unrelated

There are some development environment tweaks that made my new dev environment work for making the fix.

@mlwilkerson
mlwilkerson merged commit 45e720a into main Jul 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant