-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlokalise_pull.sh
More file actions
executable file
·33 lines (28 loc) · 835 Bytes
/
lokalise_pull.sh
File metadata and controls
executable file
·33 lines (28 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# Exit on error
set -e
# Replace with your actual token and project ID
LOKALISE_TOKEN=""
PROJECT_ID=""
# Pull translations from Lokalise
unzip_folder="lokalise"
resource_folder="iOSApp/Resources"
if ! command -v lokalise2 &> /dev/null; then
echo "lokalise2 CLI not found, installing with Homebrew..."
if command -v brew &> /dev/null; then
brew tap lokalise/cli-2
brew install lokalise2 || { echo "Failed to install lokalise2 CLI"; exit 1; }
else
echo "Homebrew not found. Please install Homebrew first: https://brew.sh/"
exit 1
fi
fi
lokalise2 \
--token "$LOKALISE_TOKEN" \
--project-id "$PROJECT_ID" \
file download \
--format strings \
--original-filenames=true \
--bundle-structure "%LANG_ISO%/Localizable.strings" \
--unzip-to "$resource_folder" \
--export-sort first_added \