diff options
| author | mojganii <mojgan.jelodar@mullvad.net> | 2025-09-02 16:29:34 +0200 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2025-09-03 12:50:23 +0200 |
| commit | 32a2024a1d3c4a593e9f134f38babc881b49e7cb (patch) | |
| tree | 92d9916058f191da560881a115f02a36d03ebeee /scripts | |
| parent | 61ce57ec6dc117bdea664a9769d2746372ccef2d (diff) | |
| download | mullvadvpn-32a2024a1d3c4a593e9f134f38babc881b49e7cb.tar.xz mullvadvpn-32a2024a1d3c4a593e9f134f38babc881b49e7cb.zip | |
Add iOS localization to the pipeline
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/localization | 27 |
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 "$@" |
