Commit 004ccbb5 authored by Alexandre Lision's avatar Alexandre Lision

i18n: fix update-translations script

- iterating through language dirs was not working properly.
- add some debug output

Issue: #80347
Change-Id: I97b99f635e2c5f0482e986832b6f3dc9bb14fc97
parent fb0499e0
...@@ -26,21 +26,21 @@ ...@@ -26,21 +26,21 @@
tx pull -a --minimum-perc=75 tx pull -a --minimum-perc=75
cd ui/ cd ui/
# List languages pulled for dir in '$(find . -name "*.lproj" -type d)'; do
languages="$(ls -1)"
for dir in "${languages[@]}"; do
cd $dir cd $dir
echo "$dir..."
# in each country dir cleanup the files # in each country dir cleanup the files
for file in `find . -name '*.strings'`; do for file in `find . -name '*.strings'`; do
# Convert file if encoding is utf-16le # Convert file if encoding is utf-16le
if [ `file -I $file | awk '{print $3;}'` = "charset=utf-16le" ]; then if [ `file -I $file | awk '{print $3;}'` = "charset=utf-16le" ]; then
echo "Converting $file..."
iconv -f UTF-16LE -t UTF-8 $file > $file.8 iconv -f UTF-16LE -t UTF-8 $file > $file.8
else else
mv $file $file.8 mv $file $file.8
fi fi
# Empty first line # Empty first line
echo "Cleaning up $file"
sed '1s/.*//' $file.8 > $file sed '1s/.*//' $file.8 > $file
rm $file.8 rm $file.8
done done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment