Handle PHP files with wp-textdomain, JS files with sed.
This commit is contained in:
parent
05213db8e9
commit
a48b2b53c0
|
@ -26,8 +26,15 @@ composer dump-autoload
|
|||
output 2 "Done"
|
||||
|
||||
# Convert textdomains
|
||||
output 3 "Updating package textdomains..."
|
||||
output 3 "Updating package PHP textdomains..."
|
||||
|
||||
# Replace text domains within packages with woocommerce
|
||||
npm run packages:fix:textdomain
|
||||
output 2 "Done!"
|
||||
|
||||
output 3 "Updating package JS textdomains..."
|
||||
find ./packages/woocommerce-blocks -iname '*.js' -exec sed -i.bak -e "s/'woo-gutenberg-products-block'/'woocommerce'/g" -e "s/\"woo-gutenberg-products-block\"/'woocommerce'/g" {} \;
|
||||
|
||||
# Cleanup backup files
|
||||
find ./packages -name "*.bak" -type f -delete
|
||||
output 2 "Done!"
|
||||
|
|
Loading…
Reference in New Issue