ngx-translate / i18n-polyfill

A speculative polyfill to support i18n code translations in Angular
MIT License
139 stars 30 forks source link

Support dynamic value property in the i18n service . Exporting translations breaks with error #57

Open nishantkCB opened 5 years ago

nishantkCB commented 5 years ago

Support for dynamic value in the i18n service.

this.invariantText ="Invarient text value " I18nDef: { value: this.invariantText; id?: TRNALATION_DEFINITION_KEY; meaning?: Translation; description?: Translation description; } the invarient text is comming from a 3rd party package and we have all the translations in place , we want to exclude this from export, but where as it throws error and stops exporting other translations.

when exporting using export tool we get below error .

Running the @ngx-translate/i18n-polyfill extract... Error: An I18nDef requires a value property on 'ObjectLiteralExpression' for [object Object] at ServiceParser._getCallArgStrings (D:\Dev\cbes-candidate-portal\node_modules\@ngx-translate\i18n-polyfill\extractor\src\abstract-ast-parser.js:29:27)

dsnoeck commented 5 years ago

Hi, Do you still have your issue ? Can you provide more informations or even better a reproductible application ?