cedaro / grunt-wp-i18n

Internationalize WordPress themes and plugins with Grunt.
MIT License
160 stars 25 forks source link

How can I use addtextdomain #31

Closed shivapoudel closed 10 years ago

shivapoudel commented 10 years ago

@bradyvercher I have to use grunt-contrib-copy module too. I have to copy all the files from the root directory excluding some text, markdown and documentation files. After deployment tasks deploy directory is created where my wp-theme resides.

The thought is: I want to create a wp-theme in root directory with axisthemes and there is my own framework's textdomain too called axisframework, and after deployment necessary files from the theme and framework is copied to deploy directory. What I want is how can I run addtextdomain to replace all the textdomain matching axisthemes and axisframework only in the deploy directory (i.e not in root where Gruntfile.js) is present. Can we use cwd or not. It will be better if addtextdomain has support for cwd. Please so me an example to demonstrate how we can through snippet.

bradyvercher commented 10 years ago

Hey @shivapoudel, you should be able to use the regular Grunt file formats with the addtextdomain task, which should include using the cwd option. Each file is passed to the PHP addtextdomain task individually. Let me know if you run into any issues, though.