mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[SM-154] Add labelledby to dialogs (#3439)
This commit is contained in:
17
libs/components/src/shared/i18n.pipe.ts
Normal file
17
libs/components/src/shared/i18n.pipe.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Pipe, PipeTransform } from "@angular/core";
|
||||
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
|
||||
/**
|
||||
* Temporarily duplicate this pipe
|
||||
*/
|
||||
@Pipe({
|
||||
name: "i18n",
|
||||
})
|
||||
export class I18nPipe implements PipeTransform {
|
||||
constructor(private i18nService: I18nService) {}
|
||||
|
||||
transform(id: string, p1?: string, p2?: string, p3?: string): string {
|
||||
return this.i18nService.t(id, p1, p2, p3);
|
||||
}
|
||||
}
|
||||
1
libs/components/src/shared/index.ts
Normal file
1
libs/components/src/shared/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./shared.module";
|
||||
11
libs/components/src/shared/shared.module.ts
Normal file
11
libs/components/src/shared/shared.module.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { NgModule } from "@angular/core";
|
||||
|
||||
import { I18nPipe } from "./i18n.pipe";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
declarations: [I18nPipe],
|
||||
exports: [CommonModule, I18nPipe],
|
||||
})
|
||||
export class SharedModule {}
|
||||
Reference in New Issue
Block a user