X Tutup
Skip to content

Fix GDScript translation parser for FileDialog.add_filter() two-parameter format#111298

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Onebit5:fix-filedialog-translation-parser
Oct 8, 2025
Merged

Fix GDScript translation parser for FileDialog.add_filter() two-parameter format#111298
Repiteo merged 1 commit intogodotengine:masterfrom
Onebit5:fix-filedialog-translation-parser

Conversation

@Onebit5
Copy link
Contributor

@Onebit5 Onebit5 commented Oct 5, 2025

Fixes: GDScript translation parser bug with FileDialog #111286

The translation parser was only handling the single-parameter format of add_filter("*.jpg; JPE Images") and would throw an error when you used the two-parameter format add_filter("*.jpg", "JPE Images").

This fix checks for the second parameter first before trying to parse the semicolon format, so both ways work now, and translatable filter names get extracted properly.

@Onebit5 Onebit5 requested a review from a team as a code owner October 5, 2025 18:36
Copy link
Contributor Author

@Onebit5 Onebit5 left a comment

Choose a reason for hiding this comment

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

Works

@Onebit5 Onebit5 requested a review from dalexeev October 7, 2025 14:05
@dalexeev
Copy link
Member

dalexeev commented Oct 8, 2025

Also please squash your commits into one.

@Onebit5
Copy link
Contributor Author

Onebit5 commented Oct 8, 2025

All commits squashed into one.

Copy link
Member

@dalexeev dalexeev left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@dalexeev
Copy link
Member

dalexeev commented Oct 8, 2025

Please edit your commit message. It looks uninformative (all previous commit titles). Also, it seems GitHub doesn't take Co-authored-by into account if it's in the middle of a commit message.

image

…eter format

The parser only handled the single-parameter semicolon format and thew
an error with two-parameter format. This fix supports both formats.

Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
@Onebit5
Copy link
Contributor Author

Onebit5 commented Oct 8, 2025

Commit message updated with description and Co-authored-by moved to the end.

@Repiteo Repiteo merged commit d3c5141 into godotengine:master Oct 8, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 8, 2025

Thanks!

@akien-mga akien-mga changed the title Fix GDScript translation parser for FileDialog.add_filter() two-parameter format Fix GDScript translation parser for FileDialog.add_filter() two-parameter format Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GDScript translation parser bug with FileDialog

3 participants

X Tutup