1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Localize player

This commit is contained in:
Chocobozzz 2018-06-06 14:23:40 +02:00
parent 550a562cec
commit e945b184a0
No known key found for this signature in database
GPG key ID: 583A612D890159BE
23 changed files with 1049 additions and 61 deletions

View file

@ -47,6 +47,14 @@ for (const staticClientFile of staticClientFiles) {
clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE }))
clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE }))
clientsRouter.use('/client/locales/:locale/:file.json', function (req, res) {
if (req.params.locale === 'fr' && req.params.file === 'player') {
return res.sendFile(join(__dirname, '../../../client/dist/locale/player_fr.json'))
}
return res.sendStatus(404)
})
// 404 for static files not found
clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => {
res.sendStatus(404)