X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fi18n%2Fcreate-custom-files.ts;h=bf3dfa1c9913f684ae50e10995510181c0a78dad;hb=6348fb18840c912e107cfbc0f51d1c440b9c1cba;hp=7a33ab624cd057ac1f16d66ea13825744ede8502;hpb=ef78fdbb2ef51033822e174cfe38b3f0d664df56;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts index 7a33ab624..bf3dfa1c9 100755 --- a/scripts/i18n/create-custom-files.ts +++ b/scripts/i18n/create-custom-files.ts @@ -1,7 +1,7 @@ import { writeJSON } from 'fs-extra' import { values } from 'lodash' import { join } from 'path' -import { registerTSPaths } from '../../server/helpers/register-ts-paths' +import { root } from '@shared/core-utils' import { buildLanguages, VIDEO_CATEGORIES, @@ -14,9 +14,7 @@ import { } from '../../server/initializers/constants' import { I18N_LOCALES } from '../../shared/core-utils/i18n' -registerTSPaths() - -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', @@ -32,7 +30,33 @@ const playerKeys = { 'Copy embed code': 'Copy embed code', 'Copy magnet URI': 'Copy magnet URI', 'Total downloaded: ': 'Total downloaded: ', - 'Total uploaded: ': 'Total uploaded: ' + 'Total uploaded: ': 'Total uploaded: ', + 'From servers: ': 'From servers: ', + 'From peers: ': 'From peers: ', + 'Normal mode': 'Normal mode', + 'Stats for nerds': 'Stats for nerds', + 'Theater mode': 'Theater mode', + 'Video UUID': 'Video UUID', + 'Viewport / Frames': 'Viewport / Frames', + 'Resolution': 'Resolution', + 'Volume': 'Volume', + 'Codecs': 'Codecs', + 'Color': 'Color', + 'Connection Speed': 'Connection Speed', + 'Network Activity': 'Network Activity', + 'Total Transfered': 'Total Transfered', + 'Download Breakdown': 'Download Breakdown', + 'Buffer Progress': 'Buffer Progress', + 'Buffer State': 'Buffer State', + 'Live Latency': 'Live Latency', + 'P2P': 'P2P', + '{1} seconds': '{1} seconds', + 'enabled': 'enabled', + 'Playlist: {1}': 'Playlist: {1}', + 'disabled': 'disabled', + ' off': ' off', + 'Player mode': 'Player mode', + 'The video failed to play, will try to fast forward.': 'The video failed to play, will try to fast forward.' } Object.assign(playerKeys, videojs) @@ -77,7 +101,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 })