rubenv / angular-gettext-tools

Tools for extracting/compiling angular-gettext strings.
http://angular-gettext.rocketeer.be/
MIT License
39 stars 129 forks source link

JavaScript - extraction from filters in strings #88

Closed knuhol closed 9 years ago

knuhol commented 9 years ago

Is it possible to have also extraction from filters which are in strings in JavaScript files? Angular-gettext supports it.

e.g.

app.config(function($stateProvider) {
  $stateProvider.state('welcome', {
     url : '/',
     templateUrl: 'index.html',
     ncyBreadcrumb : {
        label: '{{"Home"|translate}}'
     }
  });
});
gabegorelick commented 9 years ago

Why would you need this versus just calling gettextCatalog.getString('Home')?

On Friday, April 24, 2015, Akarienta notifications@github.com wrote:

Is it possible to have also extraction from filters which are in strings in JavaScript files? Angular-gettext supports it.

e.g.

app.config(function($stateProvider) { $stateProvider.state('welcome', { url : '/', templateUrl: 'index.html', ncyBreadcrumb : { label: '{{"Home"|translate}}' } }); });

— Reply to this email directly or view it on GitHub https://github.com/rubenv/angular-gettext-tools/issues/88.

knuhol commented 9 years ago

It is not possible in a config phase: https://github.com/rubenv/angular-gettext/issues/168

gabegorelick commented 9 years ago

I'd rather support using gettext as a provider than implement this. There's a PR for that out there already. I'll see if we can get it merged in.