Skip to content

Commit

Permalink
docs: ✏️ clearify ts extraction instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharkazaz committed Jun 20, 2024
1 parent 06f8afc commit a75836b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
`<!-- For dropdown t(dynamic.1, dynamic.2) -->`
Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildTranslationFiles/comments/src/1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { translate } from '@jsverse/transloco';
// @jsverse/transloco'

class a {
/**
Expand Down
3 changes: 1 addition & 2 deletions __tests__/buildTranslationFiles/comments/src/2.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* some commment
*/

// @jsverse/transloco
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Expand All @@ -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;
Expand Down

0 comments on commit a75836b

Please sign in to comment.