cedaro / grunt-wp-i18n

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

Missing uppercase letter in pot.headers['x-poedit-keywordslist'] #14

Closed fxbenard closed 10 years ago

fxbenard commented 10 years ago

The processPot: function( pot, options ) {

        pot.headers['x-poedit-keywordslist'] = '

creates this in the file "X-Poedit-Keywordslist:

it should be "X-Poedit-KeywordsList: with a Uppercase L

The result for now the list isn't displaying in Poedit

bradyvercher commented 10 years ago

I looked for a standard, but couldn't find anything that dealt with header capitalization. In any case, this should be a pretty easy fix.

Taking it a bit further, it might be nice to implement an option that allows these to be inserted automatically to maintain consistency (one less thing to think about). Is there a canonical source for the list of keywords?

shivapoudel commented 10 years ago

Glad to know that @bradyvercher. I have spent 2 night for solving the issues and till trying. Let's see if I could.

shivapoudel commented 10 years ago

Hello @bradyvercher the problem is in the gettext-parser dependency. In its lib/shared.js there is a function called upperCaseWords and generateHeader look around it and send pull request to that depedency repo. Else tweaking through grunt-wp-i18n might be time consuming.

bradyvercher commented 10 years ago

Hi @shivapoudel, I did take a look at that yesterday, but these headers are arbitrarily capitalized and associated with a third-party tool, so without a standard, I'm not so sure they belong in the dependency.

Considering Poedit is popular among WordPress translators and there's already some other normalization stuff that needs to be taken care of, I think it's worth incorporating in this plugin.