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