gruntjs - Nggettext globalization + grunt automization + jade templates -
i found this super informative , useful article globalization using angular's gettext directive , grunt. problem is, seems extract .html
files , can't running jade.
i using node.js
server, express.js
, convert .jade
files .html
files on fly, on each user request. way express , jade fit together, searching solution, extracts translations jade files.
for tried changing grunt task snippet to:
grunt.initconfig({ nggettext_extract: { pot: { files: { 'po/template.pot': ['**/*.jade'] } } } });
and adding translation directive other angular directives, e.g.:
h3(translate)
to add jade file support angular-gettext need modify extract.js in angular-gettext-tools project because scanning , extracting text. doesn't trivial change.
i suggest different approach. see if can generate html jade files part of build process , run angular-gettext tools against that. continue develop not need add jade support angular-gettext.
Comments
Post a Comment