1 import { registerTSPaths } from '../../server/helpers/register-ts-paths'
2 import { writeJSON } from 'fs-extra'
3 import { join } from 'path'
9 VIDEO_PLAYLIST_PRIVACIES,
13 } from '../../server/initializers/constants'
14 import { values } from 'lodash'
18 const videojs = require(join(__dirname, '../../../client/src/locale/videojs.en-US.json'))
23 'Subtitles/CC': 'Subtitles/CC',
26 'Go to the video page': 'Go to the video page',
27 'Settings': 'Settings',
28 'Uses P2P, others may know you are watching this video.': 'Uses P2P, others may know you are watching this video.',
29 'Copy the video URL': 'Copy the video URL',
30 'Copy the video URL at the current time': 'Copy the video URL at the current time',
31 'Copy embed code': 'Copy embed code',
32 'Copy magnet URI': 'Copy magnet URI',
33 'Total downloaded: ': 'Total downloaded: ',
34 'Total uploaded: ': 'Total uploaded: '
36 Object.assign(playerKeys, videojs)
39 const serverKeys: any = {}
40 values(VIDEO_CATEGORIES)
41 .concat(values(VIDEO_LICENCES))
42 .concat(values(VIDEO_PRIVACIES))
43 .concat(values(VIDEO_STATES))
44 .concat(values(VIDEO_IMPORT_STATES))
45 .concat(values(VIDEO_PLAYLIST_PRIVACIES))
46 .concat(values(VIDEO_PLAYLIST_TYPES))
48 'This video does not exist.',
49 'We cannot fetch the video. Please try again later.',
51 'This video is not available because the remote instance is not responding.'
53 .forEach(v => serverKeys[v] = v)
56 Object.assign(serverKeys, {
62 const languageKeys: any = {}
63 const languages = buildLanguages()
64 Object.keys(languages).forEach(k => languageKeys[languages[k]] = languages[k])
66 Object.assign(serverKeys, languageKeys)
69 writeJSON(join(__dirname, '../../../client/src/locale/player.en-US.json'), playerKeys),
70 writeJSON(join(__dirname, '../../../client/src/locale/server.en-US.json'), serverKeys)