1
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

hmims
  • 539
  • 8
  • 28

2 Answers2

0

The .pot file is a template for translations and shouldn't contain the actual translations. A full guide for translating correctly can be found on the angular-gettext website: https://angular-gettext.rocketeer.be/dev-guide/translate/

Ruben Vermeersch
  • 1,933
  • 1
  • 18
  • 27
0

In case anyone is still looking for the documentation you have to use waybackwhen. https://web.archive.org/ and then paste the link.

Prozak
  • 303
  • 2
  • 7
  • 17