angularjs - Angular-gettext extract annotations from javascript files -


with angular-gettext extract annotated strings html specified in gruntfile.js:

grunt.initconfig({   nggettext_extract: {     pot: {       files: {         'po/template.pot': ['src/views/*.html']       }     },   }, }) 

is possible extract strings javascript files too?

i have case i'm generating strings angularjs controller:

<textarea ng-model="generatedcsv"></textarea> 

the header row of csv is:

"full name", "email" 

which needs translating other languages.

is there nice way angular-gettext?

edit: future readers: read op's comment on this, too, contains helpful information.

according site (i've played angular-gettext, haven't used feature):

http://angular-gettext.rocketeer.be/dev-guide/annotate-js/

if have text should translated in javascript code, wrap call function named gettext. module provides injectable function so:

angular.module("myapp").controller("hellocontroller", function (gettext) {     var mystring = gettext("hello"); }); 

the hello string will added .pot file using code above.

have tried that?


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -