Browse Source

Merge pull request #30932 from Dragoncraft89/master

Translate TabContainer titles, when inherited from node name
Rémi Verschelde 6 năm trước cách đây
mục cha
commit
961b9b30e3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      scene/gui/tab_container.cpp

+ 1 - 1
scene/gui/tab_container.cpp

@@ -303,7 +303,7 @@ void TabContainer::_notification(int p_what) {
 
 
 				// Draw the tab contents.
 				// Draw the tab contents.
 				Control *control = Object::cast_to<Control>(tabs[i + first_tab_cache]);
 				Control *control = Object::cast_to<Control>(tabs[i + first_tab_cache]);
-				String text = control->has_meta("_tab_name") ? String(tr(String(control->get_meta("_tab_name")))) : String(control->get_name());
+				String text = control->has_meta("_tab_name") ? String(tr(String(control->get_meta("_tab_name")))) : String(tr(control->get_name()));
 
 
 				int x_content = tab_rect.position.x + tab_style->get_margin(MARGIN_LEFT);
 				int x_content = tab_rect.position.x + tab_style->get_margin(MARGIN_LEFT);
 				int top_margin = tab_style->get_margin(MARGIN_TOP);
 				int top_margin = tab_style->get_margin(MARGIN_TOP);