Commit 2e10b074 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Kateryna Kostiuk

translations: convert .string files from Transifex to UTF-8

- Converts UTF-16 .string files downloaded from Transifex to UTF-8
  so they are not considered binary files for versioning.

Change-Id: I52b498efe96773046959e51cf11b4e560dc78ecc
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
parent 943c9293
#!/bin/bash
tx push -s
# don't fail on unknown byte sequences
export LC_CTYPE=C
tx pull -af --minimum-perc=1
if [ "$(uname)" == "Darwin" ]; then
option="-I"
else
option="-i"
fi
for file in `find . -name '*.strings'`; do
# Convert file if encoding is utf-16le
if [ `file $option $file | awk '{print $3;}'` = "charset=utf-16le" ]; then
echo "Converting $file..."
iconv -f UTF-16LE -t UTF-8 $file > $file.8
cp -f $file.8 $file
rm $file.8
fi
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