cedaro / grunt-wp-i18n

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

Disabling potComments #62

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello,

Trying to disable/remove the copyright notice at the beginning of the .pot file, can someone tell if there's a better alternative to the following?

makepot: {
    target: {
        options: {
            potComments: ' '
        }
    }
}

Note the needed space between ' '.

I've tried setting it to ''. And false, which displays the following error:

Fatal error: o.potComments.replace is not a function

bradyvercher commented 8 years ago

You should be able to do that using the processPot callback. I haven't tested, but something like this might work:

makepot: {
    target: {
        options: {
            processPot: function( pot ) {
                pot.translations[''][''].comments.translator = '';
                return pot;
            }
        }
    }
}
ghost commented 8 years ago

I don't know why I didn't think of this. Thanks!