diff --git a/README.md b/README.md index 42f876b..5165c95 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,8 @@ The extracted keys for the code above will be: ``` *Notes:* -1. When using a Typescript file, you must have an `import { } from '@jsverse/transloco'` statement in it. +1. When using a Typescript file, you must have `@jsverse/transloco` present somewhere in the file, if it's an import or +simply adding a comment `// @jsverse/transloco`. 2. When using comments in your HTML files, they *must* contain only the markers without additional text. Here's an example for invalid comment: `` diff --git a/__tests__/buildTranslationFiles/comments/src/1.ts b/__tests__/buildTranslationFiles/comments/src/1.ts index d075796..56c7da4 100644 --- a/__tests__/buildTranslationFiles/comments/src/1.ts +++ b/__tests__/buildTranslationFiles/comments/src/1.ts @@ -1,4 +1,4 @@ -import { translate } from '@jsverse/transloco'; +// @jsverse/transloco' class a { /** diff --git a/__tests__/buildTranslationFiles/comments/src/2.ts b/__tests__/buildTranslationFiles/comments/src/2.ts index e7915fe..39be542 100644 --- a/__tests__/buildTranslationFiles/comments/src/2.ts +++ b/__tests__/buildTranslationFiles/comments/src/2.ts @@ -1,7 +1,7 @@ /** * some commment */ - +// @jsverse/transloco import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -15,7 +15,6 @@ import { ViewEncapsulation, } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; -import { translate } from '@jsverse/transloco'; export type ExtendedGridOptions = { onRowDataUpdated: (event) => void;