Skip to content

Commit aa7d26b

Browse files
authored
Auto-update cheatsheets after updating translation (#5275)
I keep forgetting to do this, and I think there's no reason to update translations without also updating cheatsheets, so do it automatically.
2 parents 82e2834 + 4b69d93 commit aa7d26b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/update_language_files.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ fi
1818

1919
download_dir="$1"
2020

21+
echo "Updating translations..."
22+
2123
# The Portuguese translation is named pt-PT, but we want to use pt instead (it
2224
# is used both for Brasilian and European Portuguese). I couldn't figure out how
2325
# to change this in Crowdin, so we'll do it here.
@@ -30,3 +32,7 @@ do
3032
# exporting, but unfortunately it doesn't work for json files.
3133
jq 'del(..|select(. == ""))' < "$d/en.json" > pkg/i18n/translations/$(basename "$d").json
3234
done
35+
36+
# Update cheatsheets, which might be affected by changes in the translations.
37+
echo "Regenerating auto-generated files..."
38+
go generate ./...

0 commit comments

Comments
 (0)