Skip to content

Commit

Permalink
[3.x]Fix BaseButton's localization for tooltip text with shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
zaevi committed Dec 20, 2021
1 parent 17b3173 commit 23aaf78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/base_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ String BaseButton::get_tooltip(const Point2 &p_pos) const {
if (shortcut_in_tooltip && shortcut.is_valid() && shortcut->is_valid()) {
String text = shortcut->get_name() + " (" + shortcut->get_as_text() + ")";
if (shortcut->get_name().nocasecmp_to(tooltip) != 0) {
text += "\n" + tooltip;
text += "\n" + tr(tooltip);
}
tooltip = text;
}
Expand Down

0 comments on commit 23aaf78

Please sign in to comment.