summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/localization27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/localization b/scripts/localization
index 084f61661c..ac0bf99240 100755
--- a/scripts/localization
+++ b/scripts/localization
@@ -62,6 +62,9 @@ function prepare_localization_strings {
update_relay_locations_pot
commit_changes "Update relay-locations.pot"
+
+ update_ios_strings export
+ commit_changes "Update en.xliff"
}
function ensure_crowdin_api_key {
@@ -77,6 +80,11 @@ function upload_to_crowdin {
crowdin upload sources
crowdin upload translations
popd
+
+ pushd ../ios/translation
+ crowdin upload sources
+ crowdin upload translations
+ popd
}
function download_from_crowdin {
@@ -87,9 +95,17 @@ function download_from_crowdin {
crowdin download
popd
+ pushd ../ios/translation
+ crowdin download
+ popd
+
# Add new translations to Android xml-files
log_header "Updating Android xml-files with new translations"
sync_localizations
+
+ # Add new translations to iOS source code
+ update_ios_strings import
+
commit_changes "Update translations"
}
@@ -110,6 +126,17 @@ function verify {
exit 1
fi
}
+function update_ios_strings {
+ if [ $# -ne 1 ] || { [ "$1" != "export" ] && [ "$1" != "import" ]; }; then
+ echo "Usage: update_ios_strings [export|import]" >&2
+ return 2
+ fi
+ if [ "$1" = "export" ]; then
+ log_header "Extracting strings from iOS app source code"
+ else
+ log_header "Updating strings into iOS app source code with new translations"
+ fi
+}
main "$@"