mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Localize player
This commit is contained in:
parent
550a562cec
commit
e945b184a0
23 changed files with 1049 additions and 61 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue