summaryrefslogtreecommitdiffstats
path: root/resources/update-locales.sh
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-20 13:56:53 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-20 13:56:53 +0200
commit143dc421c812da6b101a38600967ef243405fb13 (patch)
tree052a100aab9d01b0111a7540819c2295cbc78141 /resources/update-locales.sh
parentb2aec1d81691ce054a5eb4742f18b2fd62d9cb33 (diff)
downloadnextcloud-server-143dc421c812da6b101a38600967ef243405fb13.tar.gz
nextcloud-server-143dc421c812da6b101a38600967ef243405fb13.zip
Update locales with transifex data
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'resources/update-locales.sh')
-rwxr-xr-xresources/update-locales.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/resources/update-locales.sh b/resources/update-locales.sh
new file mode 100755
index 00000000000..6fe5fe541c2
--- /dev/null
+++ b/resources/update-locales.sh
@@ -0,0 +1,11 @@
+#!/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