X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fi18n%2Fcreate-custom-files.ts;h=bf3dfa1c9913f684ae50e10995510181c0a78dad;hb=6348fb18840c912e107cfbc0f51d1c440b9c1cba;hp=111bcbf4c816a10a19293d8f1b7909da67d11f3e;hpb=e8bb5b6b3a1e4c2aeab368f01cc5092d8478b893;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts index 111bcbf4c..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', @@ -29,18 +27,36 @@ const playerKeys = { 'Watching this video may reveal your IP address to others.': 'Watching this video may reveal your IP address to others.', 'Copy the video URL': 'Copy the video URL', 'Copy the video URL at the current time': 'Copy the video URL at the current time', - 'Copy video embed code': 'Copy video embed code', + 'Copy embed code': 'Copy embed code', 'Copy magnet URI': 'Copy magnet URI', 'Total downloaded: ': 'Total downloaded: ', 'Total uploaded: ': 'Total uploaded: ', 'From servers: ': 'From servers: ', 'From peers: ': 'From peers: ', 'Normal mode': 'Normal mode', - 'Play in loop': 'Play in loop', + 'Stats for nerds': 'Stats for nerds', 'Theater mode': 'Theater mode', - 'Copy the playlist URL': 'Copy the playlist URL', - 'Copy the playlist URL at current video position': 'Copy the playlist URL at current video position', - 'Copy the playlist embed code': 'Copy the playlist embed code' + '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) @@ -85,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 })