diff --git a/src/app/statistics-page/statistics-table/statistics-table.component.html b/src/app/statistics-page/statistics-table/statistics-table.component.html index efa9ce43d99..9ea8ab2d03b 100644 --- a/src/app/statistics-page/statistics-table/statistics-table.component.html +++ b/src/app/statistics-page/statistics-table/statistics-table.component.html @@ -10,7 +10,7 @@

- + {{ objectHeaderLabel }} diff --git a/src/app/statistics-page/statistics-table/statistics-table.component.ts b/src/app/statistics-page/statistics-table/statistics-table.component.ts index cd717305681..c5c5456f6d0 100644 --- a/src/app/statistics-page/statistics-table/statistics-table.component.ts +++ b/src/app/statistics-page/statistics-table/statistics-table.component.ts @@ -58,6 +58,11 @@ export class StatisticsTableComponent implements OnInit { */ headers: string[]; + /** + * Object header label + */ + objectHeaderLabel: string; + constructor( protected dsoService: DSpaceObjectDataService, protected nameService: DSONameService, @@ -71,6 +76,7 @@ export class StatisticsTableComponent implements OnInit { if (this.hasData) { this.headers = Object.keys(this.report.points[0].values); } + this.objectHeaderLabel = this.getObjectHeaderLabel(this.report.reportType); } /** @@ -91,4 +97,12 @@ export class StatisticsTableComponent implements OnInit { return of(point.label); } } + + /** + * Defines a dynamic label for the object column + * @param reportType + */ + getObjectHeaderLabel(reportType: string): string { + return this.translateService.instant('statistics.table.header.' + reportType); + } } diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 053e5133d9a..1b2c885441e 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -6781,4 +6781,14 @@ "live-region.ordering.dropped": "{{ itemName }}, dropped at position {{ index }} of {{ length }}.", "dynamic-form-array.sortable-list.label": "Sortable list", + + "statistics.table.header.TotalVisits": "Object", + + "statistics.table.header.TotalVisitsMonth": "Month", + + "statistics.table.header.TotalDownloads": "Downloads", + + "statistics.table.header.TopCities": "Cities", + + "statistics.table.header.topCountries": "Countries", } diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index c67bed6a4db..4a276633aa7 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -10194,4 +10194,19 @@ // "search-facet-option.update.announcement": "The page will be reloaded. Filter {{ filter }} is selected.", "search-facet-option.update.announcement": "La página será recargada. Filtro {{ filter }} seleccionado.", + + // "statistics.table.header.TotalVisits": "Object", + "statistics.table.header.TotalVisits": "Objeto", + + // "statistics.table.header.TotalVisitsMonth": "Month", + "statistics.table.header.TotalVisitsMonth": "Mes", + + // "statistics.table.header.TotalDownloads": "Downloads", + "statistics.table.header.TotalDownloads": "Descargas", + + // "statistics.table.header.TopCities": "Cities", + "statistics.table.header.TopCities": "Ciudades", + + // "statistics.table.header.topCountries": "Countries", + "statistics.table.header.topCountries": "Países", } diff --git a/src/assets/i18n/pt-BR.json5 b/src/assets/i18n/pt-BR.json5 index beb63bbebb1..179ba49c822 100644 --- a/src/assets/i18n/pt-BR.json5 +++ b/src/assets/i18n/pt-BR.json5 @@ -10243,4 +10243,19 @@ // "search-facet-option.update.announcement": "The page will be reloaded. Filter {{ filter }} is selected.", "search-facet-option.update.announcement": "A página será recarregada. O filtro {{ filter }} foi selecionado.", + + // "statistics.table.header.TotalVisits": "Object", + "statistics.table.header.TotalVisits": "Objeto", + + // "statistics.table.header.TotalVisitsMonth": "Month", + "statistics.table.header.TotalVisitsMonth": "Mês", + + // "statistics.table.header.TotalDownloads": "Downloads", + "statistics.table.header.TotalDownloads": "Downloads", + + // "statistics.table.header.TopCities": "Cities", + "statistics.table.header.TopCities": "Cidades", + + // "statistics.table.header.topCountries": "Countries", + "statistics.table.header.topCountries": "Países", }