-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Add tooltip text to Polygon3DEditor buttons #102760
Conversation
@@ -535,12 +535,14 @@ Polygon3DEditor::Polygon3DEditor() { | |||
|
|||
button_create = memnew(Button); | |||
button_create->set_theme_type_variation(SceneStringName(FlatButton)); | |||
button_create->set_tooltip_text(TTR("Create Polygon")); |
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.
button_create->set_tooltip_text(TTR("Create Polygon")); | |
button_create->set_tooltip_text(TTRC("Create Polygon")); |
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.
TTR
is correct. TTRC
is for static C string literals, to mark them that they will later be translated, and does not actually translate the string.
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.
And this prevents double translation. See #99158 (or, for example, #101427 (comment)).
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.
Ok, I did check set_tooltip_text
's implementation before commenting, which appeared not to translate. But it appears it does propagate tooltip_auto_translate_mode
into Node::set_auto_translate_mode
which does schedule translations (if auto). set_tooltip_text
is used with TTRC
sometimes (though TTR
is used most times), so it's probably OK to change to TTRC
.
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.
Made the suggested changes to use TTRC instead of TTR.
320c587
to
030d63e
Compare
Thanks! |
Fixes: #102759
After
Screencast_20250210_052335.webm