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

fix: extract translations when service injected using inject function #22

Conversation

jpvanhal
Copy link

If TranslateService was injected using the inject function without an explicit type annotation for the property, the translations were not getting properly extracted. For example:

export class MyComponent {
	private translateService = inject(TranslateService);

	public test() {
		this.translateService.instant('Hello World');
	}
}

If `TranslateService` was injected using the `inject` function without
an explicit type annotation for the property, the translations were not
getting properly extracted. For example:

```ts
export class MyComponent {
	private translateService = inject(TranslateService);

	public test() {
		this.translateService.instant('Hello World');
	}
}
```
@michaelbromley michaelbromley merged commit d5deebc into vendure-ecommerce:master Sep 27, 2023
1 check passed
@michaelbromley
Copy link
Member

michaelbromley commented Sep 27, 2023

Thank you! Good fix to keep this lib up to date with the latest Angular developments 👍

Just published v8.2.3 with this fix.

@jpvanhal jpvanhal deleted the fix-extract-inject-translate-service branch September 27, 2023 18:46
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