From 4b69d93660905b458fee041bbed481225a6b18de Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 7 Feb 2026 09:15:09 +0100 Subject: [PATCH] Auto-update cheatsheets after updating translation I keep forgetting to do this, and I think there's no reason to update translations without also updating cheatsheets, so do it automatically. --- scripts/update_language_files.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/update_language_files.sh b/scripts/update_language_files.sh index 815b095a3..3b8654b53 100755 --- a/scripts/update_language_files.sh +++ b/scripts/update_language_files.sh @@ -18,6 +18,8 @@ fi download_dir="$1" +echo "Updating translations..." + # The Portuguese translation is named pt-PT, but we want to use pt instead (it # is used both for Brasilian and European Portuguese). I couldn't figure out how # to change this in Crowdin, so we'll do it here. @@ -30,3 +32,7 @@ do # exporting, but unfortunately it doesn't work for json files. jq 'del(..|select(. == ""))' < "$d/en.json" > pkg/i18n/translations/$(basename "$d").json done + +# Update cheatsheets, which might be affected by changes in the translations. +echo "Regenerating auto-generated files..." +go generate ./...