Skip to content

Commit

Permalink
Fix localization update script
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed May 2, 2024
1 parent 4e6df1b commit b2b17e7
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions scripts/updateLocalization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ if ! which bartycrouch > /dev/null; then
exit 1
fi

SWIFT_EMIT_LOC_STRINGS=NO
if [ "$2" != "" ]; then
SWIFT_EMIT_LOC_STRINGS="$2"
compile_swift="NO"
if [ "x$2" != "x" ]; then
compile_swift="$2"
fi

function pullCurrentState {
Expand Down Expand Up @@ -71,17 +71,19 @@ git submodule deinit --all -f
git submodule update --init --recursive --remote
pullCurrentState "$@"

echo ""
echo "*******************************************"
echo "* Building rust packages & bridge *"
echo "*******************************************"
bash ../rust/build-rust.sh
if [ "$compile_swift" == "YES" ]; then
echo ""
echo "*******************************************"
echo "* Building rust packages & bridge *"
echo "*******************************************"
bash ../rust/build-rust.sh

echo ""
echo "***************************************"
echo "* Installing macOS & iOS Pods *"
echo "***************************************"
pod install --repo-update
echo ""
echo "***************************************"
echo "* Installing macOS & iOS Pods *"
echo "***************************************"
pod install --repo-update
fi

echo ""
echo "***************************************"
Expand Down Expand Up @@ -114,7 +116,7 @@ dummy="DON'T TRANSLATE: $(head /dev/urandom | LC_ALL=C tr -dc A-Za-z0-9 | head -
x=$((1))
while [[ $x -lt 16 ]]; do
echo "STARTING RUN $x..."
while ! xcrun xcodebuild -workspace "Monal.xcworkspace" -scheme "Monal" -sdk iphoneos -configuration "Beta" -allowProvisioningUpdates -exportLocalizations -localizationPath localization.tmp -exportLanguage base SWIFT_EMIT_LOC_STRINGS=$SWIFT_EMIT_LOC_STRINGS; do
while ! xcrun xcodebuild -workspace "Monal.xcworkspace" -scheme "Monal" -sdk iphoneos -configuration "Beta" -allowProvisioningUpdates -exportLocalizations -localizationPath localization.tmp -exportLanguage base SWIFT_EMIT_LOC_STRINGS="$compile_swift"; do
echo "ERROR, TRYING AGAIN..."
done
echo "RUN $x SUCCEEDED, EXTRACTING STRINGS FROM XLIFF!"
Expand Down

0 comments on commit b2b17e7

Please sign in to comment.