mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
29 lines
506 B
Bash
Executable file
29 lines
506 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
proj=anki
|
|
|
|
if [ "$key" = "" ]; then
|
|
echo "key not defined"
|
|
exit 1
|
|
fi
|
|
|
|
# fetch translations from crowdin
|
|
if [ ! -f all.zip ]; then
|
|
curl https://api.crowdin.com/api/project/$proj/export?key=$key
|
|
curl -o all.zip https://api.crowdin.com/api/project/$proj/download/all.zip?key=$key
|
|
fi
|
|
|
|
# unzip
|
|
unzip -o all.zip
|
|
|
|
# make sure translations are valid
|
|
python check-po-files.py
|
|
|
|
rm all.zip
|
|
|
|
# send translations to github
|
|
git add translations
|
|
git commit -m update || true
|
|
git push
|