Browse Source

Merge pull request #97461 from lalitshankarchowdhury/better-replace

Improve "Replace in Files" dialog button text
Thaddeus Crews 9 months ago
parent
commit
a595ae2abb
2 changed files with 16 additions and 12 deletions
  1. 8 4
      editor/editor_node.cpp
  2. 8 8
      editor/plugins/script_editor_plugin.cpp

+ 8 - 4
editor/editor_node.cpp

@@ -7706,24 +7706,28 @@ EditorNode::EditorNode() {
 
 
 	disk_changed = memnew(ConfirmationDialog);
 	disk_changed = memnew(ConfirmationDialog);
 	{
 	{
-		disk_changed->set_title(TTR("Files have been modified on disk"));
+		disk_changed->set_title(TTR("Files have been modified outside Godot"));
 
 
 		VBoxContainer *vbc = memnew(VBoxContainer);
 		VBoxContainer *vbc = memnew(VBoxContainer);
 		disk_changed->add_child(vbc);
 		disk_changed->add_child(vbc);
 
 
 		Label *dl = memnew(Label);
 		Label *dl = memnew(Label);
-		dl->set_text(TTR("The following files are newer on disk.\nWhat action should be taken?"));
+		dl->set_text(TTR("The following files are newer on disk:"));
 		vbc->add_child(dl);
 		vbc->add_child(dl);
 
 
 		disk_changed_list = memnew(Tree);
 		disk_changed_list = memnew(Tree);
 		vbc->add_child(disk_changed_list);
 		vbc->add_child(disk_changed_list);
 		disk_changed_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
 		disk_changed_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
 
 
+		Label *what_action_label = memnew(Label);
+		what_action_label->set_text(TTR("What action should be taken?"));
+		vbc->add_child(what_action_label);
+
 		disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_reload_modified_scenes));
 		disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_reload_modified_scenes));
 		disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_reload_project_settings));
 		disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_reload_project_settings));
-		disk_changed->set_ok_button_text(TTR("Discard local changes and reload"));
+		disk_changed->set_ok_button_text(TTR("Reload from disk"));
 
 
-		disk_changed->add_button(TTR("Keep local changes and overwrite"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
+		disk_changed->add_button(TTR("Ignore external changes"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
 		disk_changed->connect("custom_action", callable_mp(this, &EditorNode::_resave_scenes));
 		disk_changed->connect("custom_action", callable_mp(this, &EditorNode::_resave_scenes));
 	}
 	}
 
 

+ 8 - 8
editor/plugins/script_editor_plugin.cpp

@@ -4391,28 +4391,28 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
 
 
 	disk_changed = memnew(ConfirmationDialog);
 	disk_changed = memnew(ConfirmationDialog);
 	{
 	{
-		disk_changed->set_title(TTR("Files have been modified on disk"));
+		disk_changed->set_title(TTR("Files have been modified outside Godot"));
 
 
 		VBoxContainer *vbc = memnew(VBoxContainer);
 		VBoxContainer *vbc = memnew(VBoxContainer);
 		disk_changed->add_child(vbc);
 		disk_changed->add_child(vbc);
 
 
 		Label *files_are_newer_label = memnew(Label);
 		Label *files_are_newer_label = memnew(Label);
-		files_are_newer_label->set_text(TTR("The following files are newer on disk."));
+		files_are_newer_label->set_text(TTR("The following files are newer on disk:"));
 		vbc->add_child(files_are_newer_label);
 		vbc->add_child(files_are_newer_label);
 
 
-		Label *what_action_label = memnew(Label);
-		what_action_label->set_text(TTR("What action should be taken?:"));
-		vbc->add_child(what_action_label);
-
 		disk_changed_list = memnew(Tree);
 		disk_changed_list = memnew(Tree);
 		vbc->add_child(disk_changed_list);
 		vbc->add_child(disk_changed_list);
 		disk_changed_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
 		disk_changed_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
 		disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
 		disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
 
 
+		Label *what_action_label = memnew(Label);
+		what_action_label->set_text(TTR("What action should be taken?"));
+		vbc->add_child(what_action_label);
+
 		disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &ScriptEditor::reload_scripts).bind(false));
 		disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &ScriptEditor::reload_scripts).bind(false));
-		disk_changed->set_ok_button_text(TTR("Discard local changes and reload"));
+		disk_changed->set_ok_button_text(TTR("Reload from disk"));
 
 
-		disk_changed->add_button(TTR("Keep local changes and overwrite"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
+		disk_changed->add_button(TTR("Ignore external changes"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
 		disk_changed->connect("custom_action", callable_mp(this, &ScriptEditor::_resave_scripts));
 		disk_changed->connect("custom_action", callable_mp(this, &ScriptEditor::_resave_scripts));
 	}
 	}