Skip to content

Commit

Permalink
Fix typos with codespell
Browse files Browse the repository at this point in the history
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
  • Loading branch information
akien-mga committed May 20, 2021
1 parent 42b6602 commit 4219a4c
Show file tree
Hide file tree
Showing 57 changed files with 146 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
scons --version
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
# [Workaround] SwiftShader doesn't support tesselation, so we skip Godot check about it
# [Workaround] SwiftShader doesn't support tessellation, so we skip Godot check about it
- name: Compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
Expand Down
2 changes: 1 addition & 1 deletion DONORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ support of generous donors.
The ways to donate to the project, as well as details on how the funds are
used, are described on [Godot's website](https://godotengine.org/donate).

The following is a list of the current monthly donors, to be have their
The following is a list of the current monthly donors, who will have their
generous deed immortalized in the next stable release of Godot Engine.

## Platinum sponsors
Expand Down
2 changes: 1 addition & 1 deletion core/input/input_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent
ERR_FAIL_COND_MSG(p_event.is_null(), "It's not a reference to a valid InputEvent object.");
ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
if (_find_event(input_map[p_action], p_event, true)) {
return; // Already addded.
return; // Already added.
}

input_map[p_action].inputs.push_back(p_event);
Expand Down
2 changes: 1 addition & 1 deletion core/io/multiplayer_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
if (property_id == UINT16_MAX && p_from->get_script_instance()) {
property_id = p_from->get_script_instance()->get_rset_property_id(p_name);
}
ERR_FAIL_COND_MSG(property_id == UINT16_MAX, "Unable to take the `property_id` for the property:" + p_name + ". this can happen only if this property is not marked as `remote`.");
ERR_FAIL_COND_MSG(property_id == UINT16_MAX, "Unable to take the `property_id` for the property:" + p_name + ". This can only happen if this property is not marked as `remote`.");

if (property_id <= UINT8_MAX) {
// The ID fits in 1 byte
Expand Down
2 changes: 1 addition & 1 deletion core/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ void Object::_disconnect(const StringName &p_signal, const Callable &p_callable,
if (!s) {
bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal) ||
(!script.is_null() && Ref<Script>(script)->has_script_signal(p_signal));
ERR_FAIL_COND_MSG(signal_is_valid, "Attempt to disconnect a nonexistent connection from '" + to_string() + "'. signal: '" + p_signal + "', callable: '" + p_callable + "'.");
ERR_FAIL_COND_MSG(signal_is_valid, "Attempt to disconnect a nonexistent connection from '" + to_string() + "'. Signal: '" + p_signal + "', callable: '" + p_callable + "'.");
}
ERR_FAIL_COND_MSG(!s, vformat("Disconnecting nonexistent signal '%s' in %s.", p_signal, to_string()));

Expand Down
4 changes: 2 additions & 2 deletions doc/classes/Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,14 @@
[gdscript]
# Will evaluate to `true`.
if 2 in [2, 4, 6, 8]:
print("Containes!")
print("Contains!")
[/gdscript]
[csharp]
// As there is no "in" keyword in C#, you have to use Contains
var array = new Godot.Collections.Array{2, 4, 6, 8};
if (array.Contains(2))
{
GD.Print("Containes!");
GD.Print("Contains!");
}
[/csharp]
[/codeblocks]
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/CharFXTransform.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
The position offset the character will be drawn with (in pixels).
</member>
<member name="outline" type="bool" setter="set_outline" getter="is_outline" default="false">
If [code]ture[/code], FX transform is called for outline drawing. Setting this property won't affect drawing.
If [code]true[/code], FX transform is called for outline drawing. Setting this property won't affect drawing.
</member>
<member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i( 0, 0 )">
Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing.
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/MeshDataTool.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mdt.create_from_surface(mesh, 0)
for i in range(mdt.get_vertex_count()):
var vertex = mdt.get_vertex(i)
# In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded.
# In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
vertex += mdt.get_vertex_normal(i)
# Save your change.
mdt.set_vertex(i, vertex)
Expand All @@ -33,7 +33,7 @@
for (var i = 0; i &lt; mdt.GetVertexCount(); i++)
{
Vector3 vertex = mdt.GetVertex(i);
// In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded.
// In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
vertex += mdt.GetVertexNormal(i);
// Save your change.
mdt.SetVertex(i, vertex);
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/OS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
</return>
<description>
Returns the current UNIX epoch timestamp in seconds.
[b]Important:[/b] This is the system clock that the user can manully set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
[b]Important:[/b] This is the system clock that the user can manually set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
</description>
</method>
<method name="get_unix_time_from_datetime" qualifiers="const">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
[b]Feature tags:[/b] Project settings can be overriden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
[b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
[b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
</description>
<tutorials>
Expand Down
2 changes: 1 addition & 1 deletion drivers/vulkan/vulkan_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ Error VulkanContext::_check_capabilities() {

device_features_func(gpu, &device_features);
multiview_capabilities.is_supported = multiview_features.multiview;
// For now we ignore if multiview is available in geometry and tesselation as we do not currently support those
// For now we ignore if multiview is available in geometry and tessellation as we do not currently support those
}

// check extended properties
Expand Down
6 changes: 3 additions & 3 deletions editor/action_map_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static const char *_joy_axis_descriptions[JOY_AXIS_MAX * 2] = {
String InputEventConfigurationDialog::get_event_text(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND_V_MSG(p_event.is_null(), String(), "Provided event is not a valid instance of InputEvent");

// Joypad motion events will display slighlty differently than what the event->as_text() provides. See #43660.
// Joypad motion events will display slightly differently than what the event->as_text() provides. See #43660.
Ref<InputEventJoypadMotion> jpmotion = p_event;
if (jpmotion.is_valid()) {
String desc = TTR("Unknown Joypad Axis");
Expand Down Expand Up @@ -731,7 +731,7 @@ void ActionMapEditor::_add_action_pressed() {

void ActionMapEditor::_add_action(const String &p_name) {
if (p_name == "" || !_is_action_name_valid(p_name)) {
show_message(TTR("Invalid action name. it cannot be.is_empty()() nor contain '/', ':', '=', '\\' or '\"'"));
show_message(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'"));
return;
}

Expand All @@ -756,7 +756,7 @@ void ActionMapEditor::_action_edited() {

if (new_name == "" || !_is_action_name_valid(new_name)) {
ti->set_text(0, old_name);
show_message(TTR("Invalid action name. it cannot be.is_empty()() nor contain '/', ':', '=', '\\' or '\"'"));
show_message(TTR("Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or '\"'"));
return;
}

Expand Down
2 changes: 1 addition & 1 deletion editor/editor_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class EditorData {
EditorPlugin *get_editor_plugin(int p_idx);

UndoRedo &get_undo_redo();
void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks shoud have 4 args: (Object* undo_redo, Object *modified_object, String property, Varian new_value)
void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks should have 4 args: (Object* undo_redo, Object *modified_object, String property, Variant new_value)
void remove_undo_redo_inspector_hook_callback(Callable p_callable);
const Vector<Callable> get_undo_redo_inspector_hook_callback();

Expand Down
2 changes: 1 addition & 1 deletion editor/editor_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ EditorLog::EditorLog() {
collapse_button = memnew(Button);
collapse_button->set_flat(true);
collapse_button->set_focus_mode(FOCUS_NONE);
collapse_button->set_tooltip(TTR("Collapse duplicate messages into one log entry. Shows number of occurences."));
collapse_button->set_tooltip(TTR("Collapse duplicate messages into one log entry. Shows number of occurrences."));
collapse_button->set_toggle_mode(true);
collapse_button->set_pressed(false);
collapse_button->connect("toggled", callable_mp(this, &EditorLog::_set_collapse));
Expand Down
2 changes: 1 addition & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5291,7 +5291,7 @@ void EditorNode::_file_access_close_error_notify(const String &p_str) {

void EditorNode::reload_scene(const String &p_path) {
/*
* No longer necesary since scenes now reset and reload their internal resource if needed.
* No longer necessary since scenes now reset and reload their internal resource if needed.
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
List<Ref<Resource>> cached;
Expand Down
2 changes: 1 addition & 1 deletion editor/import/scene_import_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void SceneImportSettings::_update_scene() {
material_tree->clear();
mesh_tree->clear();

//hiden roots
//hidden roots
material_tree->create_item();
mesh_tree->create_item();

Expand Down
8 changes: 4 additions & 4 deletions editor/plugins/tiles/tile_map_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ Set<TileMapEditorTerrainsPlugin::Constraint> TileMapEditorTerrainsPlugin::_get_c

Map<int, int> terrain_count;

// Count the number of occurences per terrain.
// Count the number of occurrences per terrain.
Map<Vector2i, TileSet::CellNeighbor> overlapping_terrain_bits = c.get_overlapping_coords_and_peering_bits();
for (Map<Vector2i, TileSet::CellNeighbor>::Element *E_overlapping = overlapping_terrain_bits.front(); E_overlapping; E_overlapping = E_overlapping->next()) {
if (!p_to_replace.has(E_overlapping->key())) {
Expand All @@ -2165,7 +2165,7 @@ Set<TileMapEditorTerrainsPlugin::Constraint> TileMapEditorTerrainsPlugin::_get_c
}
}

// Get the terrain with the max number of occurences.
// Get the terrain with the max number of occurrences.
int max = 0;
int max_terrain = -1;
for (Map<int, int>::Element *E_terrain_count = terrain_count.front(); E_terrain_count; E_terrain_count = E_terrain_count->next()) {
Expand Down Expand Up @@ -2231,7 +2231,7 @@ Map<Vector2i, TileMapEditorTerrainsPlugin::TerrainsTilePattern> TileMapEditorTer
per_cell_acceptable_tiles[E->get()] = _get_valid_terrains_tile_patterns_for_constraints(p_terrain_set, E->get(), constraints);
}

// Ouput map.
// Output map.
Map<Vector2i, TerrainsTilePattern> output;

// Add all positions to a set.
Expand Down Expand Up @@ -2450,7 +2450,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrains(const Map
output[E->key()] = _get_random_tile_from_pattern(p_terrain_set, E->get());
}

// Override the WFC results to make sure at least the painted tiles are acutally painted.
// Override the WFC results to make sure at least the painted tiles are actually painted.
for (Map<Vector2i, TerrainsTilePattern>::Element *E_to_paint = p_to_paint.front(); E_to_paint; E_to_paint = E_to_paint->next()) {
output[E_to_paint->key()] = _get_random_tile_from_pattern(p_terrain_set, E_to_paint->get());
}
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/tiles/tile_set_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void TileSetEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, C
tile_set_atlas_source_editor->init_source();
}

// Update the selected source (thus trigerring an update).
// Update the selected source (thus triggering an update).
_update_atlas_sources_list(source_id);
}
}
Expand Down
38 changes: 19 additions & 19 deletions editor/plugins/visual_shader_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ void VisualShaderEditor::_convert_constants_to_uniforms(bool p_vice_versa) {
for (Set<int>::Element *E = current_set.front(); E; E = E->next()) {
int node_id = E->get();
Ref<VisualShaderNode> node = visual_shader->get_node(type_id, node_id);
bool catched = false;
bool caught = false;
Variant var;

// float
Expand All @@ -2436,112 +2436,112 @@ void VisualShaderEditor::_convert_constants_to_uniforms(bool p_vice_versa) {
if (float_const.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeFloatConstant", "VisualShaderNodeFloatUniform");
var = float_const->get_constant();
catched = true;
caught = true;
}
} else {
Ref<VisualShaderNodeFloatUniform> float_uniform = Object::cast_to<VisualShaderNodeFloatUniform>(node.ptr());
if (float_uniform.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeFloatUniform", "VisualShaderNodeFloatConstant");
var = float_uniform->get_default_value();
catched = true;
caught = true;
}
}

// int
if (!catched) {
if (!caught) {
if (!p_vice_versa) {
Ref<VisualShaderNodeIntConstant> int_const = Object::cast_to<VisualShaderNodeIntConstant>(node.ptr());
if (int_const.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeIntConstant", "VisualShaderNodeIntUniform");
var = int_const->get_constant();
catched = true;
caught = true;
}
} else {
Ref<VisualShaderNodeIntUniform> int_uniform = Object::cast_to<VisualShaderNodeIntUniform>(node.ptr());
if (int_uniform.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeIntUniform", "VisualShaderNodeIntConstant");
var = int_uniform->get_default_value();
catched = true;
caught = true;
}
}
}

// boolean
if (!catched) {
if (!caught) {
if (!p_vice_versa) {
Ref<VisualShaderNodeBooleanConstant> boolean_const = Object::cast_to<VisualShaderNodeBooleanConstant>(node.ptr());
if (boolean_const.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeBooleanConstant", "VisualShaderNodeBooleanUniform");
var = boolean_const->get_constant();
catched = true;
caught = true;
}
} else {
Ref<VisualShaderNodeBooleanUniform> boolean_uniform = Object::cast_to<VisualShaderNodeBooleanUniform>(node.ptr());
if (boolean_uniform.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeBooleanUniform", "VisualShaderNodeBooleanConstant");
var = boolean_uniform->get_default_value();
catched = true;
caught = true;
}
}
}

// vec3
if (!catched) {
if (!caught) {
if (!p_vice_versa) {
Ref<VisualShaderNodeVec3Constant> vec3_const = Object::cast_to<VisualShaderNodeVec3Constant>(node.ptr());
if (vec3_const.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeVec3Constant", "VisualShaderNodeVec3Uniform");
var = vec3_const->get_constant();
catched = true;
caught = true;
}
} else {
Ref<VisualShaderNodeVec3Uniform> vec3_uniform = Object::cast_to<VisualShaderNodeVec3Uniform>(node.ptr());
if (vec3_uniform.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeVec3Uniform", "VisualShaderNodeVec3Constant");
var = vec3_uniform->get_default_value();
catched = true;
caught = true;
}
}
}

// color
if (!catched) {
if (!caught) {
if (!p_vice_versa) {
Ref<VisualShaderNodeColorConstant> color_const = Object::cast_to<VisualShaderNodeColorConstant>(node.ptr());
if (color_const.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeColorConstant", "VisualShaderNodeColorUniform");
var = color_const->get_constant();
catched = true;
caught = true;
}
} else {
Ref<VisualShaderNodeColorUniform> color_uniform = Object::cast_to<VisualShaderNodeColorUniform>(node.ptr());
if (color_uniform.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeColorUniform", "VisualShaderNodeColorConstant");
var = color_uniform->get_default_value();
catched = true;
caught = true;
}
}
}

// transform
if (!catched) {
if (!caught) {
if (!p_vice_versa) {
Ref<VisualShaderNodeTransformConstant> transform_const = Object::cast_to<VisualShaderNodeTransformConstant>(node.ptr());
if (transform_const.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeTransformConstant", "VisualShaderNodeTransformUniform");
var = transform_const->get_constant();
catched = true;
caught = true;
}
} else {
Ref<VisualShaderNodeTransformUniform> transform_uniform = Object::cast_to<VisualShaderNodeTransformUniform>(node.ptr());
if (transform_uniform.is_valid()) {
_replace_node(type_id, node_id, "VisualShaderNodeTransformUniform", "VisualShaderNodeTransformConstant");
var = transform_uniform->get_default_value();
catched = true;
caught = true;
}
}
}
ERR_CONTINUE(!catched);
ERR_CONTINUE(!caught);
int preview_port = node->get_output_port_for_preview();

if (!p_vice_versa) {
Expand Down
2 changes: 1 addition & 1 deletion misc/dist/html/service-worker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This service worker is required to expose an exported Godot project as a
// Progressive Web App. It provides an offline fallback page telling the user
// that they need an Internet conneciton to run the project if desired.
// that they need an Internet connection to run the project if desired.
// Incrementing CACHE_VERSION will kick off the install event and force
// previously cached resources to be updated from the network.
const CACHE_VERSION = "@GODOT_VERSION@";
Expand Down
4 changes: 2 additions & 2 deletions misc/scripts/check_ci_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
# execution of project

if file_contents.find("Assertion failed") != -1:
print("ERROR: Assertion failed in project, check exectution log for more info")
print("ERROR: Assertion failed in project, check execution log for more info")
sys.exit(1)

# For now Godot leaks a lot of rendering stuff so for now we just show info
# about it and this needs to be reenabled after fixing this memory leaks.
# about it and this needs to be re-enabled after fixing this memory leaks.

if file_contents.find("were leaked") != -1 or file_contents.find("were never freed") != -1:
print("WARNING: Memory leak was found")
Expand Down
Loading

0 comments on commit 4219a4c

Please sign in to comment.