1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

Add lang attr on desktop and browser (#14691)

This commit is contained in:
Justin Baur
2025-06-09 06:54:00 -04:00
committed by GitHub
parent 685f7a0fd8
commit b1f090e054
8 changed files with 102 additions and 9 deletions

View File

@@ -2,6 +2,7 @@
// @ts-strict-ignore
import {
Component,
DestroyRef,
NgZone,
OnDestroy,
OnInit,
@@ -25,6 +26,7 @@ import {
import { CollectionService } from "@bitwarden/admin-console/common";
import { DeviceTrustToastService } from "@bitwarden/angular/auth/services/device-trust-toast.service.abstraction";
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
import { DocumentLangSetter } from "@bitwarden/angular/platform/i18n";
import { ModalService } from "@bitwarden/angular/services/modal.service";
import { FingerprintDialogComponent, LoginApprovalComponent } from "@bitwarden/auth/angular";
import { DESKTOP_SSO_CALLBACK, LogoutReason } from "@bitwarden/auth/common";
@@ -163,8 +165,13 @@ export class AppComponent implements OnInit, OnDestroy {
private accountService: AccountService,
private organizationService: OrganizationService,
private deviceTrustToastService: DeviceTrustToastService,
private readonly destroyRef: DestroyRef,
private readonly documentLangSetter: DocumentLangSetter,
) {
this.deviceTrustToastService.setupListeners$.pipe(takeUntilDestroyed()).subscribe();
const langSubscription = this.documentLangSetter.start();
this.destroyRef.onDestroy(() => langSubscription.unsubscribe());
}
ngOnInit() {