2019-04-07 13:43:31 +00:00
|
|
|
#!/bin/sh
|
|
|
|
DIR="Passepartout/Resources"
|
|
|
|
FILENAME="Localizable.strings"
|
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"
|
|
|
|
|
2019-04-11 12:30:15 +00:00
|
|
|
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'
|
2019-04-07 13:43:31 +00:00
|
|
|
rm -f $IDS.*
|