mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-08 19:18:02 +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) {
|
switch (type) {
|
||||||
case CipherType.Login:
|
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:
|
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:
|
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:
|
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:
|
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 });
|
params$.next({ cipherId: mockCipher.id });
|
||||||
flush(); // Resolve all promises
|
flush(); // Resolve all promises
|
||||||
|
|
||||||
expect(component.headerText).toEqual("viewItemHeader typelogin");
|
expect(component.headerText).toEqual("viewItemHeader typeLogin");
|
||||||
|
|
||||||
// Set header text for a card
|
// Set header text for a card
|
||||||
mockCipher.type = CipherType.Card;
|
mockCipher.type = CipherType.Card;
|
||||||
params$.next({ cipherId: mockCipher.id });
|
params$.next({ cipherId: mockCipher.id });
|
||||||
flush(); // Resolve all promises
|
flush(); // Resolve all promises
|
||||||
|
|
||||||
expect(component.headerText).toEqual("viewItemHeader typecard");
|
expect(component.headerText).toEqual("viewItemHeader typeCard");
|
||||||
|
|
||||||
// Set header text for an identity
|
// Set header text for an identity
|
||||||
mockCipher.type = CipherType.Identity;
|
mockCipher.type = CipherType.Identity;
|
||||||
params$.next({ cipherId: mockCipher.id });
|
params$.next({ cipherId: mockCipher.id });
|
||||||
flush(); // Resolve all promises
|
flush(); // Resolve all promises
|
||||||
|
|
||||||
expect(component.headerText).toEqual("viewItemHeader typeidentity");
|
expect(component.headerText).toEqual("viewItemHeader typeIdentity");
|
||||||
|
|
||||||
// Set header text for a secure note
|
// Set header text for a secure note
|
||||||
mockCipher.type = CipherType.SecureNote;
|
mockCipher.type = CipherType.SecureNote;
|
||||||
|
@ -146,18 +146,15 @@ export class ViewV2Component {
|
|||||||
setHeader(type: CipherType) {
|
setHeader(type: CipherType) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CipherType.Login:
|
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:
|
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:
|
case CipherType.Identity:
|
||||||
return this.i18nService.t(
|
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeIdentity"));
|
||||||
"viewItemHeader",
|
|
||||||
this.i18nService.t("typeIdentity").toLowerCase(),
|
|
||||||
);
|
|
||||||
case CipherType.SecureNote:
|
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:
|
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) {
|
switch (type) {
|
||||||
case CipherType.Login:
|
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;
|
break;
|
||||||
case CipherType.Card:
|
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;
|
break;
|
||||||
case CipherType.Identity:
|
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;
|
break;
|
||||||
case CipherType.SecureNote:
|
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;
|
break;
|
||||||
case CipherType.SshKey:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user