aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-31 18:12:15 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 08:43:01 +0200
commit989e526abf0c0dd7958deb630df009608561bb67 (patch)
tree5d948bf953a7006b1d6b8c34fb03da1df612a50f /client/src/app/videos/video-list
parent1dd59831f80ff4d49f3b60c8c3b2aabfb1512eeb (diff)
downloadPeerTube-989e526abf0c0dd7958deb630df009608561bb67.tar.gz
PeerTube-989e526abf0c0dd7958deb630df009608561bb67.tar.zst
PeerTube-989e526abf0c0dd7958deb630df009608561bb67.zip
Prepare i18n files
Diffstat (limited to 'client/src/app/videos/video-list')
-rw-r--r--client/src/app/videos/video-list/video-local.component.ts20
-rw-r--r--client/src/app/videos/video-list/video-recently-added.component.ts20
-rw-r--r--client/src/app/videos/video-list/video-search.component.ts21
-rw-r--r--client/src/app/videos/video-list/video-trending.component.ts20
4 files changed, 52 insertions, 29 deletions
diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts
index abab7504f..03568b618 100644
--- a/client/src/app/videos/video-list/video-local.component.ts
+++ b/client/src/app/videos/video-list/video-local.component.ts
@@ -8,6 +8,7 @@ import { AbstractVideoList } from '../../shared/video/abstract-video-list'
8import { VideoSortField } from '../../shared/video/sort-field.type' 8import { VideoSortField } from '../../shared/video/sort-field.type'
9import { VideoService } from '../../shared/video/video.service' 9import { VideoService } from '../../shared/video/video.service'
10import { VideoFilter } from '../../../../../shared/models/videos/video-query.type' 10import { VideoFilter } from '../../../../../shared/models/videos/video-query.type'
11import { I18n } from '@ngx-translate/i18n-polyfill'
11 12
12@Component({ 13@Component({
13 selector: 'my-videos-local', 14 selector: 'my-videos-local',
@@ -15,18 +16,23 @@ import { VideoFilter } from '../../../../../shared/models/videos/video-query.typ
15 templateUrl: '../../shared/video/abstract-video-list.html' 16 templateUrl: '../../shared/video/abstract-video-list.html'
16}) 17})
17export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy { 18export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy {
18 titlePage = 'Local videos' 19 titlePage: string
19 currentRoute = '/videos/local' 20 currentRoute = '/videos/local'
20 sort = '-publishedAt' as VideoSortField 21 sort = '-publishedAt' as VideoSortField
21 filter: VideoFilter = 'local' 22 filter: VideoFilter = 'local'
22 23
23 constructor (protected router: Router, 24 constructor (
24 protected route: ActivatedRoute, 25 protected router: Router,
25 protected notificationsService: NotificationsService, 26 protected route: ActivatedRoute,
26 protected authService: AuthService, 27 protected notificationsService: NotificationsService,
27 protected location: Location, 28 protected authService: AuthService,
28 private videoService: VideoService) { 29 protected location: Location,
30 private videoService: VideoService,
31 private i18n: I18n
32 ) {
29 super() 33 super()
34
35 this.titlePage = i18n('Local videos')
30 } 36 }
31 37
32 ngOnInit () { 38 ngOnInit () {
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts
index d064d9628..5768d9fe0 100644
--- a/client/src/app/videos/video-list/video-recently-added.component.ts
+++ b/client/src/app/videos/video-list/video-recently-added.component.ts
@@ -7,6 +7,7 @@ import { AuthService } from '../../core/auth'
7import { AbstractVideoList } from '../../shared/video/abstract-video-list' 7import { AbstractVideoList } from '../../shared/video/abstract-video-list'
8import { VideoSortField } from '../../shared/video/sort-field.type' 8import { VideoSortField } from '../../shared/video/sort-field.type'
9import { VideoService } from '../../shared/video/video.service' 9import { VideoService } from '../../shared/video/video.service'
10import { I18n } from '@ngx-translate/i18n-polyfill'
10 11
11@Component({ 12@Component({
12 selector: 'my-videos-recently-added', 13 selector: 'my-videos-recently-added',
@@ -14,17 +15,22 @@ import { VideoService } from '../../shared/video/video.service'
14 templateUrl: '../../shared/video/abstract-video-list.html' 15 templateUrl: '../../shared/video/abstract-video-list.html'
15}) 16})
16export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy { 17export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
17 titlePage = 'Recently added' 18 titlePage: string
18 currentRoute = '/videos/recently-added' 19 currentRoute = '/videos/recently-added'
19 sort: VideoSortField = '-publishedAt' 20 sort: VideoSortField = '-publishedAt'
20 21
21 constructor (protected router: Router, 22 constructor (
22 protected route: ActivatedRoute, 23 protected router: Router,
23 protected location: Location, 24 protected route: ActivatedRoute,
24 protected notificationsService: NotificationsService, 25 protected location: Location,
25 protected authService: AuthService, 26 protected notificationsService: NotificationsService,
26 private videoService: VideoService) { 27 protected authService: AuthService,
28 private videoService: VideoService,
29 private i18n: I18n
30 ) {
27 super() 31 super()
32
33 this.titlePage = i18n('Recently added')
28 } 34 }
29 35
30 ngOnInit () { 36 ngOnInit () {
diff --git a/client/src/app/videos/video-list/video-search.component.ts b/client/src/app/videos/video-list/video-search.component.ts
index aab896d84..35566a7bd 100644
--- a/client/src/app/videos/video-list/video-search.component.ts
+++ b/client/src/app/videos/video-list/video-search.component.ts
@@ -8,6 +8,7 @@ import { Subscription } from 'rxjs'
8import { AuthService } from '../../core/auth' 8import { AuthService } from '../../core/auth'
9import { AbstractVideoList } from '../../shared/video/abstract-video-list' 9import { AbstractVideoList } from '../../shared/video/abstract-video-list'
10import { VideoService } from '../../shared/video/video.service' 10import { VideoService } from '../../shared/video/video.service'
11import { I18n } from '@ngx-translate/i18n-polyfill'
11 12
12@Component({ 13@Component({
13 selector: 'my-videos-search', 14 selector: 'my-videos-search',
@@ -15,7 +16,7 @@ import { VideoService } from '../../shared/video/video.service'
15 templateUrl: '../../shared/video/abstract-video-list.html' 16 templateUrl: '../../shared/video/abstract-video-list.html'
16}) 17})
17export class VideoSearchComponent extends AbstractVideoList implements OnInit, OnDestroy { 18export class VideoSearchComponent extends AbstractVideoList implements OnInit, OnDestroy {
18 titlePage = 'Search' 19 titlePage: string
19 currentRoute = '/videos/search' 20 currentRoute = '/videos/search'
20 loadOnInit = false 21 loadOnInit = false
21 22
@@ -24,15 +25,19 @@ export class VideoSearchComponent extends AbstractVideoList implements OnInit, O
24 } 25 }
25 private subActivatedRoute: Subscription 26 private subActivatedRoute: Subscription
26 27
27 constructor (protected router: Router, 28 constructor (
28 protected route: ActivatedRoute, 29 protected router: Router,
29 protected notificationsService: NotificationsService, 30 protected route: ActivatedRoute,
30 protected authService: AuthService, 31 protected notificationsService: NotificationsService,
31 protected location: Location, 32 protected authService: AuthService,
32 private videoService: VideoService, 33 protected location: Location,
33 private redirectService: RedirectService 34 private videoService: VideoService,
35 private redirectService: RedirectService,
36 private i18n: I18n
34 ) { 37 ) {
35 super() 38 super()
39
40 this.titlePage = i18n('Search')
36 } 41 }
37 42
38 ngOnInit () { 43 ngOnInit () {
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts
index ea65070f9..760470e8c 100644
--- a/client/src/app/videos/video-list/video-trending.component.ts
+++ b/client/src/app/videos/video-list/video-trending.component.ts
@@ -7,6 +7,7 @@ import { AuthService } from '../../core/auth'
7import { AbstractVideoList } from '../../shared/video/abstract-video-list' 7import { AbstractVideoList } from '../../shared/video/abstract-video-list'
8import { VideoSortField } from '../../shared/video/sort-field.type' 8import { VideoSortField } from '../../shared/video/sort-field.type'
9import { VideoService } from '../../shared/video/video.service' 9import { VideoService } from '../../shared/video/video.service'
10import { I18n } from '@ngx-translate/i18n-polyfill'
10 11
11@Component({ 12@Component({
12 selector: 'my-videos-trending', 13 selector: 'my-videos-trending',
@@ -14,17 +15,22 @@ import { VideoService } from '../../shared/video/video.service'
14 templateUrl: '../../shared/video/abstract-video-list.html' 15 templateUrl: '../../shared/video/abstract-video-list.html'
15}) 16})
16export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy { 17export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy {
17 titlePage = 'Trending' 18 titlePage: string
18 currentRoute = '/videos/trending' 19 currentRoute = '/videos/trending'
19 defaultSort: VideoSortField = '-views' 20 defaultSort: VideoSortField = '-views'
20 21
21 constructor (protected router: Router, 22 constructor (
22 protected route: ActivatedRoute, 23 protected router: Router,
23 protected notificationsService: NotificationsService, 24 protected route: ActivatedRoute,
24 protected authService: AuthService, 25 protected notificationsService: NotificationsService,
25 protected location: Location, 26 protected authService: AuthService,
26 private videoService: VideoService) { 27 protected location: Location,
28 private videoService: VideoService,
29 private i18n: I18n
30 ) {
27 super() 31 super()
32
33 this.titlePage = i18n('Trending')
28 } 34 }
29 35
30 ngOnInit () { 36 ngOnInit () {