cedaro / grunt-wp-i18n

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

Reduce dependencies: include WP i18n tools #1

Closed tollmanz closed 10 years ago

tollmanz commented 10 years ago

Distributing a tool like this throughout a team becomes much easier if the only dependency is node and grunt. It think that the WP i18n tools should be wrapped into the npm package. The tools are not that heavy, so adding them wouldn't have much of an adverse impact.

bradyvercher commented 10 years ago

I really like this idea! This should just be a matter of including the WP i18n tools into the lib directory and changing the default path. The config options are still nice in case the version gets outdated or someone wants to use a customized version.

tollmanz commented 10 years ago

I'm 100% behind that. If you want/need to have the absolutely latest version, you can maintain that on your own and point to it.

bradyvercher commented 10 years ago

Actually, it looks like the tools would need to be forked with some minor updates. I'm assuming the new develop structure moved some dependencies into core in preparation for languages packs: https://core.trac.wordpress.org/browser/trunk/tools/i18n/extract.php#L2

And an amusing commit that ran into the same issue: https://github.com/johnpbloch/packages/commit/93ff2b92968fe0b296621d93ea982688c67c5402

tollmanz commented 10 years ago

Ah...I see. I think it still makes sense to include it. Dependency reduction is a major win.

bradyvercher commented 10 years ago

Totally agree. I tried to make all config optional with sensible defaults, so this will just make it that much easier.

bradyvercher commented 10 years ago

I forked the i18n tools, bundled them and updated the include paths so that's one less dependency.

tollmanz commented 10 years ago

Woot! This is huge. Awesome work!