Skip to content

Commit

Permalink
fix(theme:i18n): correct params type of i18e pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Nov 28, 2023
1 parent 49a84a1 commit e431c0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/theme/src/services/i18n/i18n.pipe.ts
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);
}
}

0 comments on commit e431c0f

Please sign in to comment.