Skip to content

Commit

Permalink
Load translations for scripts in Gutenberg editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
petitphp committed Feb 18, 2022
1 parent bf4e27f commit 0cf6f89
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ui/asset-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public function register_scripts() {
\DUPLICATE_POST_CURRENT_VERSION,
true
);
if ( function_exists( '\\wp_set_script_translations' ) ) {
\wp_set_script_translations( 'duplicate_post_edit_script', 'duplicate-post' );
}

\wp_register_script(
'duplicate_post_strings',
Expand All @@ -60,6 +63,9 @@ public function register_scripts() {
\DUPLICATE_POST_CURRENT_VERSION,
true
);
if ( function_exists( '\\wp_set_script_translations' ) ) {
\wp_set_script_translations( 'duplicate_post_strings', 'duplicate-post' );
}

\wp_register_script(
'duplicate_post_quick_edit_script',
Expand Down

0 comments on commit 0cf6f89

Please sign in to comment.