aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-03-09 21:28:28 +0100
committerMax <post@wickenrode.com>2015-03-09 21:28:28 +0100
commit8b1ff9c9b8a996ff0c6321e58709c25f0c5763c1 (patch)
tree23d045d4dd5f732d47c8ae640c939b10015e00fd /Scripts
parent784876380b871b6d85978a705e2477e7b7d2d984 (diff)
downloadsequelpro-8b1ff9c9b8a996ff0c6321e58709c25f0c5763c1.tar.gz
sequelpro-8b1ff9c9b8a996ff0c6321e58709c25f0c5763c1.tar.bz2
sequelpro-8b1ff9c9b8a996ff0c6321e58709c25f0c5763c1.zip
Update nightly build script for temporary translation workaround, improve xibLocalizationPostprocessor robustness
Diffstat (limited to 'Scripts')
-rwxr-xr-xScripts/nightlybuildscript.sh34
1 files changed, 31 insertions, 3 deletions
diff --git a/Scripts/nightlybuildscript.sh b/Scripts/nightlybuildscript.sh
index 0655af44..ca312f64 100755
--- a/Scripts/nightlybuildscript.sh
+++ b/Scripts/nightlybuildscript.sh
@@ -44,6 +44,9 @@ then
exit 1
fi
+IBSTRINGSDIR=ibstrings
+XIB_BASE="$GIT_DIR/Interfaces/English.lproj"
+
echo "Cleaning remains of any previous nightly builds..."
# Delete any previous disk images and translation files
@@ -51,15 +54,40 @@ rm -f *.dmg &> /dev/null
rm -rf disttemp &> /dev/null
rm -f languagetranslations.zip &> /dev/null
rm -rf languagetranslations &> /dev/null
+rm -rf $IBSTRINGSDIR &> /dev/null
-echo "Downloading localizations to merge in..."
+echo "Creating IB strings files for rekeying..."
+mkdir -p $IBSTRINGSDIR/English.lproj
+find "$XIB_BASE" \( -name "*.xib" \) | while read FILE; do
+ printf "\t$(basename ${FILE})\n"
+ ibtool "$FILE" --export-strings-file "$IBSTRINGSDIR/English.lproj/`basename "$FILE" .xib`.strings"
+done
+echo "Downloading localizations to merge in..."
# Download the latest language translations, and copy them into the Resources directory
curl http://dev.sequelpro.com/translate/download/sequelpro > languagetranslations.zip
unzip -q languagetranslations.zip -d languagetranslations
+
+echo "Rekeying localization files, translating xibs, merging localizations..."
find languagetranslations/Resources \( -name "*.lproj" \) | while read FILE; do
- printf "\tCopying localization: $(basename ${FILE})\n"
- cp -R "$FILE" "Sequel Pro.app/Contents/Resources/"
+ loc=`basename "$FILE"`
+ mkdir "$IBSTRINGSDIR/$loc"
+ printf "\tRekeying localization: $loc\n"
+ find "$FILE" \( -name "*.strings" \) | while read STRFILE; do
+ file=`basename "$STRFILE" .strings`
+ printf "\t\tFile: $file\n"
+ ibkeyfile="$IBSTRINGSDIR/English.lproj/$file.strings"
+ xibfile="$XIB_BASE/$file.xib"
+ transfile="$IBSTRINGSDIR/$loc/$file.strings"
+ if [ -e "$ibkeyfile" ] && [ -e "$xibfile" ]; then
+ $BUILD_DIR/xibLocalizationPostprocessor "$STRFILE" "$ibkeyfile" "$transfile"
+ #we no longer need the original file and don't want to copy it
+ rm -f "$STRFILE"
+ ibtool "$xibfile" --import-strings-file "$transfile" --compile "languagetranslations/Resources/$loc/$file.nib"
+ fi
+ done
+ printf "\tCopying localization: $loc\n"
+ cp -R "$FILE" "Sequel Pro.app/Contents/Resources/"
done
echo "Copying nightly icon"