Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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