Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for extract words from vars, example: #17

Closed
wants to merge 4 commits into from
Closed

Add support for extract words from vars, example: #17

wants to merge 4 commits into from

Conversation

EndyKaufman
Copy link

export class Form {
  static titles: any = {
    id: 'Id',//translate
    name: 'Name'//translate
  };
  id: number;
  name: string;
}

```
export class Form {
  static titles: any = {
    id: 'Id',//translate
    name: 'Name'//translate
  };
  id: number;
  name: string;
  title: string;
}
```
@biesbjerg
Copy link
Owner

Thank you for the PR and sorry for getting back to you so late.

I'm going to implement this feature in a future version, but in a different way, using a dummy/noop marker function:

import { __ } from '@biesbjerg/ngx-translate-extract';

__('String to be extracted with {{value}}', { value: 'dynamic value' });

Or aliased

import { __ as markerFn } from '@biesbjerg/ngx-translate-extract';

markerFn('String to be extracted with {{value}}', { value: 'dynamic value' });

And using an argument when extracting --marker-function markerFn (defaults to __) for example.

Something along those lines :-)

@biesbjerg biesbjerg closed this Mar 16, 2017
bastianjoel pushed a commit to bastianjoel/ngx-translate-extract that referenced this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants