aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+video-channels/video-channels.component.ts4
-rw-r--r--client/src/app/app.component.ts18
-rw-r--r--client/src/app/core/auth/auth.service.ts8
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts6
4 files changed, 20 insertions, 16 deletions
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts
index 82b4a345e..0c5c814c7 100644
--- a/client/src/app/+video-channels/video-channels.component.ts
+++ b/client/src/app/+video-channels/video-channels.component.ts
@@ -8,6 +8,7 @@ import { Subscription } from 'rxjs'
8import { AuthService } from '@app/core' 8import { AuthService } from '@app/core'
9import { Hotkey, HotkeysService } from 'angular2-hotkeys' 9import { Hotkey, HotkeysService } from 'angular2-hotkeys'
10import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' 10import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component'
11import { I18n } from '@ngx-translate/i18n-polyfill'
11 12
12@Component({ 13@Component({
13 templateUrl: './video-channels.component.html', 14 templateUrl: './video-channels.component.html',
@@ -22,6 +23,7 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
22 private routeSub: Subscription 23 private routeSub: Subscription
23 24
24 constructor ( 25 constructor (
26 private i18n: I18n,
25 private route: ActivatedRoute, 27 private route: ActivatedRoute,
26 private authService: AuthService, 28 private authService: AuthService,
27 private videoChannelService: VideoChannelService, 29 private videoChannelService: VideoChannelService,
@@ -45,7 +47,7 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
45 this.subscribeButton.unsubscribe() : 47 this.subscribeButton.unsubscribe() :
46 this.subscribeButton.subscribe() 48 this.subscribeButton.subscribe()
47 return false 49 return false
48 }, undefined, 'Subscribe to the account') 50 }, undefined, this.i18n('Subscribe to the account'))
49 ] 51 ]
50 if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) 52 if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
51 } 53 }
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 29b02032f..7cd0fff1b 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -6,6 +6,7 @@ import { is18nPath } from '../../../shared/models/i18n'
6import { ScreenService } from '@app/shared/misc/screen.service' 6import { ScreenService } from '@app/shared/misc/screen.service'
7import { skip } from 'rxjs/operators' 7import { skip } from 'rxjs/operators'
8import { HotkeysService, Hotkey } from 'angular2-hotkeys' 8import { HotkeysService, Hotkey } from 'angular2-hotkeys'
9import { I18n } from '@ngx-translate/i18n-polyfill'
9 10
10@Component({ 11@Component({
11 selector: 'my-app', 12 selector: 'my-app',
@@ -31,6 +32,7 @@ export class AppComponent implements OnInit {
31 customCSS: SafeHtml 32 customCSS: SafeHtml
32 33
33 constructor ( 34 constructor (
35 private i18n: I18n,
34 private router: Router, 36 private router: Router,
35 private authService: AuthService, 37 private authService: AuthService,
36 private serverService: ServerService, 38 private serverService: ServerService,
@@ -133,35 +135,35 @@ export class AppComponent implements OnInit {
133 new Hotkey(['/', 's'], (event: KeyboardEvent): boolean => { 135 new Hotkey(['/', 's'], (event: KeyboardEvent): boolean => {
134 document.getElementById('search-video').focus() 136 document.getElementById('search-video').focus()
135 return false 137 return false
136 }, undefined, 'Focus the search bar'), 138 }, undefined, this.i18n('Focus the search bar')),
137 new Hotkey('b', (event: KeyboardEvent): boolean => { 139 new Hotkey('b', (event: KeyboardEvent): boolean => {
138 this.toggleMenu() 140 this.toggleMenu()
139 return false 141 return false
140 }, undefined, 'Toggle the left menu'), 142 }, undefined, this.i18n('Toggle the left menu')),
141 new Hotkey('g o', (event: KeyboardEvent): boolean => { 143 new Hotkey('g o', (event: KeyboardEvent): boolean => {
142 this.router.navigate([ '/videos/overview' ]) 144 this.router.navigate([ '/videos/overview' ])
143 return false 145 return false
144 }, undefined, 'Go to the videos overview page'), 146 }, undefined, this.i18n('Go to the videos overview page')),
145 new Hotkey('g t', (event: KeyboardEvent): boolean => { 147 new Hotkey('g t', (event: KeyboardEvent): boolean => {
146 this.router.navigate([ '/videos/trending' ]) 148 this.router.navigate([ '/videos/trending' ])
147 return false 149 return false
148 }, undefined, 'Go to the trending videos page'), 150 }, undefined, this.i18n('Go to the trending videos page')),
149 new Hotkey('g r', (event: KeyboardEvent): boolean => { 151 new Hotkey('g r', (event: KeyboardEvent): boolean => {
150 this.router.navigate([ '/videos/recently-added' ]) 152 this.router.navigate([ '/videos/recently-added' ])
151 return false 153 return false
152 }, undefined, 'Go to the recently added videos page'), 154 }, undefined, this.i18n('Go to the recently added videos page')),
153 new Hotkey('g l', (event: KeyboardEvent): boolean => { 155 new Hotkey('g l', (event: KeyboardEvent): boolean => {
154 this.router.navigate([ '/videos/local' ]) 156 this.router.navigate([ '/videos/local' ])
155 return false 157 return false
156 }, undefined, 'Go to the local videos page'), 158 }, undefined, this.i18n('Go to the local videos page')),
157 new Hotkey('g u', (event: KeyboardEvent): boolean => { 159 new Hotkey('g u', (event: KeyboardEvent): boolean => {
158 this.router.navigate([ '/videos/upload' ]) 160 this.router.navigate([ '/videos/upload' ])
159 return false 161 return false
160 }, undefined, 'Go to the videos upload page'), 162 }, undefined, this.i18n('Go to the videos upload page')),
161 new Hotkey('shift+t', (event: KeyboardEvent): boolean => { 163 new Hotkey('shift+t', (event: KeyboardEvent): boolean => {
162 this.themeService.toggleDarkTheme() 164 this.themeService.toggleDarkTheme()
163 return false 165 return false
164 }, undefined, 'Toggle Dark theme') 166 }, undefined, this.i18n('Toggle Dark theme'))
165 ]) 167 ])
166 } 168 }
167 169
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index 8ff5713a1..9c36b946e 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -65,19 +65,19 @@ export class AuthService {
65 new Hotkey('m s', (event: KeyboardEvent): boolean => { 65 new Hotkey('m s', (event: KeyboardEvent): boolean => {
66 this.router.navigate([ '/videos/subscriptions' ]) 66 this.router.navigate([ '/videos/subscriptions' ])
67 return false 67 return false
68 }, undefined, 'Go to my subscriptions'), 68 }, undefined, this.i18n('Go to my subscriptions')),
69 new Hotkey('m v', (event: KeyboardEvent): boolean => { 69 new Hotkey('m v', (event: KeyboardEvent): boolean => {
70 this.router.navigate([ '/my-account/videos' ]) 70 this.router.navigate([ '/my-account/videos' ])
71 return false 71 return false
72 }, undefined, 'Go to my videos'), 72 }, undefined, this.i18n('Go to my videos')),
73 new Hotkey('m i', (event: KeyboardEvent): boolean => { 73 new Hotkey('m i', (event: KeyboardEvent): boolean => {
74 this.router.navigate([ '/my-account/video-imports' ]) 74 this.router.navigate([ '/my-account/video-imports' ])
75 return false 75 return false
76 }, undefined, 'Go to my imports'), 76 }, undefined, this.i18n('Go to my imports')),
77 new Hotkey('m c', (event: KeyboardEvent): boolean => { 77 new Hotkey('m c', (event: KeyboardEvent): boolean => {
78 this.router.navigate([ '/my-account/video-channels' ]) 78 this.router.navigate([ '/my-account/video-channels' ])
79 return false 79 return false
80 }, undefined, 'Go to my channels') 80 }, undefined, this.i18n('Go to my channels'))
81 ] 81 ]
82 } 82 }
83 83
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index 7a61e355a..ea10b22ad 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -125,17 +125,17 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
125 new Hotkey('shift+l', (event: KeyboardEvent): boolean => { 125 new Hotkey('shift+l', (event: KeyboardEvent): boolean => {
126 this.setLike() 126 this.setLike()
127 return false 127 return false
128 }, undefined, 'Like the video'), 128 }, undefined, this.i18n('Like the video')),
129 new Hotkey('shift+d', (event: KeyboardEvent): boolean => { 129 new Hotkey('shift+d', (event: KeyboardEvent): boolean => {
130 this.setDislike() 130 this.setDislike()
131 return false 131 return false
132 }, undefined, 'Dislike the video'), 132 }, undefined, this.i18n('Dislike the video')),
133 new Hotkey('shift+s', (event: KeyboardEvent): boolean => { 133 new Hotkey('shift+s', (event: KeyboardEvent): boolean => {
134 this.subscribeButton.subscribed ? 134 this.subscribeButton.subscribed ?
135 this.subscribeButton.unsubscribe() : 135 this.subscribeButton.unsubscribe() :
136 this.subscribeButton.subscribe() 136 this.subscribeButton.subscribe()
137 return false 137 return false
138 }, undefined, 'Subscribe to the account') 138 }, undefined, this.i18n('Subscribe to the account'))
139 ] 139 ]
140 if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) 140 if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
141 } 141 }