mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Stop using tsconfig register
Prefer to replace paths at compile time
This commit is contained in:
parent
cea093bca5
commit
f8360396ff
47 changed files with 191 additions and 609 deletions
|
@ -1,9 +1,7 @@
|
|||
import { registerTSPaths } from '../../server/helpers/register-ts-paths'
|
||||
registerTSPaths()
|
||||
|
||||
import { writeJSON } from 'fs-extra'
|
||||
import { values } from 'lodash'
|
||||
import { join } from 'path'
|
||||
import { root } from '@shared/core-utils'
|
||||
import {
|
||||
buildLanguages,
|
||||
VIDEO_CATEGORIES,
|
||||
|
@ -16,7 +14,7 @@ import {
|
|||
} from '../../server/initializers/constants'
|
||||
import { I18N_LOCALES } from '../../shared/core-utils/i18n'
|
||||
|
||||
const videojs = require(join(__dirname, '../../../client/src/locale/videojs.en-US.json'))
|
||||
const videojs = require(join(root(), 'client', 'src', 'locale', 'videojs.en-US.json'))
|
||||
const playerKeys = {
|
||||
'Quality': 'Quality',
|
||||
'Auto': 'Auto',
|
||||
|
@ -100,7 +98,7 @@ writeAll().catch(err => {
|
|||
})
|
||||
|
||||
async function writeAll () {
|
||||
const localePath = join(__dirname, '../../../client/src/locale')
|
||||
const localePath = join(root(), 'client', 'src', 'locale')
|
||||
|
||||
await writeJSON(join(localePath, 'player.en-US.json'), playerKeys, { spaces: 4 })
|
||||
await writeJSON(join(localePath, 'server.en-US.json'), serverKeys, { spaces: 4 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue