-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Fix translations update in window & Dialogs (AcceptDialog/ConfirmationDialog/FileDialog) (Fix 39320, 39258 & 45887) #46735
Fix translations update in window & Dialogs (AcceptDialog/ConfirmationDialog/FileDialog) (Fix 39320, 39258 & 45887) #46735
Conversation
3ae3769
to
7d5dad9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, I don't understand well the difference between _sub_windows_update and child_controls_changed as the last one end by calling _sub_windows_update. Both works, but I'm not sure which is the best.
I suppose it doesn't matter. The latter does more under the hood, so it might be more correct at the cost of performance, but you don't change translation very often anyways.
I tested the changes both in the editor and exported project and all seem to work fine.
This likely breaks editor translations. Try to run |
Maybe we could add a new macro that fetches strings, but doesn't translate? |
Seems like this is what TTRC does, but judging from the comment, it's not the intended use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually TTRC is fine. So replace the removed RTRs with TTRCs.
08b7ff8
to
697c594
Compare
@akien-mga thanks, I was unaware of this behaviour. @KoBeWi thanks for the review and providing me a solution! Changes are done. By curiosity, how I can see what functions are used for generating translations? (For example, is the |
They are defined here: godot/editor/translations/extract.py Line 186 in bf309b8
|
Thanks! |
This could be useful to backport to the |
NOTIFICATION_TRANSLATION_CHANGED
in the Window objectfix.mp4
fix2.mp4
[Edit]
Updated to also fix #45887
For reviewers:
For refreshing the window:
However, I don't understand well the difference between
_sub_windows_update
andchild_controls_changed
as the last one end by calling_sub_windows_update
. Both works, but I'm not sure which is the best.