blob: 460690de718aaa0c9d18641d317d76b1d79c020f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
if [ -z "${CROWDIN_API}" ]; then
echo "Could not find crowdin API environment variable at CROWDIN_API."
exit 1
fi
UPDATE_OPTION=""
if [ "$1" == "keep" ]; then
echo "Updating string and keeping previous translations..."
UPDATE_OPTION="&update_option=update_as_unapproved"
elif [ "$1" == "remove" ]; then
echo "Updating string and removing previous translations..."
UPDATE_OPTION=""
else
echo "Please specify update option ('keep', 'remove') for translations"
exit 1
fi
curl \
-F "files[strings.xml]=@ime/app/src/main/res/values/strings.xml" \
"https://api.crowdin.com/api/project/anysoftkeyboard/update-file?key=${CROWDIN_API}${UPDATE_OPTION}"
|