diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-03-09 14:37:41 +0800 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-14 13:59:04 +0100 |
commit | 38ad9c52b231ae9cb862197b5eed7eda797dadd8 (patch) | |
tree | 184aabb50912a715cc57dda33cd669a7e3366bf7 | |
parent | 9e5e6568b71c6222c0739a7c3c484c3715847490 (diff) |
Add missing TTRs in tiles editor and array inspector
(cherry picked from commit bef7f14885ab6ee9cdf4116f67dfa12239746677)
-rw-r--r-- | editor/editor_inspector.cpp | 10 | ||||
-rw-r--r-- | editor/plugins/tiles/tile_data_editors.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/tiles/tile_set_atlas_source_editor.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index bc0a876c7c..563bf5ce7f 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1687,11 +1687,11 @@ void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) { String action_name; if (p_element_index < 0) { - action_name = vformat("Add element to property array with prefix %s.", array_element_prefix); + action_name = vformat(TTR("Add element to property array with prefix %s."), array_element_prefix); } else if (p_to_pos < 0) { - action_name = vformat("Remove element %d from property array with prefix %s.", p_element_index, array_element_prefix); + action_name = vformat(TTR("Remove element %d from property array with prefix %s."), p_element_index, array_element_prefix); } else { - action_name = vformat("Move element %d to position %d in property array with prefix %s.", p_element_index, p_to_pos, array_element_prefix); + action_name = vformat(TTR("Move element %d to position %d in property array with prefix %s."), p_element_index, p_to_pos, array_element_prefix); } EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); undo_redo->create_action(action_name); @@ -1838,7 +1838,7 @@ void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) { void EditorInspectorArray::_clear_array() { EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); - undo_redo->create_action(vformat("Clear property array with prefix %s.", array_element_prefix)); + undo_redo->create_action(vformat(TTR("Clear property array with prefix %s."), array_element_prefix)); if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) { for (int i = count - 1; i >= 0; i--) { // Call the function. @@ -1891,7 +1891,7 @@ void EditorInspectorArray::_resize_array(int p_size) { } EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); - undo_redo->create_action(vformat("Resize property array with prefix %s.", array_element_prefix)); + undo_redo->create_action(vformat(TTR("Resize property array with prefix %s."), array_element_prefix)); if (p_size > count) { if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) { for (int i = count; i < p_size; i++) { diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index 73d2da63b7..8327fa5762 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -1233,7 +1233,7 @@ TileDataDefaultEditor::TileDataDefaultEditor() { picker_button = memnew(Button); picker_button->set_flat(true); picker_button->set_toggle_mode(true); - picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", Key::P)); + picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", TTR("Picker"), Key::P)); toolbar->add_child(picker_button); } @@ -2720,7 +2720,7 @@ TileDataTerrainsEditor::TileDataTerrainsEditor() { picker_button = memnew(Button); picker_button->set_flat(true); picker_button->set_toggle_mode(true); - picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", "Picker", Key::P)); + picker_button->set_shortcut(ED_SHORTCUT("tiles_editor/picker", TTR("Picker"), Key::P)); toolbar->add_child(picker_button); // Setup diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 235e34d9b5..42c296e825 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -2561,7 +2561,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() { tools_settings_erase_button = memnew(Button); tools_settings_erase_button->set_flat(true); tools_settings_erase_button->set_toggle_mode(true); - tools_settings_erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", "Eraser", Key::E)); + tools_settings_erase_button->set_shortcut(ED_SHORTCUT("tiles_editor/eraser", TTR("Eraser"), Key::E)); tools_settings_erase_button->set_shortcut_context(this); tool_settings->add_child(tools_settings_erase_button); |