diff options
Diffstat (limited to 'scripts/i18n/create-custom-files.ts')
-rwxr-xr-x | scripts/i18n/create-custom-files.ts | 11 |
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 @@ | |||
1 | import { writeJSON } from 'fs-extra' | 1 | import { writeJSON } from 'fs-extra' |
2 | import { values } from 'lodash' | 2 | import { values } from 'lodash' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { registerTSPaths } from '../../server/helpers/register-ts-paths' | 4 | import { root } from '@shared/core-utils' |
5 | import { | 5 | import { |
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' |
15 | import { I18N_LOCALES } from '../../shared/core-utils/i18n' | 15 | import { I18N_LOCALES } from '../../shared/core-utils/i18n' |
16 | 16 | ||
17 | registerTSPaths() | 17 | const videojs = require(join(root(), 'client', 'src', 'locale', 'videojs.en-US.json')) |
18 | |||
19 | const videojs = require(join(__dirname, '../../../client/src/locale/videojs.en-US.json')) | ||
20 | const playerKeys = { | 18 | const 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 | ||
99 | async function writeAll () { | 100 | async 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 }) |