diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2017-08-18 22:29:15 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-08-18 22:38:38 +0200 |
| commit | 18a73153812d4f9be82ec30eafdb8961c625c97b (patch) | |
| tree | 62a0624429a5000fee51f9ff8279651a4e85a214 /scene/gui/tab_container.cpp | |
| parent | b20952ebfff216acc07f6bbcad35b5a1e97a310c (diff) | |
| download | redot-engine-18a73153812d4f9be82ec30eafdb8961c625c97b.tar.gz | |
Rename localization method to `tr` again
Partial revert of #10380 based on contributor ~~bullying~~ feedback.
Diffstat (limited to 'scene/gui/tab_container.cpp')
| -rw-r--r-- | scene/gui/tab_container.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 520de951d5..d32b899de7 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -231,7 +231,7 @@ void TabContainer::_notification(int p_what) { // Draw the tab contents. Control *control = tabs[i + first_tab_cache]->cast_to<Control>(); - String text = control->has_meta("_tab_name") ? String(localize(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(control->get_name()); int x_content = tab_rect.position.x + tab_style->get_margin(MARGIN_LEFT); int top_margin = tab_style->get_margin(MARGIN_TOP); @@ -299,7 +299,7 @@ int TabContainer::_get_tab_width(int p_index) const { // Get the width of the text displayed on the tab. Ref<Font> font = get_font("font"); - String text = control->has_meta("_tab_name") ? String(localize(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(control->get_name()); int width = font->get_string_size(text).width; // Add space for a tab icon. |
