From 23aaf78391926d6f005e3375e718271f4ef2c3db Mon Sep 17 00:00:00 2001 From: Zae Date: Tue, 21 Dec 2021 03:44:16 +0800 Subject: [PATCH] [3.x]Fix BaseButton's localization for tooltip text with shortcut --- scene/gui/base_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 039baba5b3e4..abd2e201d1d7 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -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; }