Fix i18n generation script

pull/2166/head
Chocobozzz 2019-10-22 10:30:09 +02:00
parent 009d581e2d
commit 1cd4fe501d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 4984 additions and 4025 deletions

View File

@ -5,7 +5,7 @@
<polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/>
</svg>
<p class="bottom-message">Welcome on PeerTube!</p>
<p i18n class="bottom-message">Welcome on PeerTube!</p>
<div *ngIf="message" class="alert alert-success">
<p>{{ message }}</p>

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 808 B

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
set -eu
cd client
npm run ng -- xi18n --i18n-locale "en-US" --output-path locale/source --out-file angular_en_US.xml
npm run ng -- xi18n --i18n-locale "en-US" --output-path src/locale/source --out-file angular_en_US.xml
npm run ngx-extractor -- --locale "en-US" -i 'src/**/*.ts' -f xlf -o src/locale/source/angular_en_US.xml
# Zanata does not support inner elements in <source>, so we hack these special elements
@ -12,4 +12,4 @@ perl -pi -e 's|<x id=(.+?)/>|&lt;x id=\1/&gt;|g' src/locale/source/angular_en_US
# Add our strings too
cd ../
npm run i18n:create-custom-files
npm run i18n:create-custom-files

View File

@ -2,7 +2,7 @@
set -eu
for i in $(seq 1 200); do
for i in $(seq 1 10); do
# Angular does not like when there is not target element, so we create it with the same content than the source element
perl -0pi -e 's#<source>([^<]+)</source>\s*<context-group #<source>\1</source><target>\1</target><context-group #g' client/src/locale/target/angular_*.xml