Add parameter to list untranslated

This commit is contained in:
Davide De Rosa 2019-04-11 14:30:15 +02:00
parent 4bb535be6d
commit 1d91e484b9
1 changed files with 7 additions and 5 deletions

View File

@ -1,11 +1,13 @@
#!/bin/sh
DIR="Passepartout/Resources"
FILENAME="Localizable.strings"
STRINGS_EN="$DIR/en.lproj/$FILENAME"
STRINGS_IT="$DIR/it.lproj/$FILENAME"
LANG_BASE="en"
LANG_TARGET="$1"
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
STRINGS_TARGET="$DIR/$LANG_TARGET.lproj/$FILENAME"
IDS="string-ids.tmp"
sed -E "s/^(.+) = .*$/\1/" $STRINGS_EN | grep '^"' >$IDS.en
sed -E "s/^(.+) = .*$/\1/" $STRINGS_IT | grep '^"' >$IDS.it
diff $IDS.en $IDS.it | grep "^<" | sed -E 's/^< "(.*)"$/\1/g'
sed -E "s/^(.+) = .*$/\1/" $STRINGS_BASE | grep '^"' >$IDS.$LANG_BASE
sed -E "s/^(.+) = .*$/\1/" $STRINGS_TARGET | grep '^"' >$IDS.$LANG_TARGET
diff $IDS.$LANG_BASE $IDS.$LANG_TARGET | grep "^<" | sed -E 's/^< "(.*)"$/\1/g'
rm -f $IDS.*