rename extract to marker
This commit is contained in:
parent
3dd89304c6
commit
a02c29f0e2
@ -5,21 +5,21 @@ Install marker function:
|
||||
`npm install @biesbjerg/ngx-translate-extract-marker`
|
||||
|
||||
```ts
|
||||
import { extract } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
extract('Extract me');
|
||||
marker('Extract me');
|
||||
```
|
||||
|
||||
Add the `marker` argument when running the extract script:
|
||||
|
||||
`ngx-translate-extract ... -m extract`
|
||||
`ngx-translate-extract ... --marker marker`
|
||||
|
||||
You can alias the marker function if needed:
|
||||
|
||||
```ts
|
||||
import { extract as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
_('Extract me');
|
||||
```
|
||||
|
||||
`ngx-translate-extract ... -m _`
|
||||
`ngx-translate-extract ... --marker _`
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@biesbjerg/ngx-translate-extract-marker",
|
||||
"description": "Function to manually mark strings to be extracted using ngx-translate-extract",
|
||||
"version": "0.0.2",
|
||||
"version": "1.0.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/biesbjerg/ngx-translate-extract-marker.git"
|
||||
@ -15,6 +15,7 @@
|
||||
"keywords": [
|
||||
"angular",
|
||||
"ngx-translate",
|
||||
"ngx-translate-extract"
|
||||
"ngx-translate-extract",
|
||||
"i18n"
|
||||
]
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
export function extract<T extends string | string[]>(key: T): T {
|
||||
export function marker<T extends string | string[]>(key: T): T {
|
||||
return key;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user