mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
resources synchronization script + synchronized resources
This commit is contained in:
parent
186251ab79
commit
40d76fdd68
24 changed files with 161 additions and 2 deletions
23
scripts/resources/synchronize.sh
Executable file
23
scripts/resources/synchronize.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
doRepair() {
|
||||
./repair.py $1 $2 | xmllint --format - | sed 's/\(toBeTranslated="true"\) \(value=".*"\)\(.*\)$/\2 \1\3/'
|
||||
}
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
part=application
|
||||
else
|
||||
part=$1
|
||||
fi
|
||||
|
||||
sed "s/ /#XXX;/g" ../../assets/resources/$part/en.xml > en.tra
|
||||
|
||||
for file in ../../assets/resources/$part/*.xml; do
|
||||
shortname=`basename $file .xml`
|
||||
if [ $shortname != en ]; then
|
||||
sed "s/ /#XXX;/g" $file > $shortname.tra
|
||||
doRepair en.tra $shortname.tra | sed "s/#XXX;/\ /g" > $file
|
||||
fi
|
||||
done
|
||||
|
||||
rm *.tra
|
Loading…
Add table
Add a link
Reference in a new issue