Skip to content

Commit

Permalink
fix email and domains modal title (#2335)
Browse files Browse the repository at this point in the history
* fix email and domains modal title

* add togglz to labels and titles

---------

Co-authored-by: Angel Montenegro <[email protected]>
  • Loading branch information
auumgn and amontenegro authored Aug 30, 2024
1 parent 5ac62a0 commit 26bbb61
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/app/cdk/side-bar/modals/modal-email/modal-email.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<app-modal [noSidebar]="true">
<app-modal-header i18n="@@shared.emails" [closeLabel]="ariaLabelClose"
<app-modal-header
*ngIf="emailDomainsTogglz && !loadingTogglz"
i18n="@@shared.emailsAndDomains"
[closeLabel]="ariaLabelClose"
>Emails & domains</app-modal-header
>
<app-modal-header
*ngIf="!emailDomainsTogglz && !loadingTogglz"
i18n="@@shared.emails"
[closeLabel]="ariaLabelCloseOld"
>Emails</app-modal-header
>
<app-modal-footer>
Expand All @@ -9,7 +18,9 @@
(click)="saveEvent()"
i18n="@@shared.saveChanges"
id="save-emails-button"
[attr.aria-label]="ariaLabelSave"
[attr.aria-label]="
emailDomainsTogglz && !loadingTogglz ? ariaLabelSave : ariaLabelSaveOld
"
>
Save changes
</button>
Expand All @@ -19,7 +30,11 @@
(click)="closeEvent()"
i18n="@@shared.cancel"
id="cancel-emails-button"
[attr.aria-label]="ariaLabelCancel"
[attr.aria-label]="
emailDomainsTogglz && !loadingTogglz
? ariaLabelCancel
: ariaLabelCancelOld
"
>
Cancel
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ export class ModalEmailComponent implements OnInit, OnDestroy {
ariaLabelKnowledgeBase = $localize`:@@side-bar.ariaLabelOrcidTermsOfUseBase:ORCID knowledge base (Opens in a new tab)`
ariaLabelKnowledgeSupport = $localize`:@@side-bar.ariaLabelOrcidTermsSupport:ORCID support page (Opens in a new tab)`
ariaLabelOrcidTermsOfUseLink = $localize`:@@side-bar.ariaLabelOrcidTermsOfUseLink:ORCID terms of use (Opens in a new tab)`
ariaLabelSaveOld = $localize`:@@side-bar.ariaLabelEmailSave:Save changes to Emails`
ariaLabelSave = $localize`:@@side-bar.ariaLabelEmailAndDomainsSave:Save changes to Emails & domains`
ariaLabelNotificationsAreSentToEmail = $localize`:@@side-bar.notificationsAreSentToEmail:Notifications are sent to`
ariaLabelCancelOld = $localize`:@@side-bar.ariaLabelEmailCancel:Cancel changes and close Emails`
ariaLabelCancel = $localize`:@@side-bar.ariaLabelEmailAndDomainsCancel:Cancel changes and close Emails & domains`
ariaLabelDelete = $localize`:@@side-bar.ariaLabelEmailDelete:Delete Email`
ariaLabelClose = $localize`:@@side-bar.ariaLabelEmailAndDomainsClose:Close Emails & domains`
ariaLabelCloseOld = $localize`:@@side-bar.ariaLabelEmailClose:Close Emails`
ariaLabelEmailAddress = $localize`:@@side-bar.emailAddress:Email address`
ariaLabelNewEmailAddress = $localize`:@@side-bar.newEmailAddress:New email address`
ariaLabelOtherEmailAddresses = $localize`:@@side-bar.otherEmails:Other email addresses`
Expand Down

0 comments on commit 26bbb61

Please sign in to comment.