Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

i18n: load translation files for JS#36

Open
atachibana wants to merge 1 commit into
WordPress:masterfrom
atachibana:master
Open

i18n: load translation files for JS#36
atachibana wants to merge 1 commit into
WordPress:masterfrom
atachibana:master

Conversation

@atachibana
Copy link
Copy Markdown

@atachibana atachibana commented Dec 30, 2019

Block menu texts are not translated as below image (French).

Though there are translation files of French and Japanese in mo and JSON format, almost all texts are not translated except "Presentation Cover Image" menu that was translated in PHP side (register.php). See bottom of the 1st image.

We need invoke wp_register_script() and wp_set_script_translations() to load translation file of JSON format for JavaScript sources. See 2nd image for applied result.

before fix:
slide-before-fix

after fix:
slide-after-fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant