aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-06 17:37:13 +0200
committerChocobozzz <me@florianbigard.com>2018-06-06 17:37:13 +0200
commit74b7c6d48e9ca377fe938c8134ed74b612e62ba0 (patch)
treecb848dec054a71669fef5ea3986bdd0d2c354248 /scripts
parent7ce44a74a3b052190cfacd4bd5ee6b92cfc620ac (diff)
downloadPeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.tar.gz
PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.tar.zst
PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.zip
Little i18n refractoring
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/i18n/xliff2json.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/i18n/xliff2json.ts b/scripts/i18n/xliff2json.ts
index fa5a71d65..c60739561 100755
--- a/scripts/i18n/xliff2json.ts
+++ b/scripts/i18n/xliff2json.ts
@@ -1,7 +1,7 @@
1import * as xliff12ToJs from 'xliff/xliff12ToJs' 1import * as xliff12ToJs from 'xliff/xliff12ToJs'
2import { unlink, readFileSync, writeFile } from 'fs' 2import { unlink, readFileSync, writeFile } from 'fs'
3import { join } from 'path' 3import { join } from 'path'
4import { buildFileLocale, I18N_LOCALES, isDefaultLocale } from '../../shared/models/i18n/i18n' 4import { buildFileLocale, I18N_LOCALES, isDefaultLocale, LOCALE_FILES } from '../../shared/models/i18n/i18n'
5import { eachSeries } from 'async' 5import { eachSeries } from 'async'
6 6
7const sources: string[] = [] 7const sources: string[] = []
@@ -9,7 +9,7 @@ const availableLocales = Object.keys(I18N_LOCALES)
9 .filter(l => isDefaultLocale(l) === false) 9 .filter(l => isDefaultLocale(l) === false)
10 .map(l => buildFileLocale(l)) 10 .map(l => buildFileLocale(l))
11 11
12for (const file of [ 'server', 'player' ]) { 12for (const file of LOCALE_FILES) {
13 for (const locale of availableLocales) { 13 for (const locale of availableLocales) {
14 sources.push(join(__dirname, '../../../client/src/locale/target/', `${file}_${locale}.xml`)) 14 sources.push(join(__dirname, '../../../client/src/locale/target/', `${file}_${locale}.xml`))
15 } 15 }