biesbjerg / ngx-translate-extract

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

Translate service inside array #200

Open webberig opened 4 years ago

webberig commented 4 years ago

Consider this example somewhere in a .ts file:

return [this.translator.instant("label"), value].join(": ");

When I run the extract, an additional translation key : is added. This works fine:

const label = this.translator.instant("label");
return [label, value].join(": ");
monkeycatdog commented 3 years ago

i have the similar issue, but i create function with translate service argument

export const fn = (translate: TranslateService) => ({label: translate.get('Label')})

that example don't work