aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-07-27 11:51:31 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-08-18 09:49:17 +0200
commit4a5197ed48b22a24c5e150b9308ee4c149bec89e (patch)
tree92dd59fa06cf18b0aa0a3ac0193637dc2606e6e9 /Makefile
parenttunnel: use conn.BindSocketToInterface type (diff)
downloadwireguard-windows-4a5197ed48b22a24c5e150b9308ee4c149bec89e.tar.xz
wireguard-windows-4a5197ed48b22a24c5e150b9308ee4c149bec89e.zip
locale: sync translations and rework enumeration
We now enumerate directories in locale/ and rename them if Crowdin is giving us a different language code. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 446ddd34..0a30d8c1 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,13 @@ generate: export CGO_ENABLED := 0
generate:
go generate ./...
+crowdin:
+ find locales -maxdepth 1 -mindepth 1 -type d \! -name en -exec rm -rf {} +
+ @[[ -n $$CROWDIN_API_KEY ]] || read -r -p "Enter Crowdin API key: " CROWDIN_API_KEY && \
+ curl -Lo - https://api.crowdin.com/api/project/WireGuard/download/all.zip?key=$$CROWDIN_API_KEY | bsdtar -C locales -x -f - --strip-components 2 wireguard-windows
+ find locales -name messages.gotext.json -exec bash -c '[[ $$(jq ".messages | length" {}) -ne 0 ]] || rm -rf "$$(dirname {})"' \;
+ @$(MAKE) --no-print-directory generate
+
deploy: amd64/wireguard.exe
-ssh $(DEPLOYMENT_HOST) -- 'taskkill /im wireguard.exe /f'
scp $< $(DEPLOYMENT_HOST):$(DEPLOYMENT_PATH)