From cd858f2bccf254daf6b51ee31c8bfb0a470b3efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20M=C3=B6sner?= Date: Wed, 4 Jan 2023 15:55:50 +0100 Subject: [PATCH 1/3] scripts: move apiKey to headers for update translations --- scripts/download_translations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/download_translations.py b/scripts/download_translations.py index a4592a807..4fd89f5ea 100644 --- a/scripts/download_translations.py +++ b/scripts/download_translations.py @@ -33,7 +33,7 @@ print(sys.argv[1]) -apiurl = f"https://app.tolgee.io/v2/projects/1205/export?format=JSON&splitByScope=false&splitByScopeDelimiter=~&splitByScopeDepth=0&filterState=UNTRANSLATED&filterState=TRANSLATED&filterState=REVIEWED&zip=true&ak={apikey}" +apiurl = f"https://app.tolgee.io/v2/projects/1205/export?format=JSON&splitByScope=false&splitByScopeDelimiter=~&splitByScopeDepth=0&filterState=UNTRANSLATED&filterState=TRANSLATED&filterState=REVIEWED&zip=true" try: import requests @@ -50,7 +50,7 @@ print(" Downloading updated translations...") -response = requests.get(apiurl) +response = requests.get(apiurl, headers={"X-API-Key": apikey}) if (not response.ok): statusCode = response.status_code print(f" Error {statusCode}: {response.text}") From 25699d29df8930435a340b406f1fad9a47e57e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20M=C3=B6sner?= Date: Wed, 4 Jan 2023 15:59:39 +0100 Subject: [PATCH 2/3] scoop: buckets no longer loads if is scoop disabled --- wingetui/uiSections.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wingetui/uiSections.py b/wingetui/uiSections.py index a5ef9041d..fb8fb54da 100644 --- a/wingetui/uiSections.py +++ b/wingetui/uiSections.py @@ -2605,6 +2605,8 @@ def __init__(self): def loadBuckets(self): + if getSettings("DisableScoop"): + return for i in range(self.bucketList.topLevelItemCount()): item = self.bucketList.takeTopLevelItem(0) del item From 6232a37eb5e5f2a47d94afacf3057beae370c0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20M=C3=B6sner?= Date: Wed, 11 Jan 2023 14:25:23 +0100 Subject: [PATCH 3/3] scripts: update api request for translations --- scripts/download_translations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download_translations.py b/scripts/download_translations.py index 4fd89f5ea..9a62074f7 100644 --- a/scripts/download_translations.py +++ b/scripts/download_translations.py @@ -33,7 +33,7 @@ print(sys.argv[1]) -apiurl = f"https://app.tolgee.io/v2/projects/1205/export?format=JSON&splitByScope=false&splitByScopeDelimiter=~&splitByScopeDepth=0&filterState=UNTRANSLATED&filterState=TRANSLATED&filterState=REVIEWED&zip=true" +apiurl = f"https://app.tolgee.io/v2/projects/1205/export?format=JSON&structureDelimiter=&filterState=UNTRANSLATED&filterState=TRANSLATED&filterState=REVIEWED&zip=true" try: import requests