[3.x]Fix BaseButton's localization for tooltip text with shortcut

(cherry picked from commit 23aaf78391)
This commit is contained in:
Zae 2021-12-21 03:44:16 +08:00 committed by Rémi Verschelde
parent 3dd3f2211b
commit d55deabae7
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}