You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error is displayed when executing the i18n:extract command:
An error occurred: SyntaxError: Expected double-quoted property name in JSON at position 959.
I have been checking different files until I found the cause and it is the following class:
import { MatPaginatorIntl } from '@angular/material/paginator';
export class PaginatorIntl implements MatPaginatorIntl {
}
If I import the class "MatPaginatorIntl" and implement it as in the example above, the error is displayed. If I remove the import or do not implement it the error disappears. I don't know why this is happening, maybe the JSON compiler is misinterpreting the file or I don't know what could be going on.
To reproduce the error just run the following command on the above class: ngx-translate-extract --input ./paginator-intl.ts --output ./src/assets/i18n/error_reproduce.json --clean --format json
@pmpak thanks for your response. It works with version 8.2.1, but why doesn't it work on the latest version 8.3.0? In the readme it clearly says that we need v8x for Angular 13 to 16, that's why I chose the latest v8.
Hi @pmpak, I guess there was a regression introduced somewhere between 8.2.1 -> 8.3.0? If 8.2.1 is working for you, I'd advise to just stick with that.
The following error is displayed when executing the i18n:extract command:
I have been checking different files until I found the cause and it is the following class:
If I import the class "MatPaginatorIntl" and implement it as in the example above, the error is displayed. If I remove the import or do not implement it the error disappears. I don't know why this is happening, maybe the JSON compiler is misinterpreting the file or I don't know what could be going on.
To reproduce the error just run the following command on the above class:
ngx-translate-extract --input ./paginator-intl.ts --output ./src/assets/i18n/error_reproduce.json --clean --format json
Angular version: 16
ngx-translate version-extract: 8.3.0
The text was updated successfully, but these errors were encountered: