server/resources/update-locales.sh
John Molakvoæ (skjnldsv) 143dc421c8
Update locales with transifex data
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-09-20 13:56:53 +02:00

11 lines
397 B
Bash
Executable file

#!/bin/env bash
URL="https://raw.githubusercontent.com/transifex/transifex/master/transifex/languages/fixtures/all_languages.json"
CMDS="curl jq"
for i in $CMDS
do
# command -v will return >0 when the $i is not found
command -v $i >/dev/null && continue || { echo "$i command not found."; exit 1; }
done
curl $URL | jq '[.[] | {code: .fields.code, name: .fields.name}]' > locales.json