-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(theme:i18n): correct params type of i18e pipe
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { Inject, Pipe, PipeTransform } from '@angular/core'; | ||
import { Pipe, PipeTransform, inject } from '@angular/core'; | ||
|
||
import { AlainI18NService, ALAIN_I18N_TOKEN } from './i18n'; | ||
import { ALAIN_I18N_TOKEN } from './i18n'; | ||
|
||
@Pipe({ name: 'i18n', standalone: true }) | ||
export class I18nPipe implements PipeTransform { | ||
constructor(@Inject(ALAIN_I18N_TOKEN) private i18n: AlainI18NService) {} | ||
private readonly i18n = inject(ALAIN_I18N_TOKEN); | ||
|
||
transform(key: string, params?: Record<string, unknown>): string { | ||
transform(key: string, params?: unknown): string { | ||
return this.i18n.fanyi(key, params); | ||
} | ||
} |