aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/i18n
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/i18n')
-rwxr-xr-xscripts/i18n/create-custom-files.ts11
-rwxr-xr-xscripts/i18n/update.sh2
2 files changed, 7 insertions, 6 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 })
diff --git a/scripts/i18n/update.sh b/scripts/i18n/update.sh
index 0524c9e5d..4cf0d65b7 100755
--- a/scripts/i18n/update.sh
+++ b/scripts/i18n/update.sh
@@ -8,7 +8,7 @@ cd client
8npm run ng -- extract-i18n --out-file src/locale/angular.xlf 8npm run ng -- extract-i18n --out-file src/locale/angular.xlf
9 9
10# Merge new translations in other language files 10# Merge new translations in other language files
11node ./node_modules/.bin/xliffmerge -p ./.xliffmerge.json "ar" "ca-ES" "gl-ES" "cs-CZ" "da-DK" "de-DE" "el-GR" "en-GB" "en-US" "eo" "es-ES" "eu-ES" "fa-IR" "fi-FI" "fr-FR" "gd" "gl-ES" "hu-HU" "it-IT" "ja-JP" "jbo" "kab" "ko-KR" "lt-LT" "nb-NO" "nl-NL" "oc" "pl-PL" "pt-BR" "pt-PT" "ru-RU" "sk-SK" "sl-SI" "sv-SE" "ta" "th-TH" "tr-TR" "uk-UA" "vi-VN" "zh-Hans-CN" "zh-Hant-TW" 11node ./node_modules/.bin/xliffmerge -p ./.xliffmerge.json "ar" "ca-ES" "gl-ES" "cs-CZ" "da-DK" "de-DE" "el-GR" "en-GB" "en-US" "eo" "es-ES" "eu-ES" "fa-IR" "fi-FI" "fr-FR" "gd" "gl-ES" "hu-HU" "it-IT" "ja-JP" "jbo" "kab" "ko-KR" "lt-LT" "nb-NO" "nl-NL" "oc" "pl-PL" "pt-BR" "pt-PT" "ru-RU" "sk-SK" "sl-SI" "sv-SE" "ta" "th-TH" "tr-TR" "uk-UA" "vi-VN" "zh-Hans-CN" "zh-Hant-TW" "nn" "nb-NO"
12 12
13# Add our strings too 13# Add our strings too
14cd ../ 14cd ../