diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-09-12 18:15:44 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-09-12 18:53:50 +0800 |
commit | b8b03395498d403c82a9b0e386711251d9207a84 (patch) | |
tree | bc8698688b414d31f270e4f2c995044b4b15c8dc /editor/plugins/visual_shader_editor_plugin.cpp | |
parent | 98b50eb3083094a352b36b184d7b60b77ad982fe (diff) | |
download | redot-engine-b8b03395498d403c82a9b0e386711251d9207a84.tar.gz |
Improve undo action names
* Avoid concating strings manually for better i18n and easy l10n
* Use `vformat` when possible
* Use separate strings if the changing part is only a few hardcoded strings
* Don't put a period at the end of the name
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 8e1862d88b..dcdd80a314 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -6370,7 +6370,7 @@ public: EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); updating = true; - undo_redo->create_action(TTR("Edit Visual Property:") + " " + p_property, UndoRedo::MERGE_ENDS); + undo_redo->create_action(vformat(TTR("Edit Visual Property: %s"), p_property), UndoRedo::MERGE_ENDS); undo_redo->add_do_property(node.ptr(), p_property, p_value); undo_redo->add_undo_property(node.ptr(), p_property, node->get(p_property)); |