smhg / gettext-swig

Extract translatable strings from Swig template strings.
MIT License
1 stars 2 forks source link

[NFR] Support for comment extraction #12

Open scrnjakovic opened 5 years ago

scrnjakovic commented 5 years ago

First of all, thanks for the job you've done so far.

It would be awesome if parser could extract comments as well, as in:

{# TRANSLATORS Here is some info for translators #}

and then just pass -c=TRANSLATORS to the command.

I'd contribute a PR myself instead of writing NFR, but I know jack shit about it.

P.S. I actually use Volt as my template engine, but this extractor beats the hell out of xgettext-volt as it supports contexts unlike latter.

smhg commented 5 years ago

Thanks for this request @scrnjakovic. I have to be honest: I've never used Swig/Volt myself, so this is not very high on my (quite full) todo-list.

I'd be happy to review a PR should you be able to give it a try. Otherwise, maybe you can forward it to someone who could?