biesbjerg / ngx-translate-extract

Extract translatable (using ngx-translate) strings and save as a JSON or Gettext pot file
MIT License
524 stars 196 forks source link

Find pipe uses in inputs to structural directives #242

Closed P4 closed 1 year ago

P4 commented 3 years ago

After finally upgrading from 3.0.5 to a recent version we've noticed the pipe parser no longer detects usages like this:

<ng-container *ngTemplateOutlet="section; context: {
  title: 'example.translation.key' | translate
}"></ng-container>

Turns out it's because inputs to structural directives were not being searched at all.

This PR adds handling of templateAttrs on Template nodes that works identically to inputs.

ismailcherri commented 2 years ago

@biesbjerg Hi, are you free to review this? We are also facing the same problem. Thanks in advance.

P4 commented 1 year ago

@ismailcherri I've re-made the pull request under a different fork mentioned in https://github.com/biesbjerg/ngx-translate-extract/issues/246#issuecomment-1353101571