diff options
Diffstat (limited to 'client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts')
-rw-r--r-- | client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts index 07e2e0ff3..d6fd1a1ab 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts | |||
@@ -2,7 +2,6 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' |
4 | import { BytesPipe, RedundancyService } from '@app/shared/shared-main' | 4 | import { BytesPipe, RedundancyService } from '@app/shared/shared-main' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
6 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 5 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
7 | import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' | 6 | import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' |
8 | import { VideosRedundancyStats } from '@shared/models/server' | 7 | import { VideosRedundancyStats } from '@shared/models/server' |
@@ -32,9 +31,8 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit | |||
32 | private notifier: Notifier, | 31 | private notifier: Notifier, |
33 | private confirmService: ConfirmService, | 32 | private confirmService: ConfirmService, |
34 | private redundancyService: RedundancyService, | 33 | private redundancyService: RedundancyService, |
35 | private serverService: ServerService, | 34 | private serverService: ServerService |
36 | private i18n: I18n | 35 | ) { |
37 | ) { | ||
38 | super() | 36 | super() |
39 | 37 | ||
40 | this.bytesPipe = new BytesPipe() | 38 | this.bytesPipe = new BytesPipe() |
@@ -100,7 +98,7 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit | |||
100 | this.redundanciesGraphsData.push({ | 98 | this.redundanciesGraphsData.push({ |
101 | stats, | 99 | stats, |
102 | graphData: { | 100 | graphData: { |
103 | labels: [ this.i18n('Used'), this.i18n('Available') ], | 101 | labels: [ $localize`Used`, $localize`Available` ], |
104 | datasets: [ | 102 | datasets: [ |
105 | { | 103 | { |
106 | data: [ stats.totalUsed, totalSize ], | 104 | data: [ stats.totalUsed, totalSize ], |
@@ -139,14 +137,14 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit | |||
139 | } | 137 | } |
140 | 138 | ||
141 | async removeRedundancy (redundancy: VideoRedundancy) { | 139 | async removeRedundancy (redundancy: VideoRedundancy) { |
142 | const message = this.i18n('Do you really want to remove this video redundancy?') | 140 | const message = $localize`Do you really want to remove this video redundancy?` |
143 | const res = await this.confirmService.confirm(message, this.i18n('Remove redundancy')) | 141 | const res = await this.confirmService.confirm(message, $localize`Remove redundancy`) |
144 | if (res === false) return | 142 | if (res === false) return |
145 | 143 | ||
146 | this.redundancyService.removeVideoRedundancies(redundancy) | 144 | this.redundancyService.removeVideoRedundancies(redundancy) |
147 | .subscribe( | 145 | .subscribe( |
148 | () => { | 146 | () => { |
149 | this.notifier.success(this.i18n('Video redundancies removed!')) | 147 | this.notifier.success($localize`Video redundancies removed!`) |
150 | this.loadData() | 148 | this.loadData() |
151 | }, | 149 | }, |
152 | 150 | ||