Skip to content

Commit

Permalink
fix: correctly set the script translation text domain
Browse files Browse the repository at this point in the history
  • Loading branch information
matzeeable committed Jun 16, 2020
1 parent 86c3d66 commit cca32fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/webpack.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ function createDefaultSettings(
"process.env": definePlugin({
NODE_ENV: JSON.stringify(NODE_ENV),
env: JSON.stringify(NODE_ENV),
rootSlug: JSON.stringify(rootPkg.name),
slug: JSON.stringify(slug)
})
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ protected function enqueueComposer(
wp_enqueue_script($useHandle, $url, $deps, $cachebuster, $in_footer);
$this->setLazyScriptTranslations(
$useHandle,
$useHandle,
$rootSlug . '-' . $handle,
path_join($pluginPath, $packageDir . 'languages/frontend/json')
);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/PackageLocalization.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PackageLocalization {
* @param string $packageDir Absolute path to your package.
* @codeCoverageIgnore
*/
private function __construct($rootSlug, $packageDir) {
protected function __construct($rootSlug, $packageDir) {
$this->rootSlug = $rootSlug;
$this->packageDir = $packageDir;
}
Expand Down

0 comments on commit cca32fe

Please sign in to comment.