Fix i18n generation script
This commit is contained in:
parent
009d581e2d
commit
1cd4fe501d
4 changed files with 4984 additions and 4025 deletions
|
@ -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
|
@ -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=(.+?)/>|<x id=\1/>|g' src/locale/source/angular_en_US
|
|||
|
||||
# Add our strings too
|
||||
cd ../
|
||||
npm run i18n:create-custom-files
|
||||
npm run i18n:create-custom-files
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue