Fix untranslated strings checker
This commit is contained in:
parent
d69e40e509
commit
fd3731e2bc
|
@ -1,6 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
DIR="Passepartout-iOS/Global"
|
DIR_APP="Passepartout-iOS/Global"
|
||||||
FILENAME="App.strings"
|
FILENAME_APP="App.strings"
|
||||||
|
DIR_CORE="Submodules/Core/Passepartout/Resources"
|
||||||
|
FILENAME_CORE="Core.strings"
|
||||||
|
|
||||||
|
DIR=$DIR_APP
|
||||||
|
FILENAME=$FILENAME_APP
|
||||||
LANG_BASE="en"
|
LANG_BASE="en"
|
||||||
LANG_TARGET="$1"
|
LANG_TARGET="$1"
|
||||||
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
|
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
|
||||||
|
@ -8,8 +13,8 @@ STRINGS_TARGET="$DIR/$LANG_TARGET.lproj/$FILENAME"
|
||||||
IDS="string-ids.tmp"
|
IDS="string-ids.tmp"
|
||||||
TMPOUT="untranslated.tmp"
|
TMPOUT="untranslated.tmp"
|
||||||
|
|
||||||
sed -E "s/^(.+) = .*$/\1/" $STRINGS_BASE | grep '^"' >$IDS.$LANG_BASE
|
sed -E "s/^(.+) = .*$/\1/" $STRINGS_BASE | sort | grep '^"' >$IDS.$LANG_BASE
|
||||||
sed -E "s/^(.+) = .*$/\1/" $STRINGS_TARGET | grep '^"' >$IDS.$LANG_TARGET
|
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
|
diff $IDS.$LANG_BASE $IDS.$LANG_TARGET | grep "^<" | sed -E 's/^< "(.*)"$/\1/g' >$TMPOUT
|
||||||
rm -f $IDS.*
|
rm -f $IDS.*
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue