1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

PM-9603 - AnonLayout Dynamic Content Support - Add ability to avoid translating subtitle as we have designs where a user's email needs to go in the subtitle slot. (#10459)

This commit is contained in:
Jared Snider
2024-08-09 10:09:40 -04:00
committed by GitHub
parent cbe7ae68cc
commit 46ecde5d63
3 changed files with 28 additions and 4 deletions

View File

@@ -149,7 +149,15 @@ export class ExtensionAnonLayoutWrapperComponent implements OnInit, OnDestroy {
}
if (data.pageSubtitle) {
this.pageSubtitle = this.i18nService.t(data.pageSubtitle);
// If you pass just a string, we translate it by default
if (typeof data.pageSubtitle === "string") {
this.pageSubtitle = this.i18nService.t(data.pageSubtitle);
} else {
// if you pass an object, you can specify if you want to translate it or not
this.pageSubtitle = data.pageSubtitle.translate
? this.i18nService.t(data.pageSubtitle.subtitle)
: data.pageSubtitle.subtitle;
}
}
if (data.pageIcon) {