davx5/scripts/fetch-translations.sh

18 lines
590 B
Bash
Raw Normal View History

2025-11-20 14:05:57 +01:00
#!/bin/sh
export TX_TOKEN=`awk '/token *=/ { print $3; }' <$HOME/.transifexrc`
cd `pwd $0`/..
tx pull -a -f --use-git-timestamps
if find app/src -type d -name 'values-*_*' -exec false '{}' +
then
echo "No values-XX_RR directory found, good"
else
echo "Found values-XX_RR directory, update .tx/config mappings to values-XX-rRR!"
exit 1
fi
curl -H "Authorization: Bearer $TX_TOKEN" 'https://rest.api.transifex.com/team_memberships?filter\[organization\]=o:bitfireAT&filter\[team\]=o:bitfireAT:t:davx5-team' \
| scripts/rewrite-translators.rb >app/src/main/assets/translators.json