summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-10-23 23:24:08 +0200
committerGitHub <noreply@github.com>2017-10-23 23:24:08 +0200
commit9f7887837a04f52ebd04249342dc6b668a6b99be (patch)
tree959ee0d7c8c82a032ccb5d49389e2c4ad553263e /editor
parentc529fa6987424f09fb4a1baf3814531a89e0dd64 (diff)
parent59cc6f2ff5d916cd81c3dabfd44746b62af9925f (diff)
downloadredot-engine-9f7887837a04f52ebd04249342dc6b668a6b99be.tar.gz
Merge pull request #12360 from volzhs/ttr-format
Fix warning message format for addon plugin [ci skip]
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b77525c0ba..3513126a9b 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2670,12 +2670,12 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled)
String addon_path = "res://addons/" + p_addon + "/plugin.cfg";
Error err = cf->load(addon_path);
if (err != OK) {
- show_warning(TTR("Unable to enable addon plugin at: '") + addon_path + TTR("' parsing of config failed."));
+ show_warning(vformat(TTR("Unable to enable addon plugin at: '%s' parsing of config failed."), addon_path));
return;
}
if (!cf->has_section_key("plugin", "script")) {
- show_warning(TTR("Unable to find script field for addon plugin at: 'res://addons/") + p_addon + "''.");
+ show_warning(vformat(TTR("Unable to find script field for addon plugin at: 'res://addons/%s'."), p_addon));
return;
}
@@ -2685,18 +2685,18 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled)
Ref<Script> script = ResourceLoader::load(path);
if (script.is_null()) {
- show_warning(TTR("Unable to load addon script from path: '") + path + "'.");
+ show_warning(vformat(TTR("Unable to load addon script from path: '%s'."), path));
return;
}
//could check inheritance..
if (String(script->get_instance_base_type()) != "EditorPlugin") {
- show_warning(TTR("Unable to load addon script from path: '") + path + "' Base type is not EditorPlugin.");
+ show_warning(vformat(TTR("Unable to load addon script from path: '%s' Base type is not EditorPlugin."), path));
return;
}
if (!script->is_tool()) {
- show_warning(TTR("Unable to load addon script from path: '") + path + "' Script is not in tool mode.");
+ show_warning(vformat(TTR("Unable to load addon script from path: '%s' Script is not in tool mode."), path));
return;
}