mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-07 19:07:45 +01:00
[PM-16094] Remove lowercasing of vault page headers titles (#12438)
* Remove lowercasing of View page headers * Remove lowercasing of Add/edit page headers * Remove lowercasing of Web ViewAdd/edit page headers * Fix tests --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
parent
02f1ec6519
commit
a07a7e9817
@ -326,15 +326,15 @@ export class AddEditV2Component implements OnInit {
|
||||
|
||||
switch (type) {
|
||||
case CipherType.Login:
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeLogin").toLocaleLowerCase());
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeLogin"));
|
||||
case CipherType.Card:
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeCard").toLocaleLowerCase());
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeCard"));
|
||||
case CipherType.Identity:
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeIdentity").toLocaleLowerCase());
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeIdentity"));
|
||||
case CipherType.SecureNote:
|
||||
return this.i18nService.t(partOne, this.i18nService.t("note").toLocaleLowerCase());
|
||||
return this.i18nService.t(partOne, this.i18nService.t("note"));
|
||||
case CipherType.SshKey:
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeSshKey").toLocaleLowerCase());
|
||||
return this.i18nService.t(partOne, this.i18nService.t("typeSshKey"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,21 +137,21 @@ describe("ViewV2Component", () => {
|
||||
params$.next({ cipherId: mockCipher.id });
|
||||
flush(); // Resolve all promises
|
||||
|
||||
expect(component.headerText).toEqual("viewItemHeader typelogin");
|
||||
expect(component.headerText).toEqual("viewItemHeader typeLogin");
|
||||
|
||||
// Set header text for a card
|
||||
mockCipher.type = CipherType.Card;
|
||||
params$.next({ cipherId: mockCipher.id });
|
||||
flush(); // Resolve all promises
|
||||
|
||||
expect(component.headerText).toEqual("viewItemHeader typecard");
|
||||
expect(component.headerText).toEqual("viewItemHeader typeCard");
|
||||
|
||||
// Set header text for an identity
|
||||
mockCipher.type = CipherType.Identity;
|
||||
params$.next({ cipherId: mockCipher.id });
|
||||
flush(); // Resolve all promises
|
||||
|
||||
expect(component.headerText).toEqual("viewItemHeader typeidentity");
|
||||
expect(component.headerText).toEqual("viewItemHeader typeIdentity");
|
||||
|
||||
// Set header text for a secure note
|
||||
mockCipher.type = CipherType.SecureNote;
|
||||
|
@ -146,18 +146,15 @@ export class ViewV2Component {
|
||||
setHeader(type: CipherType) {
|
||||
switch (type) {
|
||||
case CipherType.Login:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeLogin").toLowerCase());
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeLogin"));
|
||||
case CipherType.Card:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeCard").toLowerCase());
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeCard"));
|
||||
case CipherType.Identity:
|
||||
return this.i18nService.t(
|
||||
"viewItemHeader",
|
||||
this.i18nService.t("typeIdentity").toLowerCase(),
|
||||
);
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeIdentity"));
|
||||
case CipherType.SecureNote:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("note").toLowerCase());
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("note"));
|
||||
case CipherType.SshKey:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeSshkey").toLowerCase());
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeSshkey"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -419,19 +419,19 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
|
||||
|
||||
switch (type) {
|
||||
case CipherType.Login:
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeLogin").toLowerCase());
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeLogin"));
|
||||
break;
|
||||
case CipherType.Card:
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeCard").toLowerCase());
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeCard"));
|
||||
break;
|
||||
case CipherType.Identity:
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeIdentity").toLowerCase());
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeIdentity"));
|
||||
break;
|
||||
case CipherType.SecureNote:
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("note").toLowerCase());
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("note"));
|
||||
break;
|
||||
case CipherType.SshKey:
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeSshKey").toLowerCase());
|
||||
this.title = this.i18nService.t(partOne, this.i18nService.t("typeSshKey"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user