From 0fce58519314e666b7c8b620a7f5fc837c9938d7 Mon Sep 17 00:00:00 2001 From: flow0284 Date: Sun, 25 Oct 2020 01:20:34 +0200 Subject: [PATCH] Add files via upload --- .github/workflows/get-translations.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/get-translations.sh diff --git a/.github/workflows/get-translations.sh b/.github/workflows/get-translations.sh new file mode 100644 index 0000000..c6f9938 --- /dev/null +++ b/.github/workflows/get-translations.sh @@ -0,0 +1,13 @@ +#!/bin/bash +function get-translations(){ + curl -H "X-Api-Token: bd16e94f-a16e-4446-a8ee-88ce6a862a4f" -X GET -H \ + "Content-type: application/json" \ + >temp.lua \ + "https://wow.curseforge.com/api/projects/82538/localization/export?lang=$1" + + sed -e '/--.*$/{r temp.lua' -e 'd}' ProspectButton/locales/$1.lua >temp2.lua + awk '{gsub("\\\\\\\\n", "\\n", $0); print}' temp2.lua >temp.lua + mv temp.lua ProspectButton/locales/$1.lua + rm temp2.lua +} +get-translations $1