diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-06 17:37:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-06 17:37:13 +0200 |
commit | 74b7c6d48e9ca377fe938c8134ed74b612e62ba0 (patch) | |
tree | cb848dec054a71669fef5ea3986bdd0d2c354248 /client/src/app/videos | |
parent | 7ce44a74a3b052190cfacd4bd5ee6b92cfc620ac (diff) | |
download | PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.tar.gz PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.tar.zst PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.zip |
Little i18n refractoring
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 d3e16c4cf..4a67d456e 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -25,6 +25,7 @@ import { getVideojsOptions, loadLocale, addContextMenu } from '../../../assets/p | |||
25 | import { ServerService } from '@app/core' | 25 | import { ServerService } from '@app/core' |
26 | import { I18n } from '@ngx-translate/i18n-polyfill' | 26 | import { I18n } from '@ngx-translate/i18n-polyfill' |
27 | import { environment } from '../../../environments/environment' | 27 | import { environment } from '../../../environments/environment' |
28 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' | ||
28 | 29 | ||
29 | @Component({ | 30 | @Component({ |
30 | selector: 'my-video-watch', | 31 | selector: 'my-video-watch', |
@@ -377,7 +378,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
377 | }) | 378 | }) |
378 | 379 | ||
379 | if (this.videojsLocaleLoaded === false) { | 380 | if (this.videojsLocaleLoaded === false) { |
380 | await loadLocale(environment.apiUrl, videojs, environment.production === true ? this.localeId : 'fr') | 381 | await loadLocale(environment.apiUrl, videojs, isOnDevLocale() ? getDevLocale() : this.localeId) |
381 | this.videojsLocaleLoaded = true | 382 | this.videojsLocaleLoaded = true |
382 | } | 383 | } |
383 | 384 | ||