diff options
Diffstat (limited to 'scripts/i18n')
-rwxr-xr-x | scripts/i18n/create-custom-files.ts | 13 | ||||
-rwxr-xr-x | scripts/i18n/pull-hook.sh | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts index eed3182a6..664207e1c 100755 --- a/scripts/i18n/create-custom-files.ts +++ b/scripts/i18n/create-custom-files.ts | |||
@@ -23,12 +23,15 @@ const playerKeys = { | |||
23 | 'Speed': 'Speed', | 23 | 'Speed': 'Speed', |
24 | 'Subtitles/CC': 'Subtitles/CC', | 24 | 'Subtitles/CC': 'Subtitles/CC', |
25 | 'peers': 'peers', | 25 | 'peers': 'peers', |
26 | 'peer': 'peer', | ||
26 | 'Go to the video page': 'Go to the video page', | 27 | 'Go to the video page': 'Go to the video page', |
27 | 'Settings': 'Settings', | 28 | 'Settings': 'Settings', |
28 | 'Uses P2P, others may know you are watching this video.': 'Uses P2P, others may know you are watching this video.', | 29 | 'Uses P2P, others may know you are watching this video.': 'Uses P2P, others may know you are watching this video.', |
29 | 'Copy the video URL': 'Copy the video URL', | 30 | 'Copy the video URL': 'Copy the video URL', |
30 | 'Copy the video URL at the current time': 'Copy the video URL at the current time', | 31 | 'Copy the video URL at the current time': 'Copy the video URL at the current time', |
31 | 'Copy embed code': 'Copy embed code' | 32 | 'Copy embed code': 'Copy embed code', |
33 | 'Total downloaded: ': 'Total downloaded: ', | ||
34 | 'Total uploaded: ': 'Total uploaded: ' | ||
32 | } | 35 | } |
33 | const playerTranslations = { | 36 | const playerTranslations = { |
34 | target: join(__dirname, '../../../client/src/locale/source/player_en_US.xml'), | 37 | target: join(__dirname, '../../../client/src/locale/source/player_en_US.xml'), |
@@ -42,6 +45,12 @@ values(VIDEO_CATEGORIES) | |||
42 | .concat(values(VIDEO_PRIVACIES)) | 45 | .concat(values(VIDEO_PRIVACIES)) |
43 | .concat(values(VIDEO_STATES)) | 46 | .concat(values(VIDEO_STATES)) |
44 | .concat(values(VIDEO_IMPORT_STATES)) | 47 | .concat(values(VIDEO_IMPORT_STATES)) |
48 | .concat([ | ||
49 | 'This video does not exist.', | ||
50 | 'We cannot fetch the video. Please try again later.', | ||
51 | 'Sorry', | ||
52 | 'This video is not available because the remote instance is not responding.' | ||
53 | ]) | ||
45 | .forEach(v => serverKeys[v] = v) | 54 | .forEach(v => serverKeys[v] = v) |
46 | 55 | ||
47 | // More keys | 56 | // More keys |
@@ -103,4 +112,4 @@ function saveToXliffFile (jsonTranslations: TranslationType, cb: Function) { | |||
103 | function handleError (err: any) { | 112 | function handleError (err: any) { |
104 | console.error(err) | 113 | console.error(err) |
105 | process.exit(-1) | 114 | process.exit(-1) |
106 | } \ No newline at end of file | 115 | } |
diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh index 3a8394110..b0668436d 100755 --- a/scripts/i18n/pull-hook.sh +++ b/scripts/i18n/pull-hook.sh | |||
@@ -7,6 +7,7 @@ set -eu | |||
7 | 7 | ||
8 | for i in 1 2 3; do | 8 | for i in 1 2 3; do |
9 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml | 9 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml |
10 | perl -0pi -e 's|<source>(.+?)</source>\s*<context-group |<source>\1</source><target>\1</target><context-group |g' client/src/locale/target/angular_*.xml | ||
10 | done | 11 | done |
11 | 12 | ||
12 | npm run i18n:xliff2json | 13 | npm run i18n:xliff2json |