1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

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
This commit is contained in:
Haoyu Qiu
2023-09-12 18:15:44 +08:00
parent 98b50eb308
commit b8b0339549
5 changed files with 19 additions and 18 deletions

View File

@@ -106,7 +106,7 @@ void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_propert
}
updating = true;
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Parameter Changed:") + " " + String(p_property), UndoRedo::MERGE_ENDS);
undo_redo->create_action(vformat(TTR("Parameter Changed: %s"), p_property), UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(tree, p_property, p_value);
undo_redo->add_undo_property(tree, p_property, tree->get(p_property));
undo_redo->add_do_method(this, "update_graph");