1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-22 07:50:04 +02:00

[PM-13189] Send copy updates (#11619)

* Add more descriptive header text

* Update hint under optional password field

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith 2024-10-21 16:10:57 +02:00 committed by GitHub
parent c9de05de95
commit d298ac6edf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 9 deletions

View File

@ -2464,8 +2464,8 @@
"message": "Optionally require a password for users to access this Send.",
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
},
"sendPasswordDescV2": {
"message": "Require this password to view the Send.",
"sendPasswordDescV3": {
"message": "Add an optional password for recipients to access this Send.",
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
},
"sendNotesDesc": {
@ -4494,9 +4494,15 @@
"itemLocation": {
"message": "Item Location"
},
"fileSend": {
"message": "File Send"
},
"fileSends": {
"message": "File Sends"
},
"textSend": {
"message": "Text Send"
},
"textSends": {
"message": "Text Sends"
},

View File

@ -174,18 +174,25 @@ export class SendAddEditComponent {
)
.subscribe((config) => {
this.config = config;
this.headerText = this.getHeaderText(config.mode);
this.headerText = this.getHeaderText(config.mode, config.sendType);
});
}
/**
* Gets the header text based on the mode.
* Gets the header text based on the mode and type.
* @param mode The mode of the send form.
* @param type The type of the send
* @returns The header text.
*/
private getHeaderText(mode: SendFormMode) {
return this.i18nService.t(
mode === "edit" || mode === "partial-edit" ? "editSend" : "createSend",
);
private getHeaderText(mode: SendFormMode, type: SendType) {
const headerKey =
mode === "edit" || mode === "partial-edit" ? "editItemHeader" : "newItemHeader";
switch (type) {
case SendType.Text:
return this.i18nService.t(headerKey, this.i18nService.t("textSend"));
case SendType.File:
return this.i18nService.t(headerKey, this.i18nService.t("fileSend"));
}
}
}

View File

@ -41,7 +41,7 @@
[appCopyClick]="sendOptionsForm.get('password').value"
showToast
></button>
<bit-hint>{{ "sendPasswordDescV2" | i18n }}</bit-hint>
<bit-hint>{{ "sendPasswordDescV3" | i18n }}</bit-hint>
</bit-form-field>
<bit-form-control *ngIf="!disableHideEmail || originalSendView?.hideEmail">
<input