Skip to content

Commit

Permalink
Merge pull request #719 from GatherPress/adjust-translation
Browse files Browse the repository at this point in the history
Added wp_set_script_translations back without third argument (may sti…
  • Loading branch information
mauteri authored Jul 1, 2024
2 parents 307ac29 + d2ae392 commit 39c57b8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions includes/core/classes/class-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ public function admin_enqueue_scripts( string $hook ): void {
true
);

wp_set_script_translations( 'gatherpress-panels', 'gatherpress' );

$asset = $this->get_asset_data( 'modals' );
wp_enqueue_script(
'gatherpress-modals',
Expand All @@ -164,6 +166,8 @@ public function admin_enqueue_scripts( string $hook ): void {
$asset['version'],
true
);

wp_set_script_translations( 'gatherpress-modals', 'gatherpress' );
}

$settings = Settings::get_instance();
Expand Down Expand Up @@ -196,6 +200,8 @@ function ( $key ) {
$asset['version'],
true
);

wp_set_script_translations( 'gatherpress-settings', 'gatherpress' );
}

if ( 'profile.php' === $hook ) {
Expand All @@ -208,6 +214,8 @@ function ( $key ) {
$asset['version'],
true
);

wp_set_script_translations( 'gatherpress-profile', 'gatherpress' );
}
}

Expand All @@ -231,6 +239,8 @@ public function editor_enqueue_scripts(): void {
$asset['version'],
true
);

wp_set_script_translations( 'gatherpress-editor', 'gatherpress' );
}

/**
Expand Down

0 comments on commit 39c57b8

Please sign in to comment.