blob: 8cf95d162a4f9c49cdb5a157f82bf946e50d2750 [file] [log] [blame]
Andreas Traczyk3f7eb1d2017-12-12 11:10:27 -05001#!/bin/bash
2
Andreas Traczyk2e10b072017-12-26 13:52:23 -05003# don't fail on unknown byte sequences
4export LC_CTYPE=C
5
Andreas Traczyk3f7eb1d2017-12-12 11:10:27 -05006tx pull -af --minimum-perc=1
Andreas Traczyk2e10b072017-12-26 13:52:23 -05007
8if [ "$(uname)" == "Darwin" ]; then
9 option="-I"
10else
11 option="-i"
12fi
13
14for file in `find . -name '*.strings'`; do
15 # Convert file if encoding is utf-16le
16 if [ `file $option $file | awk '{print $3;}'` = "charset=utf-16le" ]; then
17 echo "Converting $file..."
18 iconv -f UTF-16LE -t UTF-8 $file > $file.8
19 cp -f $file.8 $file
20 rm $file.8
21 fi
22done