mirror of https://github.com/Chocobozzz/PeerTube
Translate player according to the interface lang
parent
3dfa849402
commit
95d5113575
|
@ -407,7 +407,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
peertubeLink: false,
|
peertubeLink: false,
|
||||||
poster: this.video.previewUrl,
|
poster: this.video.previewUrl,
|
||||||
startTime,
|
startTime,
|
||||||
theaterMode: true
|
theaterMode: true,
|
||||||
|
language: this.localeId
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.videojsLocaleLoaded === false) {
|
if (this.videojsLocaleLoaded === false) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ function getVideojsOptions (options: {
|
||||||
startTime: number | string
|
startTime: number | string
|
||||||
theaterMode: boolean,
|
theaterMode: boolean,
|
||||||
videoCaptions: VideoJSCaption[],
|
videoCaptions: VideoJSCaption[],
|
||||||
|
language?: string,
|
||||||
controls?: boolean,
|
controls?: boolean,
|
||||||
muted?: boolean,
|
muted?: boolean,
|
||||||
loop?: boolean
|
loop?: boolean
|
||||||
|
@ -74,6 +75,10 @@ function getVideojsOptions (options: {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.language && !isDefaultLocale(options.language)) {
|
||||||
|
Object.assign(videojsOptions, { language: options.language })
|
||||||
|
}
|
||||||
|
|
||||||
return videojsOptions
|
return videojsOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,12 @@ post_build_hook () {
|
||||||
rmdir "./src/locale/pending_target/"
|
rmdir "./src/locale/pending_target/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Previous build failed
|
||||||
|
if [ ! -f client/src/locale/target/angular_fr_FR.xml ]; then
|
||||||
|
git checkout -- client/src/locale/target/
|
||||||
|
rm -r client/src/locale/pending_target/
|
||||||
|
fi
|
||||||
|
|
||||||
cd client
|
cd client
|
||||||
|
|
||||||
rm -rf ./dist ./compiled
|
rm -rf ./dist ./compiled
|
||||||
|
|
Loading…
Reference in New Issue