Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Improve auto-translation of Control and Theme editors

kobewica9de69cf2ea
diff --git a/editor/scene/gui/control_editor_plugin.cpp b/editor/scene/gui/control_editor_plugin.cpp
index 719bb1fc4e3..d4d1e4ddfe0 100644
--- a/editor/scene/gui/control_editor_plugin.cpp
+++ b/editor/scene/gui/control_editor_plugin.cpp
@@ -58,16 +58,16 @@ void ControlPositioningWarning::_update_warning() {
Node *parent_node = control_node->get_parent_control();
if (!parent_node) {
title_icon->set_texture(get_editor_theme_icon(SNAME("SubViewport")));
- title_label->set_text(TTR("This node doesn't have a control parent."));
- hint_label->set_text(TTR("Use the appropriate layout properties depending on where you are going to put it."));
+ title_label->set_text(TTRC("This node doesn't have a control parent."));
+ hint_label->set_text(TTRC("Use the appropriate layout properties depending on where you are going to put it."));
} else if (Object::cast_to<Container>(parent_node)) {
title_icon->set_texture(get_editor_theme_icon(SNAME("ContainerLayout")));
- title_label->set_text(TTR("This node is a child of a container."));
- hint_label->set_text(TTR("Use container properties for positioning."));
+ title_label->set_text(TTRC("This node is a child of a container."));
+ hint_label->set_text(TTRC("Use container properties for positioning."));
} else {
title_icon->set_texture(get_editor_theme_icon(SNAME("ControlLayout")));
- title_label->set_text(TTR("This node is a child of a regular control."));
- hint_label->set_text(TTR("Use anchors and the rectangle for positioning."));
+ title_label->set_text(TTRC("This node is a child of a regular control."));
+ hint_label->set_text(TTRC("Use anchors and the rectangle for positioning."));
}
bg_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("bg_group_note"), SNAME("EditorProperty")));
@@ -77,14 +77,14 @@ void ControlPositioningWarning::_update_toggler() {
Ref<Texture2D> arrow;
if (hint_label->is_visible()) {
arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
- set_tooltip_text(TTR("Collapse positioning hint."));
+ set_tooltip_text(TTRC("Collapse positioning hint."));
} else {
if (is_layout_rtl()) {
arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
} else {
arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
}
- set_tooltip_text(TTR("Expand positioning hint."));
+ set_tooltip_text(TTRC("Expand positioning hint."));
}
hint_icon->set_texture(arrow);
@@ -367,7 +367,7 @@ void EditorPropertySizeFlags::setup(const Vector<String> &p_options, bool p_vert
if (p_options.is_empty()) {
flag_presets->clear();
- flag_presets->add_item(TTR("Container Default"));
+ flag_presets->add_item(TTRC("Container Default"));
flag_presets->set_disabled(true);
flag_expand->set_visible(false);
return;
@@ -406,18 +406,18 @@ void EditorPropertySizeFlags::setup(const Vector<String> &p_options, bool p_vert
flag_presets->clear();
if (flags.has(SIZE_FILL)) {
- flag_presets->add_icon_item(gui_base->get_editor_theme_icon(wide_preset_icon), TTR("Fill"), SIZE_FLAGS_PRESET_FILL);
+ flag_presets->add_icon_item(gui_base->get_editor_theme_icon(wide_preset_icon), TTRC("Fill"), SIZE_FLAGS_PRESET_FILL);
}
// Shrink Begin is the same as no flags at all, as such it cannot be disabled.
- flag_presets->add_icon_item(gui_base->get_editor_theme_icon(begin_preset_icon), TTR("Shrink Begin"), SIZE_FLAGS_PRESET_SHRINK_BEGIN);
+ flag_presets->add_icon_item(gui_base->get_editor_theme_icon(begin_preset_icon), TTRC("Shrink Begin"), SIZE_FLAGS_PRESET_SHRINK_BEGIN);
if (flags.has(SIZE_SHRINK_CENTER)) {
- flag_presets->add_icon_item(gui_base->get_editor_theme_icon(SNAME("ControlAlignCenter")), TTR("Shrink Center"), SIZE_FLAGS_PRESET_SHRINK_CENTER);
+ flag_presets->add_icon_item(gui_base->get_editor_theme_icon(SNAME("ControlAlignCenter")), TTRC("Shrink Center"), SIZE_FLAGS_PRESET_SHRINK_CENTER);
}
if (flags.has(SIZE_SHRINK_END)) {
- flag_presets->add_icon_item(gui_base->get_editor_theme_icon(end_preset_icon), TTR("Shrink End"), SIZE_FLAGS_PRESET_SHRINK_END);
+ flag_presets->add_icon_item(gui_base->get_editor_theme_icon(end_preset_icon), TTRC("Shrink End"), SIZE_FLAGS_PRESET_SHRINK_END);
}
flag_presets->add_separator();
- flag_presets->add_item(TTR("Custom"), SIZE_FLAGS_PRESET_CUSTOM);
+ flag_presets->add_item(TTRC("Custom"), SIZE_FLAGS_PRESET_CUSTOM);
flag_expand->set_visible(flags.has(SIZE_EXPAND));
}
@@ -441,7 +441,7 @@ EditorPropertySizeFlags::EditorPropertySizeFlags() {
vb->add_child(flag_options);
flag_expand = memnew(CheckBox);
- flag_expand->set_text(TTR("Expand"));
+ flag_expand->set_text(TTRC("Expand"));
flag_expand->set_clip_text(true);
vb->add_child(flag_expand);
add_focusable(flag_expand);
@@ -740,10 +740,10 @@ void SizeFlagPresetPicker::set_allowed_flags(Vector<SizeFlags> &p_flags) {
expand_button->set_disabled(!p_flags.has(SIZE_EXPAND));
if (p_flags.has(SIZE_EXPAND)) {
- expand_button->set_tooltip_text(TTR("Enable to also set the Expand flag.\nDisable to only set Shrink/Fill flags."));
+ expand_button->set_tooltip_text(TTRC("Enable to also set the Expand flag.\nDisable to only set Shrink/Fill flags."));
} else {
expand_button->set_pressed(false);
- expand_button->set_tooltip_text(TTR("Some parents of the selected nodes do not support the Expand flag."));
+ expand_button->set_tooltip_text(TTRC("Some parents of the selected nodes do not support the Expand flag."));
}
}
@@ -791,16 +791,16 @@ SizeFlagPresetPicker::SizeFlagPresetPicker(bool p_vertical) {
main_row->add_theme_constant_override("separation", grid_separation);
main_vb->add_child(main_row);
- _add_row_button(main_row, SIZE_SHRINK_BEGIN, TTR("Shrink Begin"));
- _add_row_button(main_row, SIZE_SHRINK_CENTER, TTR("Shrink Center"));
- _add_row_button(main_row, SIZE_SHRINK_END, TTR("Shrink End"));
+ _add_row_button(main_row, SIZE_SHRINK_BEGIN, TTRC("Shrink Begin"));
+ _add_row_button(main_row, SIZE_SHRINK_CENTER, TTRC("Shrink Center"));
+ _add_row_button(main_row, SIZE_SHRINK_END, TTRC("Shrink End"));
_add_separator(main_row, memnew(VSeparator));
- _add_row_button(main_row, SIZE_FILL, TTR("Fill"));
+ _add_row_button(main_row, SIZE_FILL, TTRC("Fill"));
expand_button = memnew(CheckButton);
expand_button->set_flat(true);
- expand_button->set_text(TTR("Expand"));
- expand_button->set_tooltip_text(TTR("Enable to also set the Expand flag.\nDisable to only set Shrink/Fill flags."));
+ expand_button->set_text(TTRC("Expand"));
+ expand_button->set_tooltip_text(TTRC("Enable to also set the Expand flag.\nDisable to only set Shrink/Fill flags."));
expand_button->connect(SceneStringName(pressed), callable_mp(this, &SizeFlagPresetPicker::_expand_button_pressed));
main_vb->add_child(expand_button);
}
@@ -1205,12 +1205,12 @@ void ControlEditorToolbar::_notification(int p_what) {
ControlEditorToolbar::ControlEditorToolbar() {
// Anchor and offset tools.
anchors_button = memnew(ControlEditorPopupButton);
- anchors_button->set_tooltip_text(TTR("Presets for the anchor and offset values of a Control node."));
+ anchors_button->set_tooltip_text(TTRC("Presets for the anchor and offset values of a Control node."));
anchors_button->connect(SceneStringName(toggled), callable_mp(this, &ControlEditorToolbar::_update_anchor_selection_ui));
add_child(anchors_button);
Label *anchors_label = memnew(Label);
- anchors_label->set_text(TTR("Anchor preset"));
+ anchors_label->set_text(TTRC("Anchor preset"));
anchors_button->get_popup_hbox()->add_child(anchors_label);
anchors_picker = memnew(AnchorPresetPicker);
anchors_picker->set_h_size_flags(SIZE_SHRINK_CENTER);
@@ -1228,27 +1228,27 @@ ControlEditorToolbar::ControlEditorToolbar() {
Button *keep_ratio_button = memnew(Button);
keep_ratio_button->set_text_alignment(HORIZONTAL_ALIGNMENT_LEFT);
- keep_ratio_button->set_text(TTR("Set to Current Ratio"));
- keep_ratio_button->set_tooltip_text(TTR("Adjust anchors and offsets to match the current rect size."));
+ keep_ratio_button->set_text(TTRC("Set to Current Ratio"));
+ keep_ratio_button->set_tooltip_text(TTRC("Adjust anchors and offsets to match the current rect size."));
anchors_button->get_popup_hbox()->add_child(keep_ratio_button);
keep_ratio_button->connect(SceneStringName(pressed), callable_mp(this, &ControlEditorToolbar::_anchors_to_current_ratio));
anchor_mode_button = memnew(Button);
anchor_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
anchor_mode_button->set_toggle_mode(true);
- anchor_mode_button->set_tooltip_text(TTR("When active, moving Control nodes changes their anchors instead of their offsets."));
+ anchor_mode_button->set_tooltip_text(TTRC("When active, moving Control nodes changes their anchors instead of their offsets."));
anchor_mode_button->set_accessibility_name(TTRC("Change Anchors"));
add_child(anchor_mode_button);
anchor_mode_button->connect(SceneStringName(toggled), callable_mp(this, &ControlEditorToolbar::_anchor_mode_toggled));
// Container tools.
containers_button = memnew(ControlEditorPopupButton);
- containers_button->set_tooltip_text(TTR("Sizing settings for children of a Container node."));
+ containers_button->set_tooltip_text(TTRC("Sizing settings for children of a Container node."));
containers_button->connect(SceneStringName(toggled), callable_mp(this, &ControlEditorToolbar::_update_container_sizing_selection_ui));
add_child(containers_button);
Label *container_h_label = memnew(Label);
- container_h_label->set_text(TTR("Horizontal alignment"));
+ container_h_label->set_text(TTRC("Horizontal alignment"));
containers_button->get_popup_hbox()->add_child(container_h_label);
container_h_picker = memnew(SizeFlagPresetPicker(false));
containers_button->get_popup_hbox()->add_child(container_h_picker);
@@ -1258,7 +1258,7 @@ ControlEditorToolbar::ControlEditorToolbar() {
containers_button->get_popup_hbox()->add_child(memnew(HSeparator));
Label *container_v_label = memnew(Label);
- container_v_label->set_text(TTR("Vertical alignment"));
+ container_v_label->set_text(TTRC("Vertical alignment"));
containers_button->get_popup_hbox()->add_child(container_v_label);
container_v_picker = memnew(SizeFlagPresetPicker(true));
containers_button->get_popup_hbox()->add_child(container_v_picker);
diff --git a/editor/scene/gui/theme_editor_plugin.cpp b/editor/scene/gui/theme_editor_plugin.cpp
index d482ba011af..4edca89abd7 100644
--- a/editor/scene/gui/theme_editor_plugin.cpp
+++ b/editor/scene/gui/theme_editor_plugin.cpp
@@ -184,7 +184,7 @@ void ThemeItemImportTree::_update_items_tree() {
switch (dt) {
case Theme::DATA_TYPE_COLOR:
data_type_node->set_icon(0, get_editor_theme_icon(SNAME("Color")));
- data_type_node->set_text(0, TTR("Colors"));
+ data_type_node->set_text(0, TTRC("Colors"));
item_list = &tree_color_items;
color_amount += filtered_names.size();
@@ -192,7 +192,7 @@ void ThemeItemImportTree::_update_items_tree() {
case Theme::DATA_TYPE_CONSTANT:
data_type_node->set_icon(0, get_editor_theme_icon(SNAME("MemberConstant")));
- data_type_node->set_text(0, TTR("Constants"));
+ data_type_node->set_text(0, TTRC("Constants"));
item_list = &tree_constant_items;
constant_amount += filtered_names.size();
@@ -200,7 +200,7 @@ void ThemeItemImportTree::_update_items_tree() {
case Theme::DATA_TYPE_FONT:
data_type_node->set_icon(0, get_editor_theme_icon(SNAME("FontItem")));
- data_type_node->set_text(0, TTR("Fonts"));
+ data_type_node->set_text(0, TTRC("Fonts"));
item_list = &tree_font_items;
font_amount += filtered_names.size();
@@ -208,7 +208,7 @@ void ThemeItemImportTree::_update_items_tree() {
case Theme::DATA_TYPE_FONT_SIZE:
data_type_node->set_icon(0, get_editor_theme_icon(SNAME("FontSize")));
- data_type_node->set_text(0, TTR("Font Sizes"));
+ data_type_node->set_text(0, TTRC("Font Sizes"));
item_list = &tree_font_size_items;
font_size_amount += filtered_names.size();
@@ -216,7 +216,7 @@ void ThemeItemImportTree::_update_items_tree() {
case Theme::DATA_TYPE_ICON:
data_type_node->set_icon(0, get_editor_theme_icon(SNAME("ImageTexture")));
- data_type_node->set_text(0, TTR("Icons"));
+ data_type_node->set_text(0, TTRC("Icons"));
item_list = &tree_icon_items;
icon_amount += filtered_names.size();
@@ -224,7 +224,7 @@ void ThemeItemImportTree::_update_items_tree() {
case Theme::DATA_TYPE_STYLEBOX:
data_type_node->set_icon(0, get_editor_theme_icon(SNAME("StyleBoxFlat")));
- data_type_node->set_text(0, TTR("Styleboxes"));
+ data_type_node->set_text(0, TTRC("Styleboxes"));
item_list = &tree_stylebox_items;
stylebox_amount += filtered_names.size();
@@ -763,7 +763,7 @@ void ThemeItemImportTree::_deselect_all_data_type_pressed(int p_data_type) {
void ThemeItemImportTree::_import_selected() {
if (selected_items.is_empty()) {
- EditorNode::get_singleton()->show_warning(TTR("Nothing was selected for the import."));
+ EditorNode::get_singleton()->show_warning(TTRC("Nothing was selected for the import."));
return;
}
@@ -930,7 +930,7 @@ void ThemeItemImportTree::_bind_methods() {
ThemeItemImportTree::ThemeItemImportTree() {
import_items_filter = memnew(LineEdit);
- import_items_filter->set_placeholder(TTR("Filter Items"));
+ import_items_filter->set_placeholder(TTRC("Filter Items"));
import_items_filter->set_clear_button_enabled(true);
add_child(import_items_filter);
import_items_filter->connect(SceneStringName(text_changed), callable_mp(this, &ThemeItemImportTree::_filter_text_changed));
@@ -949,8 +949,8 @@ ThemeItemImportTree::ThemeItemImportTree() {
import_items_tree->set_columns(3);
import_items_tree->set_column_titles_visible(true);
- import_items_tree->set_column_title(IMPORT_ITEM, TTR("Import"));
- import_items_tree->set_column_title(IMPORT_ITEM_DATA, TTR("With Data"));
+ import_items_tree->set_column_title(IMPORT_ITEM, TTRC("Import"));
+ import_items_tree->set_column_title(IMPORT_ITEM_DATA, TTRC("With Data"));
import_items_tree->set_column_expand(0, true);
import_items_tree->set_column_clip_content(0, true);
import_items_tree->set_column_expand(IMPORT_ITEM, false);
@@ -972,7 +972,7 @@ ThemeItemImportTree::ThemeItemImportTree() {
import_bulk_sc->add_child(import_bulk_vb);
Label *import_bulk_label = memnew(Label);
- import_bulk_label->set_text(TTR("Select by data type:"));
+ import_bulk_label->set_text(TTRC("Select by data type:"));
import_bulk_vb->add_child(import_bulk_label);
select_colors_icon = memnew(TextureRect);
@@ -1041,10 +1041,10 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_full_items_button = select_full_colors_button;
total_selected_items_label = total_selected_colors_label;
- items_title = TTR("Colors");
- select_all_items_tooltip = TTR("Select all visible color items.");
- select_full_items_tooltip = TTR("Select all visible color items and their data.");
- deselect_all_items_tooltip = TTR("Deselect all visible color items.");
+ items_title = TTRC("Colors");
+ select_all_items_tooltip = TTRC("Select all visible color items.");
+ select_full_items_tooltip = TTRC("Select all visible color items and their data.");
+ deselect_all_items_tooltip = TTRC("Deselect all visible color items.");
break;
case Theme::DATA_TYPE_CONSTANT:
@@ -1055,10 +1055,10 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_full_items_button = select_full_constants_button;
total_selected_items_label = total_selected_constants_label;
- items_title = TTR("Constants");
- select_all_items_tooltip = TTR("Select all visible constant items.");
- select_full_items_tooltip = TTR("Select all visible constant items and their data.");
- deselect_all_items_tooltip = TTR("Deselect all visible constant items.");
+ items_title = TTRC("Constants");
+ select_all_items_tooltip = TTRC("Select all visible constant items.");
+ select_full_items_tooltip = TTRC("Select all visible constant items and their data.");
+ deselect_all_items_tooltip = TTRC("Deselect all visible constant items.");
break;
case Theme::DATA_TYPE_FONT:
@@ -1069,10 +1069,10 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_full_items_button = select_full_fonts_button;
total_selected_items_label = total_selected_fonts_label;
- items_title = TTR("Fonts");
- select_all_items_tooltip = TTR("Select all visible font items.");
- select_full_items_tooltip = TTR("Select all visible font items and their data.");
- deselect_all_items_tooltip = TTR("Deselect all visible font items.");
+ items_title = TTRC("Fonts");
+ select_all_items_tooltip = TTRC("Select all visible font items.");
+ select_full_items_tooltip = TTRC("Select all visible font items and their data.");
+ deselect_all_items_tooltip = TTRC("Deselect all visible font items.");
break;
case Theme::DATA_TYPE_FONT_SIZE:
@@ -1083,10 +1083,10 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_full_items_button = select_full_font_sizes_button;
total_selected_items_label = total_selected_font_sizes_label;
- items_title = TTR("Font sizes");
- select_all_items_tooltip = TTR("Select all visible font size items.");
- select_full_items_tooltip = TTR("Select all visible font size items and their data.");
- deselect_all_items_tooltip = TTR("Deselect all visible font size items.");
+ items_title = TTRC("Font sizes");
+ select_all_items_tooltip = TTRC("Select all visible font size items.");
+ select_full_items_tooltip = TTRC("Select all visible font size items and their data.");
+ deselect_all_items_tooltip = TTRC("Deselect all visible font size items.");
break;
case Theme::DATA_TYPE_ICON:
@@ -1097,10 +1097,10 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_full_items_button = select_full_icons_button;
total_selected_items_label = total_selected_icons_label;
- items_title = TTR("Icons");
- select_all_items_tooltip = TTR("Select all visible icon items.");
- select_full_items_tooltip = TTR("Select all visible icon items and their data.");
- deselect_all_items_tooltip = TTR("Deselect all visible icon items.");
+ items_title = TTRC("Icons");
+ select_all_items_tooltip = TTRC("Select all visible icon items.");
+ select_full_items_tooltip = TTRC("Select all visible icon items and their data.");
+ deselect_all_items_tooltip = TTRC("Deselect all visible icon items.");
break;
case Theme::DATA_TYPE_STYLEBOX:
@@ -1111,10 +1111,10 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_full_items_button = select_full_styleboxes_button;
total_selected_items_label = total_selected_styleboxes_label;
- items_title = TTR("Styleboxes");
- select_all_items_tooltip = TTR("Select all visible stylebox items.");
- select_full_items_tooltip = TTR("Select all visible stylebox items and their data.");
- deselect_all_items_tooltip = TTR("Deselect all visible stylebox items.");
+ items_title = TTRC("Styleboxes");
+ select_all_items_tooltip = TTRC("Select all visible stylebox items.");
+ select_full_items_tooltip = TTRC("Select all visible stylebox items and their data.");
+ deselect_all_items_tooltip = TTRC("Deselect all visible stylebox items.");
break;
case Theme::DATA_TYPE_MAX:
@@ -1167,7 +1167,7 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_icons_warning_hb->add_child(select_icons_warning_icon);
select_icons_warning = memnew(Label);
- select_icons_warning->set_text(TTR("Caution: Adding icon data may considerably increase the size of your Theme resource."));
+ select_icons_warning->set_text(TTRC("Caution: Adding icon data may considerably increase the size of your Theme resource."));
select_icons_warning->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
select_icons_warning->set_h_size_flags(Control::SIZE_EXPAND_FILL);
select_icons_warning_hb->add_child(select_icons_warning);
@@ -1179,12 +1179,12 @@ ThemeItemImportTree::ThemeItemImportTree() {
import_collapse_types_button = memnew(Button);
import_collapse_types_button->set_flat(true);
- import_collapse_types_button->set_tooltip_text(TTR("Collapse types."));
+ import_collapse_types_button->set_tooltip_text(TTRC("Collapse types."));
import_buttons->add_child(import_collapse_types_button);
import_collapse_types_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(true));
import_expand_types_button = memnew(Button);
import_expand_types_button->set_flat(true);
- import_expand_types_button->set_tooltip_text(TTR("Expand types."));
+ import_expand_types_button->set_tooltip_text(TTRC("Expand types."));
import_buttons->add_child(import_expand_types_button);
import_expand_types_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(false));
@@ -1192,27 +1192,27 @@ ThemeItemImportTree::ThemeItemImportTree() {
import_select_all_button = memnew(Button);
import_select_all_button->set_flat(true);
- import_select_all_button->set_text(TTR("Select All"));
- import_select_all_button->set_tooltip_text(TTR("Select all Theme items."));
+ import_select_all_button->set_text(TTRC("Select All"));
+ import_select_all_button->set_tooltip_text(TTRC("Select all Theme items."));
import_buttons->add_child(import_select_all_button);
import_select_all_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_select_all_items_pressed));
import_select_full_button = memnew(Button);
import_select_full_button->set_flat(true);
- import_select_full_button->set_text(TTR("Select With Data"));
- import_select_full_button->set_tooltip_text(TTR("Select all Theme items with item data."));
+ import_select_full_button->set_text(TTRC("Select With Data"));
+ import_select_full_button->set_tooltip_text(TTRC("Select all Theme items with item data."));
import_buttons->add_child(import_select_full_button);
import_select_full_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_select_full_items_pressed));
import_deselect_all_button = memnew(Button);
import_deselect_all_button->set_flat(true);
- import_deselect_all_button->set_text(TTR("Deselect All"));
- import_deselect_all_button->set_tooltip_text(TTR("Deselect all Theme items."));
+ import_deselect_all_button->set_text(TTRC("Deselect All"));
+ import_deselect_all_button->set_tooltip_text(TTRC("Deselect all Theme items."));
import_buttons->add_child(import_deselect_all_button);
import_deselect_all_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_deselect_all_items_pressed));
import_buttons->add_spacer();
Button *import_add_selected_button = memnew(Button);
- import_add_selected_button->set_text(TTR("Import Selected"));
+ import_add_selected_button->set_text(TTRC("Import Selected"));
import_buttons->add_child(import_add_selected_button);
import_add_selected_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemImportTree::_import_selected));
}
@@ -1221,7 +1221,7 @@ ThemeItemImportTree::ThemeItemImportTree() {
void ThemeItemEditorDialog::ok_pressed() {
if (import_default_theme_items->has_selected_items() || import_editor_theme_items->has_selected_items() || import_other_theme_items->has_selected_items()) {
- confirm_closing_dialog->set_text(TTR("Import Items tab has some items selected. Selection will be lost upon closing this window.\nClose anyway?"));
+ confirm_closing_dialog->set_text(TTRC("Import Items tab has some items selected. Selection will be lost upon closing this window.\nClose anyway?"));
confirm_closing_dialog->popup_centered(Size2(380, 120) * EDSCALE);
return;
}
@@ -1322,7 +1322,7 @@ void ThemeItemEditorDialog::_update_edit_types() {
edit_items_remove_custom->set_disabled(true);
edit_items_remove_all->set_disabled(true);
- edit_items_message->set_text(TTR("Select a theme type from the list to edit its items.\nYou can add a custom type or import a type with its items from another theme."));
+ edit_items_message->set_text(TTRC("Select a theme type from the list to edit its items.\nYou can add a custom type or import a type with its items from another theme."));
edit_items_message->show();
}
@@ -1406,15 +1406,15 @@ void ThemeItemEditorDialog::_update_edit_item_tree(String p_item_type) {
TreeItem *color_root = edit_items_tree->create_item(root);
color_root->set_metadata(0, Theme::DATA_TYPE_COLOR);
color_root->set_icon(0, get_editor_theme_icon(SNAME("Color")));
- color_root->set_text(0, TTR("Colors"));
- color_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTR("Remove All Color Items"));
+ color_root->set_text(0, TTRC("Colors"));
+ color_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTRC("Remove All Color Items"));
names.sort_custom<StringName::AlphCompare>();
for (const StringName &E : names) {
TreeItem *item = edit_items_tree->create_item(color_root);
item->set_text(0, E);
- item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTR("Rename Item"));
- item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTR("Remove Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTRC("Rename Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTRC("Remove Item"));
}
has_any_items = true;
@@ -1429,15 +1429,15 @@ void ThemeItemEditorDialog::_update_edit_item_tree(String p_item_type) {
TreeItem *constant_root = edit_items_tree->create_item(root);
constant_root->set_metadata(0, Theme::DATA_TYPE_CONSTANT);
constant_root->set_icon(0, get_editor_theme_icon(SNAME("MemberConstant")));
- constant_root->set_text(0, TTR("Constants"));
- constant_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTR("Remove All Constant Items"));
+ constant_root->set_text(0, TTRC("Constants"));
+ constant_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTRC("Remove All Constant Items"));
names.sort_custom<StringName::AlphCompare>();
for (const StringName &E : names) {
TreeItem *item = edit_items_tree->create_item(constant_root);
item->set_text(0, E);
- item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTR("Rename Item"));
- item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTR("Remove Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTRC("Rename Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTRC("Remove Item"));
}
has_any_items = true;
@@ -1452,15 +1452,15 @@ void ThemeItemEditorDialog::_update_edit_item_tree(String p_item_type) {
TreeItem *font_root = edit_items_tree->create_item(root);
font_root->set_metadata(0, Theme::DATA_TYPE_FONT);
font_root->set_icon(0, get_editor_theme_icon(SNAME("FontItem")));
- font_root->set_text(0, TTR("Fonts"));
- font_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTR("Remove All Font Items"));
+ font_root->set_text(0, TTRC("Fonts"));
+ font_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTRC("Remove All Font Items"));
names.sort_custom<StringName::AlphCompare>();
for (const StringName &E : names) {
TreeItem *item = edit_items_tree->create_item(font_root);
item->set_text(0, E);
- item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTR("Rename Item"));
- item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTR("Remove Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTRC("Rename Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTRC("Remove Item"));
}
has_any_items = true;
@@ -1475,15 +1475,15 @@ void ThemeItemEditorDialog::_update_edit_item_tree(String p_item_type) {
TreeItem *font_size_root = edit_items_tree->create_item(root);
font_size_root->set_metadata(0, Theme::DATA_TYPE_FONT_SIZE);
font_size_root->set_icon(0, get_editor_theme_icon(SNAME("FontSize")));
- font_size_root->set_text(0, TTR("Font Sizes"));
- font_size_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTR("Remove All Font Size Items"));
+ font_size_root->set_text(0, TTRC("Font Sizes"));
+ font_size_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTRC("Remove All Font Size Items"));
names.sort_custom<StringName::AlphCompare>();
for (const StringName &E : names) {
TreeItem *item = edit_items_tree->create_item(font_size_root);
item->set_text(0, E);
- item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTR("Rename Item"));
- item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTR("Remove Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTRC("Rename Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTRC("Remove Item"));
}
has_any_items = true;
@@ -1498,15 +1498,15 @@ void ThemeItemEditorDialog::_update_edit_item_tree(String p_item_type) {
TreeItem *icon_root = edit_items_tree->create_item(root);
icon_root->set_metadata(0, Theme::DATA_TYPE_ICON);
icon_root->set_icon(0, get_editor_theme_icon(SNAME("ImageTexture")));
- icon_root->set_text(0, TTR("Icons"));
- icon_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTR("Remove All Icon Items"));
+ icon_root->set_text(0, TTRC("Icons"));
+ icon_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTRC("Remove All Icon Items"));
names.sort_custom<StringName::AlphCompare>();
for (const StringName &E : names) {
TreeItem *item = edit_items_tree->create_item(icon_root);
item->set_text(0, E);
- item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTR("Rename Item"));
- item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTR("Remove Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTRC("Rename Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTRC("Remove Item"));
}
has_any_items = true;
@@ -1521,15 +1521,15 @@ void ThemeItemEditorDialog::_update_edit_item_tree(String p_item_type) {
TreeItem *stylebox_root = edit_items_tree->create_item(root);
stylebox_root->set_metadata(0, Theme::DATA_TYPE_STYLEBOX);
stylebox_root->set_icon(0, get_editor_theme_icon(SNAME("StyleBoxFlat")));
- stylebox_root->set_text(0, TTR("Styleboxes"));
- stylebox_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTR("Remove All StyleBox Items"));
+ stylebox_root->set_text(0, TTRC("Styleboxes"));
+ stylebox_root->add_button(0, get_editor_theme_icon(SNAME("Clear")), ITEMS_TREE_REMOVE_DATA_TYPE, false, TTRC("Remove All StyleBox Items"));
names.sort_custom<StringName::AlphCompare>();
for (const StringName &E : names) {
TreeItem *item = edit_items_tree->create_item(stylebox_root);
item->set_text(0, E);
- item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTR("Rename Item"));
- item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTR("Remove Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Edit")), ITEMS_TREE_RENAME_ITEM, false, TTRC("Rename Item"));
+ item->add_button(0, get_editor_theme_icon(SNAME("Remove")), ITEMS_TREE_REMOVE_ITEM, false, TTRC("Remove Item"));
}
has_any_items = true;
@@ -1540,7 +1540,7 @@ void ThemeItemEditorDialog::_update_edit_item_tree(String p_item_type) {
TreeItem *selected_item = edit_type_list->get_selected();
if (selected_item) {
if (!has_any_items) {
- edit_items_message->set_text(TTR("This theme type is empty.\nAdd more items to it manually or by importing from another theme."));
+ edit_items_message->set_text(TTRC("This theme type is empty.\nAdd more items to it manually or by importing from another theme."));
edit_items_message->show();
} else {
edit_items_message->set_text("");
@@ -1803,22 +1803,22 @@ void ThemeItemEditorDialog::_open_add_theme_item_dialog(int p_data_type) {
switch (edit_item_data_type) {
case Theme::DATA_TYPE_COLOR:
- edit_theme_item_dialog->set_title(TTR("Add Color Item"));
+ edit_theme_item_dialog->set_title(TTRC("Add Color Item"));
break;
case Theme::DATA_TYPE_CONSTANT:
- edit_theme_item_dialog->set_title(TTR("Add Constant Item"));
+ edit_theme_item_dialog->set_title(TTRC("Add Constant Item"));
break;
case Theme::DATA_TYPE_FONT:
- edit_theme_item_dialog->set_title(TTR("Add Font Item"));
+ edit_theme_item_dialog->set_title(TTRC("Add Font Item"));
break;
case Theme::DATA_TYPE_FONT_SIZE:
- edit_theme_item_dialog->set_title(TTR("Add Font Size Item"));
+ edit_theme_item_dialog->set_title(TTRC("Add Font Size Item"));
break;
case Theme::DATA_TYPE_ICON:
- edit_theme_item_dialog->set_title(TTR("Add Icon Item"));
+ edit_theme_item_dialog->set_title(TTRC("Add Icon Item"));
break;
case Theme::DATA_TYPE_STYLEBOX:
- edit_theme_item_dialog->set_title(TTR("Add Stylebox Item"));
+ edit_theme_item_dialog->set_title(TTRC("Add Stylebox Item"));
break;
case Theme::DATA_TYPE_MAX:
break; // Can't happen, but silences warning.
@@ -1839,22 +1839,22 @@ void ThemeItemEditorDialog::_open_rename_theme_item_dialog(Theme::DataType p_dat
switch (edit_item_data_type) {
case Theme::DATA_TYPE_COLOR:
- edit_theme_item_dialog->set_title(TTR("Rename Color Item"));
+ edit_theme_item_dialog->set_title(TTRC("Rename Color Item"));
break;
case Theme::DATA_TYPE_CONSTANT:
- edit_theme_item_dialog->set_title(TTR("Rename Constant Item"));
+ edit_theme_item_dialog->set_title(TTRC("Rename Constant Item"));
break;
case Theme::DATA_TYPE_FONT:
- edit_theme_item_dialog->set_title(TTR("Rename Font Item"));
+ edit_theme_item_dialog->set_title(TTRC("Rename Font Item"));
break;
case Theme::DATA_TYPE_FONT_SIZE:
- edit_theme_item_dialog->set_title(TTR("Rename Font Size Item"));
+ edit_theme_item_dialog->set_title(TTRC("Rename Font Size Item"));
break;
case Theme::DATA_TYPE_ICON:
- edit_theme_item_dialog->set_title(TTR("Rename Icon Item"));
+ edit_theme_item_dialog->set_title(TTRC("Rename Icon Item"));
break;
case Theme::DATA_TYPE_STYLEBOX:
- edit_theme_item_dialog->set_title(TTR("Rename Stylebox Item"));
+ edit_theme_item_dialog->set_title(TTRC("Rename Stylebox Item"));
break;
case Theme::DATA_TYPE_MAX:
break; // Can't happen, but silences warning.
@@ -1916,11 +1916,11 @@ void ThemeItemEditorDialog::_open_select_another_theme() {
void ThemeItemEditorDialog::_select_another_theme_cbk(const String &p_path) {
Ref<Theme> loaded_theme = ResourceLoader::load(p_path);
if (loaded_theme.is_null()) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid file, not a Theme resource."));
+ EditorNode::get_singleton()->show_warning(TTRC("Invalid file, not a Theme resource."));
return;
}
if (loaded_theme == edited_theme) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid file, same as the edited Theme resource."));
+ EditorNode::get_singleton()->show_warning(TTRC("Invalid file, same as the edited Theme resource."));
return;
}
@@ -1964,8 +1964,8 @@ void ThemeItemEditorDialog::set_edited_theme(const Ref<Theme> &p_theme) {
}
ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_editor) {
- set_title(TTR("Manage Theme Items"));
- set_ok_button_text(TTR("Close"));
+ set_title(TTRC("Manage Theme Items"));
+ set_ok_button_text(TTRC("Close"));
set_hide_on_ok(false); // Closing may require a confirmation in some cases.
theme_type_editor = p_theme_type_editor;
@@ -1977,14 +1977,14 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
// Edit Items tab.
HSplitContainer *edit_dialog_hs = memnew(HSplitContainer);
tc->add_child(edit_dialog_hs);
- tc->set_tab_title(0, TTR("Edit Items"));
+ tc->set_tab_title(0, TTRC("Edit Items"));
VBoxContainer *edit_dialog_side_vb = memnew(VBoxContainer);
edit_dialog_side_vb->set_custom_minimum_size(Size2(200.0, 0.0) * EDSCALE);
edit_dialog_hs->add_child(edit_dialog_side_vb);
Label *edit_type_label = memnew(Label);
- edit_type_label->set_text(TTR("Types:"));
+ edit_type_label->set_text(TTRC("Types:"));
edit_dialog_side_vb->add_child(edit_type_label);
edit_type_list = memnew(Tree);
@@ -2000,7 +2000,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_type_list->set_theme_type_variation("TreeSecondary");
Label *edit_add_type_label = memnew(Label);
- edit_add_type_label->set_text(TTR("Add Type:"));
+ edit_add_type_label->set_text(TTRC("Add Type:"));
edit_dialog_side_vb->add_child(edit_add_type_label);
HBoxContainer *edit_add_type_hb = memnew(HBoxContainer);
@@ -2021,46 +2021,46 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_items_vb->add_child(edit_items_toolbar);
Label *edit_items_toolbar_add_label = memnew(Label);
- edit_items_toolbar_add_label->set_text(TTR("Add Item:"));
+ edit_items_toolbar_add_label->set_text(TTRC("Add Item:"));
edit_items_toolbar->add_child(edit_items_toolbar_add_label);
edit_items_add_color = memnew(Button);
- edit_items_add_color->set_tooltip_text(TTR("Add Color Item"));
+ edit_items_add_color->set_tooltip_text(TTRC("Add Color Item"));
edit_items_add_color->set_flat(true);
edit_items_add_color->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_color);
edit_items_add_color->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_COLOR));
edit_items_add_constant = memnew(Button);
- edit_items_add_constant->set_tooltip_text(TTR("Add Constant Item"));
+ edit_items_add_constant->set_tooltip_text(TTRC("Add Constant Item"));
edit_items_add_constant->set_flat(true);
edit_items_add_constant->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_constant);
edit_items_add_constant->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_CONSTANT));
edit_items_add_font = memnew(Button);
- edit_items_add_font->set_tooltip_text(TTR("Add Font Item"));
+ edit_items_add_font->set_tooltip_text(TTRC("Add Font Item"));
edit_items_add_font->set_flat(true);
edit_items_add_font->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_font);
edit_items_add_font->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT));
edit_items_add_font_size = memnew(Button);
- edit_items_add_font_size->set_tooltip_text(TTR("Add Font Size Item"));
+ edit_items_add_font_size->set_tooltip_text(TTRC("Add Font Size Item"));
edit_items_add_font_size->set_flat(true);
edit_items_add_font_size->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_font_size);
edit_items_add_font_size->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT_SIZE));
edit_items_add_icon = memnew(Button);
- edit_items_add_icon->set_tooltip_text(TTR("Add Icon Item"));
+ edit_items_add_icon->set_tooltip_text(TTRC("Add Icon Item"));
edit_items_add_icon->set_flat(true);
edit_items_add_icon->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_icon);
edit_items_add_icon->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_ICON));
edit_items_add_stylebox = memnew(Button);
- edit_items_add_stylebox->set_tooltip_text(TTR("Add StyleBox Item"));
+ edit_items_add_stylebox->set_tooltip_text(TTRC("Add StyleBox Item"));
edit_items_add_stylebox->set_flat(true);
edit_items_add_stylebox->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_stylebox);
@@ -2069,25 +2069,25 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_items_toolbar->add_child(memnew(VSeparator));
Label *edit_items_toolbar_remove_label = memnew(Label);
- edit_items_toolbar_remove_label->set_text(TTR("Remove Items:"));
+ edit_items_toolbar_remove_label->set_text(TTRC("Remove Items:"));
edit_items_toolbar->add_child(edit_items_toolbar_remove_label);
edit_items_remove_class = memnew(Button);
- edit_items_remove_class->set_tooltip_text(TTR("Remove Class Items"));
+ edit_items_remove_class->set_tooltip_text(TTRC("Remove Class Items"));
edit_items_remove_class->set_flat(true);
edit_items_remove_class->set_disabled(true);
edit_items_toolbar->add_child(edit_items_remove_class);
edit_items_remove_class->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_remove_class_items));
edit_items_remove_custom = memnew(Button);
- edit_items_remove_custom->set_tooltip_text(TTR("Remove Custom Items"));
+ edit_items_remove_custom->set_tooltip_text(TTRC("Remove Custom Items"));
edit_items_remove_custom->set_flat(true);
edit_items_remove_custom->set_disabled(true);
edit_items_toolbar->add_child(edit_items_remove_custom);
edit_items_remove_custom->connect(SceneStringName(pressed), callable_mp(this, &ThemeItemEditorDialog::_remove_custom_items));
edit_items_remove_all = memnew(Button);
- edit_items_remove_all->set_tooltip_text(TTR("Remove All Items"));
+ edit_items_remove_all->set_tooltip_text(TTRC("Remove All Items"));
edit_items_remove_all->set_flat(true);
edit_items_remove_all->set_disabled(true);
edit_items_toolbar->add_child(edit_items_remove_all);
@@ -2111,7 +2111,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_items_tree->add_child(edit_items_message);
edit_theme_item_dialog = memnew(ConfirmationDialog);
- edit_theme_item_dialog->set_title(TTR("Add Theme Item"));
+ edit_theme_item_dialog->set_title(TTRC("Add Theme Item"));
add_child(edit_theme_item_dialog);
VBoxContainer *edit_theme_item_vb = memnew(VBoxContainer);
edit_theme_item_dialog->add_child(edit_theme_item_vb);
@@ -2119,13 +2119,13 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_theme_item_old_vb = memnew(VBoxContainer);
edit_theme_item_vb->add_child(edit_theme_item_old_vb);
Label *edit_theme_item_old = memnew(Label);
- edit_theme_item_old->set_text(TTR("Old Name:"));
+ edit_theme_item_old->set_text(TTRC("Old Name:"));
edit_theme_item_old_vb->add_child(edit_theme_item_old);
theme_item_old_name = memnew(Label);
edit_theme_item_old_vb->add_child(theme_item_old_name);
Label *edit_theme_item_label = memnew(Label);
- edit_theme_item_label->set_text(TTR("Name:"));
+ edit_theme_item_label->set_text(TTRC("Name:"));
edit_theme_item_vb->add_child(edit_theme_item_label);
theme_item_name = memnew(LineEdit);
edit_theme_item_vb->add_child(theme_item_name);
@@ -2137,16 +2137,16 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
import_tc->set_theme_type_variation("TabContainerInner");
import_tc->set_tab_alignment(TabBar::ALIGNMENT_CENTER);
tc->add_child(import_tc);
- tc->set_tab_title(1, TTR("Import Items"));
+ tc->set_tab_title(1, TTRC("Import Items"));
import_default_theme_items = memnew(ThemeItemImportTree);
import_tc->add_child(import_default_theme_items);
- import_tc->set_tab_title(0, TTR("Default Theme"));
+ import_tc->set_tab_title(0, TTRC("Default Theme"));
import_default_theme_items->connect("items_imported", callable_mp(this, &ThemeItemEditorDialog::_update_edit_types));
import_editor_theme_items = memnew(ThemeItemImportTree);
import_tc->add_child(import_editor_theme_items);
- import_tc->set_tab_title(1, TTR("Editor Theme"));
+ import_tc->set_tab_title(1, TTRC("Editor Theme"));
import_editor_theme_items->connect("items_imported", callable_mp(this, &ThemeItemEditorDialog::_update_edit_types));
VBoxContainer *import_another_theme_vb = memnew(VBoxContainer);
@@ -2163,11 +2163,11 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
import_another_theme_dialog = memnew(EditorFileDialog);
import_another_theme_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- import_another_theme_dialog->set_title(TTR("Select Another Theme Resource:"));
+ import_another_theme_dialog->set_title(TTRC("Select Another Theme Resource:"));
List<String> ext;
ResourceLoader::get_recognized_extensions_for_type("Theme", &ext);
for (const String &E : ext) {
- import_another_theme_dialog->add_filter("*." + E, TTR("Theme Resource"));
+ import_another_theme_dialog->add_filter("*." + E, TTRC("Theme Resource"));
}
import_another_file_hb->add_child(import_another_theme_dialog);
import_another_theme_dialog->connect("file_selected", callable_mp(this, &ThemeItemEditorDialog::_select_another_theme_cbk));
@@ -2177,7 +2177,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
import_another_theme_vb->add_child(import_other_theme_items);
import_tc->add_child(import_another_theme_vb);
- import_tc->set_tab_title(2, TTR("Another Theme"));
+ import_tc->set_tab_title(2, TTRC("Another Theme"));
import_other_theme_items->connect("items_imported", callable_mp(this, &ThemeItemEditorDialog::_update_edit_types));
confirm_closing_dialog = memnew(ConfirmationDialog);
@@ -2303,7 +2303,7 @@ ThemeTypeDialog::ThemeTypeDialog() {
add_child(add_type_vb);
Label *add_type_filter_label = memnew(Label);
- add_type_filter_label->set_text(TTR("Filter the list of types or create a new custom type:"));
+ add_type_filter_label->set_text(TTRC("Filter the list of types or create a new custom type:"));
add_type_vb->add_child(add_type_filter_label);
add_type_filter = memnew(FilterLineEdit);
@@ -2312,7 +2312,7 @@ ThemeTypeDialog::ThemeTypeDialog() {
add_type_filter->connect(SceneStringName(text_submitted), callable_mp(this, &ThemeTypeDialog::_add_type_dialog_entered));
Label *add_type_options_label = memnew(Label);
- add_type_options_label->set_text(TTR("Available Node-based types:"));
+ add_type_options_label->set_text(TTRC("Available Node-based types:"));
add_type_vb->add_child(add_type_options_label);
MarginContainer *mc = memnew(MarginContainer);
@@ -2330,8 +2330,8 @@ ThemeTypeDialog::ThemeTypeDialog() {
add_type_confirmation = memnew(ConfirmationDialog);
add_type_confirmation->set_flag(Window::FLAG_RESIZE_DISABLED, true);
- add_type_confirmation->set_title(TTR("Type name is empty!"));
- add_type_confirmation->set_text(TTR("Are you sure you want to create an empty type?"));
+ add_type_confirmation->set_title(TTRC("Type name is empty!"));
+ add_type_confirmation->set_text(TTRC("Are you sure you want to create an empty type?"));
add_type_confirmation->connect(SceneStringName(confirmed), callable_mp(this, &ThemeTypeDialog::_add_type_confirmed));
add_child(add_type_confirmation);
}
@@ -2364,7 +2364,7 @@ VBoxContainer *ThemeTypeEditor::_create_item_list(Theme::DataType p_data_type) {
item_add_hb->add_child(item_add_edit);
item_add_edit->connect(SceneStringName(text_submitted), callable_mp(this, &ThemeTypeEditor::_item_add_lineedit_cbk).bind(p_data_type, item_add_edit));
Button *item_add_button = memnew(Button);
- item_add_button->set_text(TTR("Add"));
+ item_add_button->set_text(TTRC("Add"));
item_add_button->set_disabled(true);
item_add_hb->add_child(item_add_button);
item_add_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_add_cbk).bind(p_data_type, item_add_edit));
@@ -2544,21 +2544,21 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
Button *item_rename_button = memnew(Button);
item_rename_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
- item_rename_button->set_tooltip_text(TTR("Rename Item"));
+ item_rename_button->set_tooltip_text(TTRC("Rename Item"));
item_rename_button->set_flat(true);
item_name_container->add_child(item_rename_button);
item_rename_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_cbk).bind(p_data_type, p_item_name, item_name_container));
Button *item_remove_button = memnew(Button);
item_remove_button->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
- item_remove_button->set_tooltip_text(TTR("Remove Item"));
+ item_remove_button->set_tooltip_text(TTRC("Remove Item"));
item_remove_button->set_flat(true);
item_name_container->add_child(item_remove_button);
item_remove_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_remove_cbk).bind(p_data_type, p_item_name));
Button *item_rename_confirm_button = memnew(Button);
item_rename_confirm_button->set_button_icon(get_editor_theme_icon(SNAME("ImportCheck")));
- item_rename_confirm_button->set_tooltip_text(TTR("Confirm Item Rename"));
+ item_rename_confirm_button->set_tooltip_text(TTRC("Confirm Item Rename"));
item_rename_confirm_button->set_flat(true);
item_name_container->add_child(item_rename_confirm_button);
item_rename_confirm_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_confirmed).bind(p_data_type, p_item_name, item_name_container));
@@ -2566,7 +2566,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
Button *item_rename_cancel_button = memnew(Button);
item_rename_cancel_button->set_button_icon(get_editor_theme_icon(SNAME("ImportFail")));
- item_rename_cancel_button->set_tooltip_text(TTR("Cancel Item Rename"));
+ item_rename_cancel_button->set_tooltip_text(TTRC("Cancel Item Rename"));
item_rename_cancel_button->set_flat(true);
item_name_container->add_child(item_rename_cancel_button);
item_rename_cancel_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_canceled).bind(p_data_type, p_item_name, item_name_container));
@@ -2576,7 +2576,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
Button *item_override_button = memnew(Button);
item_override_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
- item_override_button->set_tooltip_text(TTR("Override Item"));
+ item_override_button->set_tooltip_text(TTRC("Override Item"));
item_override_button->set_flat(true);
item_name_container->add_child(item_override_button);
item_override_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_override_cbk).bind(p_data_type, p_item_name));
@@ -2792,7 +2792,7 @@ void ThemeTypeEditor::_update_type_items() {
pin_leader_button->set_toggle_mode(true);
pin_leader_button->set_pressed(true);
pin_leader_button->set_button_icon(get_editor_theme_icon(SNAME("Pin")));
- pin_leader_button->set_tooltip_text(TTR("Unpin this StyleBox as a main style."));
+ pin_leader_button->set_tooltip_text(TTRC("Unpin this StyleBox as a main style."));
item_control->add_child(pin_leader_button);
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_unpin_leader_button_pressed));
@@ -2836,7 +2836,7 @@ void ThemeTypeEditor::_update_type_items() {
pin_leader_button->set_flat(true);
pin_leader_button->set_toggle_mode(true);
pin_leader_button->set_button_icon(get_editor_theme_icon(SNAME("Pin")));
- pin_leader_button->set_tooltip_text(TTR("Pin this StyleBox as a main style. Editing its properties will update the same properties in all other StyleBoxes of this type."));
+ pin_leader_button->set_tooltip_text(TTRC("Pin this StyleBox as a main style. Editing its properties will update the same properties in all other StyleBoxes of this type."));
pin_leader_button->set_accessibility_name(TTRC("Pin this StyleBox as a main style."));
item_control->add_child(pin_leader_button);
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed).bind(item_editor, E.key));
@@ -2878,8 +2878,8 @@ void ThemeTypeEditor::_list_type_selected(int p_index) {
void ThemeTypeEditor::_add_type_button_cbk() {
add_type_mode = ADD_THEME_TYPE;
- add_type_dialog->set_title(TTR("Add Item Type"));
- add_type_dialog->set_ok_button_text(TTR("Add Type"));
+ add_type_dialog->set_title(TTRC("Add Item Type"));
+ add_type_dialog->set_ok_button_text(TTRC("Add Type"));
add_type_dialog->set_include_own_types(false);
add_type_dialog->popup_centered(Size2(560, 420) * EDSCALE);
}
@@ -3480,8 +3480,8 @@ void ThemeTypeEditor::_type_variation_changed(const String p_value) {
void ThemeTypeEditor::_add_type_variation_cbk() {
add_type_mode = ADD_VARIATION_BASE;
- add_type_dialog->set_title(TTR("Set Variation Base Type"));
- add_type_dialog->set_ok_button_text(TTR("Set Base Type"));
+ add_type_dialog->set_title(TTRC("Set Variation Base Type"));
+ add_type_dialog->set_ok_button_text(TTRC("Set Base Type"));
add_type_dialog->set_include_own_types(true);
add_type_dialog->popup_centered(Size2(560, 420) * EDSCALE);
}
@@ -3578,7 +3578,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
main_vb->add_child(type_list_hb);
Label *type_list_label = memnew(Label);
- type_list_label->set_text(TTR("Type:"));
+ type_list_label->set_text(TTRC("Type:"));
type_list_hb->add_child(type_list_label);
theme_type_list = memnew(OptionButton);
@@ -3592,7 +3592,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
theme_type_list->connect(SceneStringName(item_selected), callable_mp(this, &ThemeTypeEditor::_list_type_selected));
add_type_button = memnew(Button);
- add_type_button->set_tooltip_text(TTR("Add a type from a list of available types or create a new one."));
+ add_type_button->set_tooltip_text(TTRC("Add a type from a list of available types or create a new one."));
type_list_hb->add_child(add_type_button);
add_type_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_type_button_cbk));
@@ -3624,17 +3624,17 @@ ThemeTypeEditor::ThemeTypeEditor() {
show_default_items_button = memnew(CheckButton);
show_default_items_button->set_h_size_flags(SIZE_EXPAND_FILL);
- show_default_items_button->set_text(TTR("Show Default"));
+ show_default_items_button->set_text(TTRC("Show Default"));
show_default_items_button->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_CHAR);
- show_default_items_button->set_tooltip_text(TTR("Show default type items alongside items that have been overridden."));
+ show_default_items_button->set_tooltip_text(TTRC("Show default type items alongside items that have been overridden."));
show_default_items_button->set_pressed(true);
type_controls->add_child(show_default_items_button);
show_default_items_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_update_type_items));
Button *add_default_items_button = memnew(Button);
add_default_items_button->set_h_size_flags(SIZE_EXPAND_FILL);
- add_default_items_button->set_text(TTR("Override All"));
- add_default_items_button->set_tooltip_text(TTR("Override all default type items."));
+ add_default_items_button->set_text(TTRC("Override All"));
+ add_default_items_button->set_tooltip_text(TTRC("Override all default type items."));
type_controls->add_child(add_default_items_button);
add_default_items_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_default_type_items));
@@ -3677,7 +3677,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
type_variation_vb->add_child(type_variation_hb);
Label *type_variation_label = memnew(Label);
type_variation_hb->add_child(type_variation_label);
- type_variation_label->set_text(TTR("Base Type"));
+ type_variation_label->set_text(TTRC("Base Type"));
type_variation_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
type_variation_edit = memnew(LineEdit);
type_variation_hb->add_child(type_variation_edit);
@@ -3687,14 +3687,14 @@ ThemeTypeEditor::ThemeTypeEditor() {
type_variation_edit->set_accessibility_name(TTRC("Base Type"));
type_variation_button = memnew(Button);
type_variation_hb->add_child(type_variation_button);
- type_variation_button->set_tooltip_text(TTR("Select the variation base type from a list of available types."));
+ type_variation_button->set_tooltip_text(TTRC("Select the variation base type from a list of available types."));
type_variation_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_type_variation_cbk));
type_variation_locked = memnew(Label);
type_variation_vb->add_child(type_variation_locked);
type_variation_locked->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
type_variation_locked->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
- type_variation_locked->set_text(TTR("A type associated with a built-in class cannot be marked as a variation of another type."));
+ type_variation_locked->set_text(TTRC("A type associated with a built-in class cannot be marked as a variation of another type."));
type_variation_locked->hide();
add_type_dialog = memnew(ThemeTypeDialog);
@@ -4030,13 +4030,13 @@ ThemeEditor::ThemeEditor() {
top_menu->add_child(memnew(VSeparator));
Button *theme_save_button = memnew(Button);
- theme_save_button->set_text(TTR("Save"));
+ theme_save_button->set_text(TTRC("Save"));
theme_save_button->set_flat(true);
theme_save_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(false));
top_menu->add_child(theme_save_button);
Button *theme_save_as_button = memnew(Button);
- theme_save_as_button->set_text(TTR("Save As..."));
+ theme_save_as_button->set_text(TTRC("Save As..."));
theme_save_as_button->set_flat(true);
theme_save_as_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(true));
top_menu->add_child(theme_save_as_button);
@@ -4102,15 +4102,15 @@ ThemeEditor::ThemeEditor() {
DefaultThemeEditorPreview *default_preview_tab = memnew(DefaultThemeEditorPreview);
preview_tabs_content->add_child(default_preview_tab);
default_preview_tab->connect("control_picked", callable_mp(this, &ThemeEditor::_preview_control_picked));
- preview_tabs->add_tab(TTR("Default Preview"));
+ preview_tabs->add_tab(TTRC("Default Preview"));
preview_scene_dialog = memnew(EditorFileDialog);
preview_scene_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- preview_scene_dialog->set_title(TTR("Select UI Scene:"));
+ preview_scene_dialog->set_title(TTRC("Select UI Scene:"));
List<String> ext;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &ext);
for (const String &E : ext) {
- preview_scene_dialog->add_filter("*." + E, TTR("Scene"));
+ preview_scene_dialog->add_filter("*." + E, TTRC("Scene"));
}
main_hs->add_child(preview_scene_dialog);
preview_scene_dialog->connect("file_selected", callable_mp(this, &ThemeEditor::_preview_scene_dialog_cbk));
diff --git a/editor/scene/gui/theme_editor_preview.cpp b/editor/scene/gui/theme_editor_preview.cpp
index dd12eb8e917..ee72a32072d 100644
--- a/editor/scene/gui/theme_editor_preview.cpp
+++ b/editor/scene/gui/theme_editor_preview.cpp
@@ -243,7 +243,7 @@ ThemeEditorPreview::ThemeEditorPreview() {
preview_toolbar->add_child(picker_button);
picker_button->set_theme_type_variation(SceneStringName(FlatButton));
picker_button->set_toggle_mode(true);
- picker_button->set_tooltip_text(TTR("Toggle the control picker, allowing to visually select control types for edit."));
+ picker_button->set_tooltip_text(TTRC("Toggle the control picker, allowing to visually select control types for edit."));
picker_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditorPreview::_picker_button_cbk));
MarginContainer *preview_body = memnew(MarginContainer);
@@ -320,12 +320,12 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
first_vb->add_child(memnew(Button("Button")));
Button *bt = memnew(Button);
- bt->set_text(TTR("Toggle Button"));
+ bt->set_text(TTRC("Toggle Button"));
bt->set_toggle_mode(true);
bt->set_pressed(true);
first_vb->add_child(bt);
bt = memnew(Button);
- bt->set_text(TTR("Disabled Button"));
+ bt->set_text(TTRC("Disabled Button"));
bt->set_disabled(true);
first_vb->add_child(bt);
Button *tb = memnew(Button);
@@ -342,31 +342,31 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
MenuButton *test_menu_button = memnew(MenuButton);
test_menu_button->set_text("MenuButton");
- test_menu_button->get_popup()->add_item(TTR("Item"));
- test_menu_button->get_popup()->add_item(TTR("Disabled Item"));
+ test_menu_button->get_popup()->add_item(TTRC("Item"));
+ test_menu_button->get_popup()->add_item(TTRC("Disabled Item"));
test_menu_button->get_popup()->set_item_disabled(1, true);
test_menu_button->get_popup()->add_separator();
- test_menu_button->get_popup()->add_check_item(TTR("Check Item"));
- test_menu_button->get_popup()->add_check_item(TTR("Checked Item"));
+ test_menu_button->get_popup()->add_check_item(TTRC("Check Item"));
+ test_menu_button->get_popup()->add_check_item(TTRC("Checked Item"));
test_menu_button->get_popup()->set_item_checked(4, true);
test_menu_button->get_popup()->add_separator();
- test_menu_button->get_popup()->add_radio_check_item(TTR("Radio Item"));
- test_menu_button->get_popup()->add_radio_check_item(TTR("Checked Radio Item"));
+ test_menu_button->get_popup()->add_radio_check_item(TTRC("Radio Item"));
+ test_menu_button->get_popup()->add_radio_check_item(TTRC("Checked Radio Item"));
test_menu_button->get_popup()->set_item_checked(7, true);
- test_menu_button->get_popup()->add_separator(TTR("Named Separator"));
+ test_menu_button->get_popup()->add_separator(TTRC("Named Separator"));
PopupMenu *test_submenu = memnew(PopupMenu);
- test_menu_button->get_popup()->add_submenu_node_item(TTR("Submenu"), test_submenu);
- test_submenu->add_item(TTR("Subitem 1"));
- test_submenu->add_item(TTR("Subitem 2"));
+ test_menu_button->get_popup()->add_submenu_node_item(TTRC("Submenu"), test_submenu);
+ test_submenu->add_item(TTRC("Subitem 1"));
+ test_submenu->add_item(TTRC("Subitem 2"));
first_vb->add_child(test_menu_button);
OptionButton *test_option_button = memnew(OptionButton);
test_option_button->add_item("OptionButton");
test_option_button->add_separator();
- test_option_button->add_item(TTR("Has"));
- test_option_button->add_item(TTR("Many"));
- test_option_button->add_item(TTR("Options"));
+ test_option_button->add_item(TTRC("Has"));
+ test_option_button->add_item(TTRC("Many"));
+ test_option_button->add_item(TTRC("Options"));
first_vb->add_child(test_option_button);
test_color_picker_button = memnew(ColorPickerButton);
first_vb->add_child(test_color_picker_button);
@@ -379,7 +379,7 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
le->set_text("LineEdit");
second_vb->add_child(le);
le = memnew(LineEdit);
- le->set_text(TTR("Disabled LineEdit"));
+ le->set_text(TTRC("Disabled LineEdit"));
le->set_editable(false);
second_vb->add_child(le);
TextEdit *te = memnew(TextEdit);
@@ -421,13 +421,13 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
third_vb->add_child(tc);
tc->set_custom_minimum_size(Size2(0, 135));
Control *tcc = memnew(Control);
- tcc->set_name(TTR("Tab 1"));
+ tcc->set_name(TTRC("Tab 1"));
tc->add_child(tcc);
tcc = memnew(Control);
- tcc->set_name(TTR("Tab 2"));
+ tcc->set_name(TTRC("Tab 2"));
tc->add_child(tcc);
tcc = memnew(Control);
- tcc->set_name(TTR("Tab 3"));
+ tcc->set_name(TTRC("Tab 3"));
tc->add_child(tcc);
tc->set_tab_disabled(2, true);
@@ -441,9 +441,9 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
item->set_text(0, "Item");
item = test_tree->create_item(test_tree->get_root());
item->set_editable(0, true);
- item->set_text(0, TTR("Editable Item"));
+ item->set_text(0, TTRC("Editable Item"));
TreeItem *sub_tree = test_tree->create_item(test_tree->get_root());
- sub_tree->set_text(0, TTR("Subtree"));
+ sub_tree->set_text(0, TTRC("Subtree"));
item = test_tree->create_item(sub_tree);
item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
item->set_editable(0, true);
@@ -456,7 +456,7 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
item = test_tree->create_item(sub_tree);
item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
item->set_editable(0, true);
- item->set_text(0, TTR("Has,Many,Options"));
+ item->set_text(0, TTRC("Has,Many,Options"));
item->set_range(0, 2);
}
@@ -466,7 +466,7 @@ void SceneThemeEditorPreview::_reload_scene() {
}
if (loaded_scene->get_path().is_empty() || !ResourceLoader::exists(loaded_scene->get_path())) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid path, the PackedScene resource was probably moved or removed."));
+ EditorNode::get_singleton()->show_warning(TTRC("Invalid path, the PackedScene resource was probably moved or removed."));
emit_signal(SNAME("scene_invalidated"));
return;
}
@@ -479,7 +479,7 @@ void SceneThemeEditorPreview::_reload_scene() {
Node *instance = loaded_scene->instantiate();
if (!instance || !Object::cast_to<Control>(instance)) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid PackedScene resource, must have a Control node at its root."));
+ EditorNode::get_singleton()->show_warning(TTRC("Invalid PackedScene resource, must have a Control node at its root."));
emit_signal(SNAME("scene_invalidated"));
return;
}
@@ -504,19 +504,19 @@ void SceneThemeEditorPreview::_bind_methods() {
bool SceneThemeEditorPreview::set_preview_scene(const String &p_path) {
loaded_scene = ResourceLoader::load(p_path);
if (loaded_scene.is_null()) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid file, not a PackedScene resource."));
+ EditorNode::get_singleton()->show_warning(TTRC("Invalid file, not a PackedScene resource."));
return false;
}
Node *instance = loaded_scene->instantiate();
if (!instance) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid PackedScene resource, could not instantiate it."));
+ EditorNode::get_singleton()->show_warning(TTRC("Invalid PackedScene resource, could not instantiate it."));
return false;
}
if (!Object::cast_to<Control>(instance)) {
- EditorNode::get_singleton()->show_warning(TTR("Invalid PackedScene resource, must have a Control node at its root."));
+ EditorNode::get_singleton()->show_warning(TTRC("Invalid PackedScene resource, must have a Control node at its root."));
memdelete(instance);
return false;
}
@@ -538,7 +538,7 @@ SceneThemeEditorPreview::SceneThemeEditorPreview() {
reload_scene_button = memnew(Button);
reload_scene_button->set_flat(true);
- reload_scene_button->set_tooltip_text(TTR("Reload the scene to reflect its most actual state."));
+ reload_scene_button->set_tooltip_text(TTRC("Reload the scene to reflect its most actual state."));
preview_toolbar->add_child(reload_scene_button);
reload_scene_button->connect(SceneStringName(pressed), callable_mp(this, &SceneThemeEditorPreview::_reload_scene));
}