passepartout-apple/ci/list-untranslated.sh

23 lines
667 B
Bash
Raw Normal View History

2019-04-07 13:43:31 +00:00
#!/bin/sh
2019-07-26 22:23:31 +00:00
DIR_APP="Passepartout-iOS/Global"
FILENAME_APP="App.strings"
DIR_CORE="Submodules/Core/Passepartout/Resources"
FILENAME_CORE="Core.strings"
DIR=$DIR_APP
FILENAME=$FILENAME_APP
2019-04-11 12:30:15 +00:00
LANG_BASE="en"
LANG_TARGET="$1"
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
STRINGS_TARGET="$DIR/$LANG_TARGET.lproj/$FILENAME"
2019-04-07 13:43:31 +00:00
IDS="string-ids.tmp"
TMPOUT="untranslated.tmp"
2019-04-07 13:43:31 +00:00
2019-07-26 22:23:31 +00:00
sed -E "s/^(.+) = .*$/\1/" $STRINGS_BASE | sort | grep '^"' >$IDS.$LANG_BASE
sed -E "s/^(.+) = .*$/\1/" $STRINGS_TARGET | sort | grep '^"' >$IDS.$LANG_TARGET
diff $IDS.$LANG_BASE $IDS.$LANG_TARGET | grep "^<" | sed -E 's/^< "(.*)"$/\1/g' >$TMPOUT
2019-04-07 13:43:31 +00:00
rm -f $IDS.*
grep -f $TMPOUT $STRINGS_BASE
rm $TMPOUT