Skip to content

Commit

Permalink
add togglz to labels and titles
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Aug 30, 2024
1 parent d32f1c3 commit edc0eaa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/app/cdk/side-bar/modals/modal-email/modal-email.component.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<app-modal [noSidebar]="true">
<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>
<button
mat-raised-button
color="primary"
(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 @@ -21,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 edc0eaa

Please sign in to comment.