diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-06 17:37:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-06 17:37:13 +0200 |
commit | 74b7c6d48e9ca377fe938c8134ed74b612e62ba0 (patch) | |
tree | cb848dec054a71669fef5ea3986bdd0d2c354248 /scripts/i18n | |
parent | 7ce44a74a3b052190cfacd4bd5ee6b92cfc620ac (diff) | |
download | PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.tar.gz PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.tar.zst PeerTube-74b7c6d48e9ca377fe938c8134ed74b612e62ba0.zip |
Little i18n refractoring
Diffstat (limited to 'scripts/i18n')
-rwxr-xr-x | scripts/i18n/xliff2json.ts | 4 |
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 @@ | |||
1 | import * as xliff12ToJs from 'xliff/xliff12ToJs' | 1 | import * as xliff12ToJs from 'xliff/xliff12ToJs' |
2 | import { unlink, readFileSync, writeFile } from 'fs' | 2 | import { unlink, readFileSync, writeFile } from 'fs' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { buildFileLocale, I18N_LOCALES, isDefaultLocale } from '../../shared/models/i18n/i18n' | 4 | import { buildFileLocale, I18N_LOCALES, isDefaultLocale, LOCALE_FILES } from '../../shared/models/i18n/i18n' |
5 | import { eachSeries } from 'async' | 5 | import { eachSeries } from 'async' |
6 | 6 | ||
7 | const sources: string[] = [] | 7 | const 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 | ||
12 | for (const file of [ 'server', 'player' ]) { | 12 | for (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 | } |