Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelog helper tool updated #3459

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 31 additions & 23 deletions tools/changelog-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export GH_REPO=jamulussoftware/jamulus

PR_LIST_LIMIT=300
TRANSLATION_ENTRY_TEXT="GUI: Translations have been updated:"
TRANSLATION_ENTRY_TEXT2="Translations updated from Hosted Weblate"
BUNDLED_QT_UPDATE_TEXT="Build: Updated bundled Qt6"
Copy link
Collaborator

@pljones pljones Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a bunch of these defined in the bump dependencies workflow - it's probably worth covering all of them (separate groups). (It's Build: Updated + the changelog_name value.)

declare -A LANGS
LANGS[de_DE]="German"
LANGS[fr_FR]="French"
Expand Down Expand Up @@ -112,32 +114,38 @@ group_entries() {
# Prepend a number to known categories in order to make their sorting position consistent:
category_order=(
"$TRANSLATION_ENTRY_TEXT"
"GUI"
"Accessibility"
"Client"
"Server"
"Recorder"
"Performance"
"CLI"
"Bug Fix"
"Windows"
"Installer"
"Linux"
"Mac"
"Android"
"iOS"
"Translation"
"Doc"
"Website"
"Github"
"Build"
"Autobuild"
"Code"
"Internal"
"$TRANSLATION_ENTRY_TEXT2"
"GUI:"
"Accessibility:"
"Client:"
"Client/Server:"
"Server:"
"Recorder:"
"Performance:"
"CLI:"
"Bug Fix:"
"Windows:"
"Installer:"
"Linux:"
"Mac:"
"Android:"
"iOS:"
"Dependencies:"
"Translation:"
Copy link
Collaborator

@pljones pljones Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should all the translations be together (i.e. up with $TRANSLATION_ENTRY_TEXT and $TRANSLATION_ENTRY_TEXT2 - or down here with doc and website)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. There are some entries which are sorted by language.

"Doc:"
"Website:"
"Github:"
"$BUNDLED_QT_UPDATE_TEXT"
"Build:"
"Autobuild:"
"Code:"
"Internal:"
)
local index=0
for category in "${category_order[@]}"; do
changelog=$(sed -re 's/^(- '"${category}"')/'"${index}"' \1/' <<< "${changelog}")
# use | as delimiter, as category may contain /
# also re-add stripped newline from last line, for correct sorting
changelog=$(sed -re 's|^(- '"${category}"')|'"${index}"' \1|' <<< "${changelog}")$'\n'
index=$((index + 1))
done

Expand Down
Loading