Closed pixeline closed 8 years ago
What version of grunt-wp-i18n are you using?
Package.json says: "grunt-wp-i18n": "^0.5.4"
npm list --depth=0
prints grunt-wp-i18n@0.5.4
You've got mainFile
commented out, so this package tries to guess which is the main plugin file. Your main file .php filename should match your plugin slug i.e. `wp-content
/plugin/my-foobar-plugin/my-foobar-plugin.php
. If it's not, either rename the file, or populate mainFile
.
Thank you very much Gary. In the case of a WP Theme, what is the "main" file: style.css, functions.php, ... ?
It's style.css, but in this case the problem is now obvious - you've got type
set to wp-plugin
. Update that to wp-theme
(keep mainFile
commented out if you want), and it should work.
I've made the same mistake in the past.
Reference: https://github.com/cedaro/grunt-wp-i18n/blob/develop/tasks/lib/wordpress.js#L46-L63
Oh my gosh _ I can't believe I overlooked that. Thank you and awefully sorry for wasting your time. It now works perfectly.
Hello, While working on a WP Theme, I keep getting this error message:
Warning: Cannot read property 'split' of undefined
. I can't seem to make sense of it. Can you help ?Here is the dump
Here is the task config :