aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-06 14:23:40 +0200
committerChocobozzz <me@florianbigard.com>2018-06-06 16:48:40 +0200
commite945b184a0f29b47c33bbd05578f3493ca9c8e6c (patch)
tree46c821006d170e6e28658d978e313761adfaf55a /server
parent550a562ceca45ea78d6f7054024c8d3a6b89c30c (diff)
downloadPeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.tar.gz
PeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.tar.zst
PeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.zip
Localize player
Diffstat (limited to 'server')
-rw-r--r--server/controllers/client.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index 4b37b5fa6..b153f6086 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -47,6 +47,14 @@ for (const staticClientFile of staticClientFiles) {
47clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) 47clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE }))
48clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) 48clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE }))
49 49
50clientsRouter.use('/client/locales/:locale/:file.json', function (req, res) {
51 if (req.params.locale === 'fr' && req.params.file === 'player') {
52 return res.sendFile(join(__dirname, '../../../client/dist/locale/player_fr.json'))
53 }
54
55 return res.sendStatus(404)
56})
57
50// 404 for static files not found 58// 404 for static files not found
51clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { 59clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => {
52 res.sendStatus(404) 60 res.sendStatus(404)