stephenharris / grunt-pot

Scan files and creates a .pot file using xgettext
MIT License
53 stars 13 forks source link

Expose more xgettext options to the Grunt task #1

Closed robinnorth closed 10 years ago

robinnorth commented 10 years ago

By default, xgettext interprets input files as ASCII, so in order to use UTF-8 encoded input files, you need to be able to set the --from-code option (exposed as from_code). In some cases, it is also useful to be able to specify an input language (using language, passed through to --language) for xgettext.

Also added the option to specify whether to overwrite or append to an existing .pot file.

stephenharris commented 10 years ago

Great, thanks @robinnorth !

One question: What do you think of renaming the option 'join' to 'overwrite'? I know 'join' pertains to the command line option, but 'overwrite' seems like it would be more intuitive in a Gruntfile...

robinnorth commented 10 years ago

No problem, @stephenharris :-)

I agree with you about join vs overwrite -- I've renamed the option in my fork and updated the documentation to reflect it.

stephenharris commented 10 years ago

Just a heads up on this. I changed the option name from_code to encoding and reverted the version number back to 0.1.1. Everything else remained the same. Thanks for your help!

robinnorth commented 10 years ago

Cool, thanks for letting me know :-) Glad to be of help -- the updated plugin is proving very useful in automating the localisation of a Backbone app I am working on.

KingYes commented 10 years ago

Hey ! Maybe you can option for this lines (header):

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#