aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/i18n/create-custom-files.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/i18n/create-custom-files.ts')
-rwxr-xr-xscripts/i18n/create-custom-files.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts
index b363a1bdc..7556866e6 100755
--- a/scripts/i18n/create-custom-files.ts
+++ b/scripts/i18n/create-custom-files.ts
@@ -1,7 +1,7 @@
1import { writeJSON } from 'fs-extra' 1import { writeJSON } from 'fs-extra'
2import { values } from 'lodash' 2import { values } from 'lodash'
3import { join } from 'path' 3import { join } from 'path'
4import { registerTSPaths } from '../../server/helpers/register-ts-paths' 4import { root } from '@shared/core-utils'
5import { 5import {
6 buildLanguages, 6 buildLanguages,
7 VIDEO_CATEGORIES, 7 VIDEO_CATEGORIES,
@@ -14,9 +14,7 @@ import {
14} from '../../server/initializers/constants' 14} from '../../server/initializers/constants'
15import { I18N_LOCALES } from '../../shared/core-utils/i18n' 15import { I18N_LOCALES } from '../../shared/core-utils/i18n'
16 16
17registerTSPaths() 17const videojs = require(join(root(), 'client', 'src', 'locale', 'videojs.en-US.json'))
18
19const videojs = require(join(__dirname, '../../../client/src/locale/videojs.en-US.json'))
20const playerKeys = { 18const playerKeys = {
21 'Quality': 'Quality', 19 'Quality': 'Quality',
22 'Auto': 'Auto', 20 'Auto': 'Auto',
@@ -51,6 +49,9 @@ const playerKeys = {
51 'Buffer Progress': 'Buffer Progress', 49 'Buffer Progress': 'Buffer Progress',
52 'Buffer State': 'Buffer State', 50 'Buffer State': 'Buffer State',
53 'Live Latency': 'Live Latency', 51 'Live Latency': 'Live Latency',
52 'P2P': 'P2P',
53 'enabled': 'enabled',
54 'disabled': 'disabled',
54 ' off': ' off', 55 ' off': ' off',
55 'Player mode': 'Player mode' 56 'Player mode': 'Player mode'
56} 57}
@@ -97,7 +98,7 @@ writeAll().catch(err => {
97}) 98})
98 99
99async function writeAll () { 100async function writeAll () {
100 const localePath = join(__dirname, '../../../client/src/locale') 101 const localePath = join(root(), 'client', 'src', 'locale')
101 102
102 await writeJSON(join(localePath, 'player.en-US.json'), playerKeys, { spaces: 4 }) 103 await writeJSON(join(localePath, 'player.en-US.json'), playerKeys, { spaces: 4 })
103 await writeJSON(join(localePath, 'server.en-US.json'), serverKeys, { spaces: 4 }) 104 await writeJSON(join(localePath, 'server.en-US.json'), serverKeys, { spaces: 4 })