diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-02 11:38:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 11:38:40 +0200 |
commit | 6389b68cd8b31543cb2b0633db47c4f5b2cff7d9 (patch) | |
tree | 8a2288ecaeb6fa4679601e5ba3b2e635e60ef4cb | |
parent | 82da6aabc069c4f1bbb473aff0e4d4025e874c74 (diff) | |
parent | 58caa2c453bed12c9249e7696406775dfa135a9e (diff) |
Merge pull request #39214 from EricEzaM/improve-add-autoload-errors
Improved warning shown when autoload cannot be added.
-rw-r--r-- | editor/editor_autoload_settings.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 200ae7045f..da0ff9f18f 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -674,18 +674,18 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_ String error; if (!_autoload_name_is_valid(name, &error)) { - EditorNode::get_singleton()->show_warning(error); + EditorNode::get_singleton()->show_warning(TTR("Can't add autoload:") + "\n" + error); return false; } const String &path = p_path; if (!FileAccess::exists(path)) { - EditorNode::get_singleton()->show_warning(TTR("Invalid path.") + "\n" + TTR("File does not exist.")); + EditorNode::get_singleton()->show_warning(TTR("Can't add autoload:") + "\n" + TTR(vformat("%s is an invalid path. File does not exist.", path))); return false; } if (!path.begins_with("res://")) { - EditorNode::get_singleton()->show_warning(TTR("Invalid path.") + "\n" + TTR("Not in resource path.")); + EditorNode::get_singleton()->show_warning(TTR("Can't add autoload:") + "\n" + TTR(vformat("%s is an invalid path. Not in resource path (res://).", path))); return false; } @@ -912,4 +912,4 @@ void EditorAutoloadSettings::_set_autoload_add_path(const String &p_text) { void EditorAutoloadSettings::_browse_autoload_add_path() { file_dialog->popup_centered_ratio(); -}
\ No newline at end of file +} |