From 4682f2229376a8e98a521c06ecd157e020f46d88 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 23 Nov 2021 12:20:57 +0100 Subject: [PATCH] Improve various texts --- doc/classes/PackedScene.xml | 4 ++-- doc/classes/ReferenceRect.xml | 2 +- editor/editor_autoload_settings.cpp | 12 ++++++------ editor/editor_node.cpp | 2 +- modules/gdscript/gdscript_analyzer.cpp | 2 +- scene/2d/tile_map.cpp | 2 +- scene/resources/resource_format_text.cpp | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index d0579c6f6f9..d3a770b35bc 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -5,7 +5,7 @@ A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. - Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [code]owner[/code] property on [Node]). + Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [member Node.owner] property). [b]Note:[/b] The node doesn't need to own itself. [b]Example of loading a saved scene:[/b] [codeblocks] @@ -22,7 +22,7 @@ AddChild(scene); [/csharp] [/codeblocks] - [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidDynamicBody2D[/code] ([code]body[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. + [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidDynamicBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. [codeblocks] [gdscript] # Create the objects. diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml index 1db6879b452..99ad067469a 100644 --- a/doc/classes/ReferenceRect.xml +++ b/doc/classes/ReferenceRect.xml @@ -16,7 +16,7 @@ Sets the border width of the [ReferenceRect]. The border grows both inwards and outwards with respect to the rectangle box. - If set to [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game. + If [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in the running project. diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 0840c3b6a86..25e76c22628 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -117,7 +117,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin for (const String &E : keywords) { if (E == p_name) { if (r_error) { - *r_error = TTR("Invalid name.") + " " + TTR("Keyword cannot be used as an autoload name."); + *r_error = TTR("Invalid name.") + " " + TTR("Keyword cannot be used as an AutoLoad name."); } return false; @@ -373,13 +373,13 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) { Object *obj = ClassDB::instantiate(ibt); - ERR_FAIL_COND_V_MSG(obj == nullptr, nullptr, "Cannot instance script for autoload, expected 'Node' inheritance, got: " + String(ibt) + "."); + ERR_FAIL_COND_V_MSG(obj == nullptr, nullptr, "Cannot instance script for AutoLoad, expected 'Node' inheritance, got: " + String(ibt) + "."); n = Object::cast_to(obj); n->set_script(s); } - ERR_FAIL_COND_V_MSG(!n, nullptr, "Path in autoload not a node or script: " + p_path + "."); + ERR_FAIL_COND_V_MSG(!n, nullptr, "Path in AutoLoad not a node or script: " + p_path + "."); return n; } @@ -692,18 +692,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(TTR("Can't add autoload:") + "\n" + 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("Can't add autoload:") + "\n" + vformat(TTR("%s is an invalid path. File does not exist."), path)); + EditorNode::get_singleton()->show_warning(TTR("Can't add AutoLoad:") + "\n" + vformat(TTR("%s is an invalid path. File does not exist."), path)); return false; } if (!path.begins_with("res://")) { - EditorNode::get_singleton()->show_warning(TTR("Can't add autoload:") + "\n" + vformat(TTR("%s is an invalid path. Not in resource path (res://)."), path)); + EditorNode::get_singleton()->show_warning(TTR("Can't add AutoLoad:") + "\n" + vformat(TTR("%s is an invalid path. Not in resource path (res://)."), path)); return false; } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 1ad6dc18cd7..6a9d47bcc52 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6844,7 +6844,7 @@ EditorNode::EditorNode() { gui_base->add_child(custom_build_manage_templates); file_android_build_source = memnew(EditorFileDialog); - file_android_build_source->set_title(TTR("Select android sources file")); + file_android_build_source->set_title(TTR("Select Android sources file")); file_android_build_source->set_access(EditorFileDialog::ACCESS_FILESYSTEM); file_android_build_source->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE); file_android_build_source->add_filter("*.zip"); diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index cd8fd361c5e..1ecde53dd07 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -3001,7 +3001,7 @@ void GDScriptAnalyzer::reduce_preload(GDScriptParser::PreloadNode *p_preload) { // TODO: Don't load if validating: use completion cache. p_preload->resource = ResourceLoader::load(p_preload->resolved_path); if (p_preload->resource.is_null()) { - push_error(vformat(R"(Could not p_preload resource file "%s".)", p_preload->resolved_path), p_preload->path); + push_error(vformat(R"(Could not preload resource file "%s".)", p_preload->resolved_path), p_preload->path); } } } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 96c4164721e..a8caebf0885 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1928,7 +1928,7 @@ void TileMap::set_cell(int p_layer, const Vector2i &p_coords, int p_source_id, c if ((source_id == TileSet::INVALID_SOURCE || atlas_coords == TileSetSource::INVALID_ATLAS_COORDS || alternative_tile == TileSetSource::INVALID_TILE_ALTERNATIVE) && (source_id != TileSet::INVALID_SOURCE || atlas_coords != TileSetSource::INVALID_ATLAS_COORDS || alternative_tile != TileSetSource::INVALID_TILE_ALTERNATIVE)) { - WARN_PRINT("Setting a cell a cell as empty requires both source_id, atlas_coord and alternative_tile to be set to their respective \"invalid\" values. Values were thus changes accordingly."); + WARN_PRINT("Setting a cell as empty requires both source_id, atlas_coord and alternative_tile to be set to their respective \"invalid\" values. Values were thus changes accordingly."); source_id = TileSet::INVALID_SOURCE; atlas_coords = TileSetSource::INVALID_ATLAS_COORDS; alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE; diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index ea3b72af1ba..cead42b4e25 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -350,7 +350,7 @@ Ref ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars } else if (next_tag.name == "editable") { if (!next_tag.fields.has("path")) { error = ERR_FILE_CORRUPT; - error_text = "missing 'path' field from connection tag"; + error_text = "missing 'path' field from editable tag"; _printerr(); return Ref(); }