contrib/locale/push_locale: add comments re proofreader-approval
What changed, and why it matters
This commit only adds explanatory comments to a locale-pushing script. It does not change any security-relevant behavior: the commented-out setting remains off, and the new note just reminds future maintainers to verify translation-download settings elsewhere. There is no vulnerability or security fix here.
No action required; this is a non-security documentation/comment change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in contrib/locale/push_locale.py changes a Crowdin API call from requests.request(“POST”, url, headers=headers) to requests.request(“POST”, url, json=json_data, headers=headers), where json_data is an empty dict containing only a commented-out ‘exportApprovedOnly’: True key and a comment that download-time settings must be verified by electrum-locale/update.py. Functionally the request body is still empty JSON, so behavior is unchanged. The commit is documentation-only.
Changed components
contrib/locale/push_locale.pyInspect captured patch +4 / −1
diff --git a/contrib/locale/push_locale.py b/contrib/locale/push_locale.py
index bd4c847..b54c3a0 100755
--- a/contrib/locale/push_locale.py
+++ b/contrib/locale/push_locale.py
@@ -137,6 +137,9 @@ print("", "source_files.update_file:", "-" * 20, response.text, "-" * 20, sep="\
print(f"Rebuilding translations...")
url = f'https://api.crowdin.com/api/v2/projects/{crowdin_project_id}/translations/builds'
headers = {**global_headers, **{"content-type": "application/json"}}
-response = requests.request("POST", url, headers=headers)
+json_data = {
+ #"exportApprovedOnly": True, # only include translated-strings approved by users with "Proofreader" permission
+} # note: these settings MUST be verified by electrum-locale/update.py again, at download-time.
+response = requests.request("POST", url, json=json_data, headers=headers)
response.raise_for_status()
print("", "translations.build_crowdin_project_translation:", "-" * 20, response.text, "-" * 20, sep="\n")
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.