Skip to content

Commit

Permalink
feat: add script translation support for all in CSS and Block Export/…
Browse files Browse the repository at this point in the history
…Import
  • Loading branch information
Soare-Robert-Daniel committed Dec 13, 2024
1 parent db13b9e commit 8c20aeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/class-blocks-animation.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public function enqueue_editor_assets() {
);

wp_script_add_data( 'otter-count', 'defer', true );
wp_set_script_translations( 'otter-count', 'blocks-animation' );

wp_enqueue_script(
'otter-typing',
Expand All @@ -114,6 +115,7 @@ public function enqueue_editor_assets() {
);

wp_script_add_data( 'otter-typing', 'defer', true );
wp_set_script_translations( 'otter-typing', 'blocks-animation' );
}

/**
Expand Down
1 change: 1 addition & 0 deletions inc/class-blocks-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function enqueue_editor_assets() {
$asset_file['version'],
true
);
wp_set_script_translations( 'otter-css', 'blocks-css' );

wp_localize_script(
'otter-css',
Expand Down

0 comments on commit 8c20aeb

Please sign in to comment.