vendure-ecommerce / ngx-translate-extract

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

fix: extract translations when service injected using inject function #22

Closed jpvanhal closed 1 year ago

jpvanhal commented 1 year ago

If TranslateService was injected using the inject function without an explicit type annotation for the property, the translations were not getting properly extracted. For example:

export class MyComponent {
    private translateService = inject(TranslateService);

    public test() {
        this.translateService.instant('Hello World');
    }
}
michaelbromley commented 1 year ago

Thank you! Good fix to keep this lib up to date with the latest Angular developments 👍

Just published v8.2.3 with this fix.