]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+search/search-filters.component.ts
Migrate to $localize
[github/Chocobozzz/PeerTube.git] / client / src / app / +search / search-filters.component.ts
index 13ad61647412d449e64a54450fdd07b474c14060..a2af9a9427a3b3ab3a2ef0fed56a1c5628421475 100644 (file)
@@ -1,8 +1,6 @@
 import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
 import { ServerService } from '@app/core'
-import { VideoValidatorsService } from '@app/shared/shared-forms'
 import { AdvancedSearch } from '@app/shared/shared-search'
-import { I18n } from '@ngx-translate/i18n-polyfill'
 import { ServerConfig, VideoConstant } from '@shared/models'
 
 @Component({
@@ -32,64 +30,62 @@ export class SearchFiltersComponent implements OnInit {
   private serverConfig: ServerConfig
 
   constructor (
-    private i18n: I18n,
-    private videoValidatorsService: VideoValidatorsService,
     private serverService: ServerService
   ) {
     this.publishedDateRanges = [
       {
         id: 'any_published_date',
-        label: this.i18n('Any')
+        label: $localize`Any`
       },
       {
         id: 'today',
-        label: this.i18n('Today')
+        label: $localize`Today`
       },
       {
         id: 'last_7days',
-        label: this.i18n('Last 7 days')
+        label: $localize`Last 7 days`
       },
       {
         id: 'last_30days',
-        label: this.i18n('Last 30 days')
+        label: $localize`Last 30 days`
       },
       {
         id: 'last_365days',
-        label: this.i18n('Last 365 days')
+        label: $localize`Last 365 days`
       }
     ]
 
     this.durationRanges = [
       {
         id: 'any_duration',
-        label: this.i18n('Any')
+        label: $localize`Any`
       },
       {
         id: 'short',
-        label: this.i18n('Short (< 4 min)')
+        label: $localize`Short (< 4 min)`
       },
       {
         id: 'medium',
-        label: this.i18n('Medium (4-10 min)')
+        label: $localize`Medium (4-10 min)`
       },
       {
         id: 'long',
-        label: this.i18n('Long (> 10 min)')
+        label: $localize`Long (> 10 min)`
       }
     ]
 
     this.sorts = [
       {
         id: '-match',
-        label: this.i18n('Relevance')
+        label: $localize`Relevance`
       },
       {
         id: '-publishedAt',
-        label: this.i18n('Publish date')
+        label: $localize`Publish date`
       },
       {
         id: '-views',
-        label: this.i18n('Views')
+        label: $localize`Views`
       }
     ]
   }