mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #3118 from woocommerce/PCP-4038-check-the-i-18-n-translations-in-react-app
Check the i18n translations in React app (4038)
This commit is contained in:
commit
aefda8b112
1 changed files with 15 additions and 4 deletions
|
@ -108,7 +108,11 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
)
|
||||
);
|
||||
|
||||
wp_enqueue_script( 'ppcp-switch-settings-ui' );
|
||||
wp_enqueue_script( 'ppcp-switch-settings-ui', '', array( 'wp-i18n' ), $script_asset_file['version'] );
|
||||
wp_set_script_translations(
|
||||
'ppcp-switch-settings-ui',
|
||||
'woocommerce-paypal-payments',
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -161,7 +165,11 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
true
|
||||
);
|
||||
|
||||
wp_enqueue_script( 'ppcp-admin-settings' );
|
||||
wp_enqueue_script( 'ppcp-admin-settings', '', array( 'wp-i18n' ), $script_asset_file['version'] );
|
||||
wp_set_script_translations(
|
||||
'ppcp-admin-settings',
|
||||
'woocommerce-paypal-payments',
|
||||
);
|
||||
|
||||
/**
|
||||
* Require resolves.
|
||||
|
@ -200,11 +208,14 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
wp_enqueue_script(
|
||||
'ppcp-paylater-configurator-lib',
|
||||
'https://www.paypalobjects.com/merchant-library/merchant-configurator.js',
|
||||
array(),
|
||||
array( 'wp-i18n' ),
|
||||
$script_asset_file['version'],
|
||||
true
|
||||
);
|
||||
|
||||
wp_set_script_translations(
|
||||
'ppcp-paylater-configurator-lib',
|
||||
'woocommerce-paypal-payments',
|
||||
);
|
||||
$script_data['PcpPayLaterConfigurator'] = array(
|
||||
'config' => array(),
|
||||
'merchantClientId' => $settings->get( 'client_id' ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue