Skip to content

Commit

Permalink
Build POT files for plugins and themes from project root (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clorith authored Nov 15, 2024
1 parent 25004ef commit 459742a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"start": "turbo run start",
"clean": "turbo run clean && rm -rf node_modules",
"format": "prettier --write .",
"i18n:make-pot": "turbo run i18n:make-pot",
"lint": "npm-run-all --parallel lint:js lint:css lint:format",
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/block-theme/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scripts": {
"make-pot": [
"npm run build",
"wp i18n make-pot . languages/block-theme.pot --domain=block-theme --exclude=node_modules,src,vendor,theme.json,t2.json"
"wp i18n make-pot . --exclude=.turbo,node_modules,src,vendor,theme.json,t2.json"
],
"make-json": [
"npm run build",
Expand Down
3 changes: 2 additions & 1 deletion packages/themes/block-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"build": "wp-scripts build --webpack-copy-php",
"start": "wp-scripts start --webpack-copy-php",
"clean": "rm -rf node_modules build dist .turbo"
"clean": "rm -rf node_modules build dist .turbo",
"i18n:make-pot": "composer run make-pot"
}
}
1 change: 1 addition & 0 deletions packages/themes/block-theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* License: GNU General Public License v2 or later
* License URI: LICENSE
* Text Domain: block-theme
* Domain Path: languages
* Tags: editor-style, featured-images, full-site-editing, block-patterns
*
* This theme, like WordPress, is licensed under the GPL.
Expand Down
4 changes: 4 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
},
"clean": {
"cache": false
},
"i18n:make-pot": {
"dependsOn": ["^i18n:make-pot"],
"cache": false
}
}
}

0 comments on commit 459742a

Please sign in to comment.