grunt.loadNpmTasks('grunt-angular-gettext');
grunt.initConfig({
nggettext_extract:{
pot:{
files:{
'po/template.pot':['**/*.html']
}
}
},
nggettext_compile: {
all:{
files:{
'translations.js':['po/*.po']
}
}
}
});
controller
app.run(['gettextCatalog',function(gettextCatalog){
gettextCatalog.currentLanguage='de';
gettextCatalog.debug='true';
}])
html
<div class="row margin-bottom">
<div ng-controller="DefCtrl">
<p translate> Welcome!!!!</p>
<p translate> Testing globalization and localization</p>
</div>
</div>
I am running these commands:
grunt nggettext_extract
grunt nggettext_compile
Both run successfully but translations.js does not contain any string from .pot file
In case anyone is still looking for the documentation you have to use waybackwhen. https://web.archive.org/ and then paste the link.