Skip to content

Commit f64cbb7

Browse files
authored
Merge pull request #3233 from Kaspik/localisations
Localisations skip
2 parents f9f6908 + c2a03fc commit f64cbb7

File tree

3 files changed

+86
-86
lines changed

3 files changed

+86
-86
lines changed

Scripts/localize.sh

+46-46
Original file line numberDiff line numberDiff line change
@@ -32,54 +32,54 @@
3232

3333
# Localizes all of the application's NIB files. This script should only be run by Xcode.
3434

35-
if [ "${BUILT_PRODUCTS_DIR}x" == 'x' ]
36-
then
37-
echo 'This script should only be run by Xcode. Exiting...'
38-
exit 1
39-
fi
40-
41-
echo "Running genstrings to update 'Localizable.strings'..."
42-
35+
#if [ "${BUILT_PRODUCTS_DIR}x" == 'x' ]
36+
#then
37+
# echo 'This script should only be run by Xcode. Exiting...'
38+
# exit 1
39+
#fi
40+
#
41+
#echo "Running genstrings to update 'Localizable.strings'..."
42+
#
4343
# Update 'Localizable.strings' by running genstrings(1)
44-
GENSTRINGS_ERRORS=$(genstrings -o "${SRCROOT}/Resources/English.lproj" "${SRCROOT}/Source/"*.m)
45-
44+
#GENSTRINGS_ERRORS=$(genstrings -o "${SRCROOT}/Resources/English.lproj" "${SRCROOT}/Source/"*.m)
45+
#
4646
# Check for genstrings errors
47-
if [[ ${GENSTRINGS_ERRORS} -ne 0 ]]
48-
then
49-
echo "error: genstrings exited with error: ${GENSTRINGS_ERRORS}"
50-
fi
51-
52-
echo "Updating nib and xib localisations..."
53-
47+
#if [[ ${GENSTRINGS_ERRORS} -ne 0 ]]
48+
#then
49+
# echo "error: genstrings exited with error: ${GENSTRINGS_ERRORS}"
50+
#fi
51+
#
52+
#echo "Updating nib and xib localisations..."
53+
#
5454
# Generate up-to-date nib .strings files for localisation
55-
find "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"/**/*.nib | while read nibFile
56-
do
57-
stringsFilePath="${SOURCE_ROOT}/Resources/English.lproj/`basename "${nibFile}" .nib`.strings"
58-
xibFile=`basename "${nibFile}" .nib`.xib
59-
xibFilePath=`echo "${SOURCE_ROOT}"/Interfaces/**/"${xibFile}"`
60-
61-
if [[ -e ${xibFilePath} ]]
62-
then
63-
xibfileModDate=`stat -f "%m" "${xibFilePath}"`
64-
65-
if [[ -e ${stringsFilePath} ]]
66-
then
67-
stringsFileModDate=`stat -f "%m" "${stringsFilePath}"`
68-
else
69-
stringsFileModDate=0
70-
fi
71-
72-
if [[ ${xibfileModDate} -gt ${stringsFileModDate} ]]
73-
then
74-
printf "\tLocalising ${xibFile}...\n";
75-
76-
ibtool --generate-stringsfile "${stringsFilePath}~" "${xibFilePath}"
77-
78-
"${BUILT_PRODUCTS_DIR}"/xibLocalizationPostprocessor "${stringsFilePath}~" "${stringsFilePath}"
79-
80-
rm "${stringsFilePath}~"
81-
fi
82-
fi
83-
done
55+
#find "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"/**/*.nib | while read nibFile
56+
#do
57+
# stringsFilePath="${SOURCE_ROOT}/Resources/English.lproj/`basename "${nibFile}" .nib`.strings"
58+
# xibFile=`basename "${nibFile}" .nib`.xib
59+
# xibFilePath=`echo "${SOURCE_ROOT}"/Interfaces/**/"${xibFile}"`
60+
#
61+
# if [[ -e ${xibFilePath} ]]
62+
# then
63+
# xibfileModDate=`stat -f "%m" "${xibFilePath}"`
64+
#
65+
# if [[ -e ${stringsFilePath} ]]
66+
# then
67+
# stringsFileModDate=`stat -f "%m" "${stringsFilePath}"`
68+
# else
69+
# stringsFileModDate=0
70+
# fi
71+
#
72+
# if [[ ${xibfileModDate} -gt ${stringsFileModDate} ]]
73+
# then
74+
# printf "\tLocalising ${xibFile}...\n";
75+
#
76+
# ibtool --generate-stringsfile "${stringsFilePath}~" "${xibFilePath}"
77+
#
78+
# "${BUILT_PRODUCTS_DIR}"/xibLocalizationPostprocessor "${stringsFilePath}~" "${stringsFilePath}"
79+
#
80+
# rm "${stringsFilePath}~"
81+
# fi
82+
# fi
83+
#done
8484

8585
exit 0

Scripts/nightlybuildscript.sh

+37-37
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ then
4545
fi
4646

4747
IBSTRINGSDIR=ibstrings
48-
XIB_BASE="$GIT_DIR/Interfaces/English.lproj"
48+
#XIB_BASE="$GIT_DIR/Interfaces/English.lproj"
4949

5050
echo "Cleaning remains of any previous nightly builds..."
5151

@@ -56,39 +56,39 @@ rm -f languagetranslations.zip &> /dev/null
5656
rm -rf languagetranslations &> /dev/null
5757
rm -rf $IBSTRINGSDIR &> /dev/null
5858

59-
echo "Creating IB strings files for rekeying..."
60-
mkdir -p $IBSTRINGSDIR/English.lproj
61-
find "$XIB_BASE" \( -name "*.xib" \) | while read FILE; do
62-
printf "\t$(basename ${FILE})\n"
63-
ibtool "$FILE" --export-strings-file "$IBSTRINGSDIR/English.lproj/`basename "$FILE" .xib`.strings"
64-
done
59+
#echo "Creating IB strings files for rekeying..."
60+
#mkdir -p $IBSTRINGSDIR/English.lproj
61+
#find "$XIB_BASE" \( -name "*.xib" \) | while read FILE; do
62+
# printf "\t$(basename ${FILE})\n"
63+
# ibtool "$FILE" --export-strings-file "$IBSTRINGSDIR/English.lproj/`basename "$FILE" .xib`.strings"
64+
#done
6565

66-
echo "Downloading localizations to merge in..."
66+
#echo "Downloading localizations to merge in..."
6767
# Download the latest language translations, and copy them into the Resources directory
68-
curl http://dev.sequelpro.com/translate/download/sequelpro > languagetranslations.zip
69-
unzip -q languagetranslations.zip -d languagetranslations
70-
71-
echo "Rekeying localization files, translating xibs, merging localizations..."
72-
find languagetranslations/Resources \( -name "*.lproj" \) | while read FILE; do
73-
loc=`basename "$FILE"`
74-
mkdir "$IBSTRINGSDIR/$loc"
75-
printf "\tRekeying localization: $loc\n"
76-
find "$FILE" \( -name "*.strings" \) | while read STRFILE; do
77-
file=`basename "$STRFILE" .strings`
78-
printf "\t\tFile: $file\n"
79-
ibkeyfile="$IBSTRINGSDIR/English.lproj/$file.strings"
80-
xibfile="$XIB_BASE/$file.xib"
81-
transfile="$IBSTRINGSDIR/$loc/$file.strings"
82-
if [ -e "$ibkeyfile" ] && [ -e "$xibfile" ]; then
83-
$BUILD_DIR/xibLocalizationPostprocessor "$STRFILE" "$ibkeyfile" "$transfile"
68+
#curl http://dev.sequelpro.com/translate/download/sequelpro > languagetranslations.zip
69+
#unzip -q languagetranslations.zip -d languagetranslations
70+
#
71+
#echo "Rekeying localization files, translating xibs, merging localizations..."
72+
#find languagetranslations/Resources \( -name "*.lproj" \) | while read FILE; do
73+
# loc=`basename "$FILE"`
74+
# mkdir "$IBSTRINGSDIR/$loc"
75+
# printf "\tRekeying localization: $loc\n"
76+
# find "$FILE" \( -name "*.strings" \) | while read STRFILE; do
77+
# file=`basename "$STRFILE" .strings`
78+
# printf "\t\tFile: $file\n"
79+
# ibkeyfile="$IBSTRINGSDIR/English.lproj/$file.strings"
80+
# xibfile="$XIB_BASE/$file.xib"
81+
# transfile="$IBSTRINGSDIR/$loc/$file.strings"
82+
# if [ -e "$ibkeyfile" ] && [ -e "$xibfile" ]; then
83+
# $BUILD_DIR/xibLocalizationPostprocessor "$STRFILE" "$ibkeyfile" "$transfile"
8484
#we no longer need the original file and don't want to copy it
85-
rm -f "$STRFILE"
86-
ibtool "$xibfile" --import-strings-file "$transfile" --compile "languagetranslations/Resources/$loc/$file.nib"
87-
fi
88-
done
89-
printf "\tCopying localization: $loc\n"
90-
cp -R "$FILE" "Sequel Pro.app/Contents/Resources/"
91-
done
85+
# rm -f "$STRFILE"
86+
# ibtool "$xibfile" --import-strings-file "$transfile" --compile "languagetranslations/Resources/$loc/$file.nib"
87+
# fi
88+
# done
89+
# printf "\tCopying localization: $loc\n"
90+
# cp -R "$FILE" "Sequel Pro.app/Contents/Resources/"
91+
#done
9292

9393
#echo "Copying nightly icon"
9494

@@ -108,11 +108,11 @@ php -r '$infoplistloc = "'$BUILD_DIR'/Sequel Pro.app/Contents/Info.plist";
108108

109109
# Update versions in localised string files
110110
php -r '$englishstringsloc = "/'$BUILD_DIR'/Sequel Pro.app/Contents/Resources/English.lproj/InfoPlist.strings";
111-
$englishstrings = file_get_contents($englishstringsloc);
112-
$englishstrings = mb_convert_encoding($englishstrings, "UTF-8", "UTF-16");
113-
$englishstrings = preg_replace("/version [^\,\"]+/iu", "nightly build for r'$SHORT_HASH'", $englishstrings);
114-
$englishstrings = mb_convert_encoding($englishstrings, "UTF-16", "UTF-8");
115-
file_put_contents($englishstringsloc, $englishstrings);'
111+
$englishstrings = file_get_contents($englishstringsloc);
112+
$englishstrings = mb_convert_encoding($englishstrings, "UTF-8", "UTF-16");
113+
$englishstrings = preg_replace("/version [^\,\"]+/iu", "nightly build for r'$SHORT_HASH'", $englishstrings);
114+
$englishstrings = mb_convert_encoding($englishstrings, "UTF-16", "UTF-8");
115+
file_put_contents($englishstringsloc, $englishstrings);'
116116

117117
echo "Signing build..."
118118

@@ -186,4 +186,4 @@ then
186186
exit 1
187187
fi
188188

189-
echo "Done!"
189+
echo "Done!"

readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Sequel Pro <img alt="Logo" src="https://sequelpro.com/images/logo.png" align="right" height="50">
2-
==========
2+
=======
33

44
Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL & MariaDB databases.
55

@@ -8,7 +8,7 @@ You can find more details on our website: [sequelpro.com](https://sequelpro.com)
88
![Screenshot](https://sequelpro.com/images/browse.png)
99

1010
Build Instructions
11-
==================
11+
=======
1212

1313
* Install the [latest version of Xcode](https://itunes.apple.com/au/app/xcode/id497799835)
1414
* Install [GitHub for Mac](https://desktop.github.com/) (or [SourceTree](https://www.sourcetreeapp.com/), or [](https://git-scm.com/downloads/guis))
@@ -18,7 +18,7 @@ Build Instructions
1818
* If the above doesn't work, please file a [bug report](https://github.com/sequelpro/sequelpro/issues/new)
1919

2020
Contributing
21-
============
21+
=======
2222

2323
The best way to help the project is to use our [test builds](https://sequelpro.com/test-builds) and report any issues (both bugs and missing features) in [the issue tracker](https://github.com/sequelpro/sequelpro/issues). If you want to get more involved, then you can comment on issues written by other people or send us a pull request.
2424

0 commit comments

Comments
 (0)