npm install jsxgettext
Then run this command a few times:
node_modules/.bin/jsxgettext test.html -o messages.pot --join-existing -L Jinja
| node_modules/* |
| msgid "" | |
| msgstr "" | |
| "Project-Id-Version: PACKAGE VERSION\n" | |
| "Language-Team: LANGUAGE <[email protected]>\n" | |
| "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
| "Language: \n" | |
| "MIME-Version: 1.0\n" | |
| "Content-Transfer-Encoding: 8bit\n" | |
| "POT-Creation-Date: 2013-12-06 16:48+0000\n" | |
| "Content-Type: text/plain;\n" | |
| #: templates/foo.html:1 | |
| msgid "This is a <a href=\"#\">Link</a>" | |
| msgstr "" |
| #!/usr/bin/env sh | |
| npm install jsxgettext | |
| node_modules/.bin/jsxgettext test.html -o messages.pot --join-existing -L Jinja |
| <p>{{ gettext('This is a <a href="#">Link</a>') }}</p> |