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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user