MOBILE-4628 course-storage: Set the aria-label in core-download-refresh

main
Nguyen Tuan Anh 2024-07-16 16:13:53 +07:00 committed by Pau Ferrer Ocaña
parent beac119e1e
commit bea16ec337
4 changed files with 8 additions and 3 deletions

View File

@ -1168,6 +1168,7 @@
"addon.storagemanager.deletecourses": "local_moodlemobileapp",
"addon.storagemanager.deletedata": "local_moodlemobileapp",
"addon.storagemanager.deletedatafrom": "local_moodlemobileapp",
"addon.storagemanager.downloaddatafrom": "local_moodlemobileapp",
"addon.storagemanager.downloadedcourses": "local_moodlemobileapp",
"addon.storagemanager.downloads": "local_moodlemobileapp",
"addon.storagemanager.errordeletedownloadeddata": "local_moodlemobileapp",

View File

@ -11,6 +11,7 @@
"deletecourses": "Delete downloaded data from all courses",
"deletedata": "Delete downloaded data",
"deletedatafrom": "Delete all downloaded data from '{{name}}'",
"downloaddatafrom": "Download {{name}}",
"downloadedcourses": "Downloaded courses",
"downloads": "Downloads",
"errordeletedownloadeddata": "Error deleting downloaded data.",

View File

@ -77,7 +77,8 @@
<div *ngIf="downloadEnabled" slot="end" class="core-button-spinner">
<core-download-refresh *ngIf="!section.isDownloading && section.downloadStatus !== statusDownloaded"
[status]="section.downloadStatus" [enabled]="true" (action)="prefecthSection(section)"
[loading]="section.isDownloading || section.isCalculating" [canTrustDownload]="true" />
[loading]="section.isDownloading || section.isCalculating" [canTrustDownload]="true"
[statusTranslatable]="'addon.storagemanager.downloaddatafrom' | translate: { name: section.name }" />
<ion-badge class="core-course-download-section-progress"
*ngIf="section.isDownloading && section.count < section.total" role="progressbar"
@ -122,7 +123,8 @@
<core-download-refresh *ngIf="downloadEnabled && module.handlerData?.showDownloadButton &&
module.downloadStatus !== statusDownloaded" [status]="module.downloadStatus" [enabled]="true"
[canTrustDownload]="true" [loading]="module.spinner || module.handlerData.spinner"
(action)="prefetchModule(module)" />
(action)="prefetchModule(module)"
[statusTranslatable]="'addon.storagemanager.downloaddatafrom' | translate: { name: module.name }" />
<ion-button fill="clear" (click)="deleteForModule($event, module, section)"
*ngIf="!module.calculatingSize && module.totalSize > 0" color="danger">
<ion-icon name="fas-trash" slot="icon-only"

View File

@ -176,7 +176,8 @@
</ion-label>
</ion-item>
<ion-button fill="outline" expand="block" *ngIf="canPrefetch && displayOptions.displayPrefetch" class="ion-text-wrap"
(click)="prefetch()" [disabled]="prefetchDisabled">
(click)="prefetch()" [disabled]="prefetchDisabled"
[attr.aria-label]="'addon.storagemanager.downloaddatafrom' | translate:{name: module?.name}">
<ion-icon *ngIf="!prefetchLoading" name="fas-cloud-arrow-down" slot="start" aria-hidden="true" />
<ion-spinner *ngIf="prefetchLoading" slot="start" aria-hidden="true" />
<ion-label>