浏览代码

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

(cherry picked from commit 23aaf78391926d6f005e3375e718271f4ef2c3db)
Zae 3 年之前
父节点
当前提交
d55deabae7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/base_button.cpp

+ 1 - 1
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;
 	}