Fix auto-translation of EngineUpdateLabel#119606
Open
KoBeWi wants to merge 1 commit into
Open
Conversation
bruvzg
approved these changes
May 21, 2026
Member
bruvzg
left a comment
There was a problem hiding this comment.
Code looks good, but variable names might be confusing.
| if (message_format.get_type() == Variant::NIL) { | ||
| set_text(TTR(current_message)); | ||
| } else { | ||
| set_text(vformat(TTR(current_message), message_format)); |
Member
There was a problem hiding this comment.
Calling second argument of the vformat message_format is a bit confusing. Usually it is the other way, and format is the first string with the template (e.g, https://en.cppreference.com/cpp/utility/format/vformat).
I would do:
current_message -> current_format
message_format -> message_argument
or
current_message -> current_message
message_format -> message_argument
Same for the _set_message argument names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem(s) does this PR solve?
Part of #104574
Additional information
This one was tricky, because the update label has dynamic messages that can't be freely updated. I added a field for current message and for format argument. On language change, the message is updated using
vformat(TTR(current_message), stored_format).