Merge branch 'automate-strings-export'
This commit is contained in:
commit
bf64bd7db0
|
@ -16,3 +16,4 @@ dist/
|
|||
templates/
|
||||
.env.secret*
|
||||
Preview.html
|
||||
l10n
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
DIST="l10n"
|
||||
DIST_APP="$DIST/App"
|
||||
DIST_META="$DIST/Meta"
|
||||
OUTPUT="passepartout-translations.zip"
|
||||
|
||||
rm -rf $OUTPUT $DIST
|
||||
mkdir -p $DIST_APP
|
||||
mkdir -p $DIST_META
|
||||
|
||||
if [[ $1 == "all" ]]; then
|
||||
cp Submodules/Core/Passepartout/Resources/en.lproj/Core.strings $DIST_APP/Core.txt
|
||||
cp Submodules/Core/Passepartout/Resources/en.lproj/Intents.strings $DIST_APP/Intents.txt
|
||||
cp Passepartout-iOS/Global/en.lproj/App.strings $DIST_APP/App.txt
|
||||
cp Passepartout-iOS/en.lproj/InfoPlist.strings $DIST_APP/InfoPlist.txt
|
||||
|
||||
cp fastlane/metadata/en-US/name.txt $DIST_META
|
||||
cp fastlane/metadata/en-US/subtitle.txt $DIST_META
|
||||
cp fastlane/metadata/en-US/description.txt $DIST_META
|
||||
elif [[ $1 == "new" ]]; then
|
||||
grep -f templates/new-strings.txt Submodules/Core/Passepartout/Resources/en.lproj/Core.strings >$DIST_APP/Core.txt
|
||||
grep -f templates/new-strings.txt Submodules/Core/Passepartout/Resources/en.lproj/Intents.strings >$DIST_APP/Intents.txt
|
||||
grep -f templates/new-strings.txt Passepartout-iOS/Global/en.lproj/App.strings >$DIST_APP/App.txt
|
||||
grep -f templates/new-strings.txt Passepartout-iOS/en.lproj/InfoPlist.strings >$DIST_APP/InfoPlist.txt
|
||||
else
|
||||
echo "No argument given (all|new)"
|
||||
exit
|
||||
fi
|
||||
|
||||
cp templates/iaps.txt $DIST/Products.txt
|
||||
zip -r $OUTPUT $DIST
|
|
@ -4,8 +4,14 @@ FILENAME_APP="App.strings"
|
|||
DIR_CORE="Submodules/Core/Passepartout/Resources"
|
||||
FILENAME_CORE="Core.strings"
|
||||
|
||||
DIR=$DIR_APP
|
||||
FILENAME=$FILENAME_APP
|
||||
if [[ $2 = "core" ]]; then
|
||||
DIR=$DIR_CORE
|
||||
FILENAME=$FILENAME_CORE
|
||||
else
|
||||
DIR=$DIR_APP
|
||||
FILENAME=$FILENAME_APP
|
||||
fi
|
||||
|
||||
LANG_BASE="en"
|
||||
LANG_TARGET="$1"
|
||||
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
|
||||
|
|
Loading…
Reference in New Issue