Skip to content

Commit

Permalink
Merge pull request #903 from Spartan322/4.3-add/rebrand-codespell-dict
Browse files Browse the repository at this point in the history
[4.3] Add Redot codespell documentation correction
  • Loading branch information
Spartan322 authored Dec 22, 2024
2 parents 3e8a040 + 907291f commit 49f7d38
Show file tree
Hide file tree
Showing 28 changed files with 92 additions and 84 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ repos:
- id: codespell
additional_dependencies: [tomli]

- id: codespell
name: codespell-redot-docs
args: ['-D', 'custom_dict.txt', '--ignore-regex', 'Godot\.\w|Godot;|Godot Shader Language|highlight=Godot%20Engine%3%docs|highlight=Godot Engine:docs|github\.com\/godotengine\/godot|not Godot shaders|Godot [3|4](\.[0-9x])?|project\.godot|logs\/godot\.log|\.godot\/|org\.godot\.example:my-plugin:0\.0\.0|Godot version 4\.1 compatibility|file extension must be \[code\]\.godot\[\/code\]|directory \(\[code\]\.?godot\[\/code\]\)|\[code\]\.godot\[\/code\] folder']
files: ^(doc/classes|.*/doc_classes)/.*\.xml$

### Requires Docker; look into alternative implementation.
# - repo: https://github.com/comkieffer/pre-commit-xmllint.git
# rev: 1.0.0
Expand Down
3 changes: 3 additions & 0 deletions custom_dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Godot->Redot
godot->redot
GODOT->REDOT
18 changes: 9 additions & 9 deletions doc/classes/EditorPaths.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails).
[b]Default paths per platform:[/b]
[codeblock lang=text]
- Windows: %LOCALAPPDATA%\Godot\
- macOS: ~/Library/Caches/Godot/
- Linux: ~/.cache/godot/
- Windows: %LOCALAPPDATA%\Redot\
- macOS: ~/Library/Caches/Redot/
- Linux: ~/.cache/redot/
[/codeblock]
</description>
</method>
Expand All @@ -30,9 +30,9 @@
Returns the absolute path to the user's configuration folder. This folder should be used for [i]persistent[/i] user configuration files.
[b]Default paths per platform:[/b]
[codeblock lang=text]
- Windows: %APPDATA%\Godot\ (same as `get_data_dir()`)
- macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`)
- Linux: ~/.config/godot/
- Windows: %APPDATA%\Redot\ (same as `get_data_dir()`)
- macOS: ~/Library/Application Support/Redot/ (same as `get_data_dir()`)
- Linux: ~/.config/redot/
[/codeblock]
</description>
</method>
Expand All @@ -42,9 +42,9 @@
Returns the absolute path to the user's data folder. This folder should be used for [i]persistent[/i] user data files such as installed export templates.
[b]Default paths per platform:[/b]
[codeblock lang=text]
- Windows: %APPDATA%\Godot\ (same as `get_config_dir()`)
- macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`)
- Linux: ~/.local/share/godot/
- Windows: %APPDATA%\Redot\ (same as `get_config_dir()`)
- macOS: ~/Library/Application Support/Redot/ (same as `get_config_dir()`)
- Linux: ~/.local/share/redot/
[/codeblock]
</description>
</method>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/FileAccess.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
<param index="2" name="compression_mode" type="int" enum="FileAccess.CompressionMode" default="0" />
<description>
Creates a new [FileAccess] object and opens a compressed file for reading or writing.
[b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround.
[b]Note:[/b] [method open_compressed] can only read files that were saved by Redot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround.
Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/OS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,9 @@
<return type="String" />
<description>
Returns the absolute directory path where user data is written (the [code]user://[/code] directory in Redot). The path depends on the project name and [member ProjectSettings.application/config/use_custom_user_dir].
- On Windows, this is [code]%AppData%\Godot\app_userdata\[project_name][/code], or [code]%AppData%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%AppData%[/code] expands to [code]%UserProfile%\AppData\Roaming[/code].
- On macOS, this is [code]~/Library/Application Support/Godot/app_userdata/[project_name][/code], or [code]~/Library/Application Support/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
- On Linux and BSD, this is [code]~/.local/share/godot/app_userdata/[project_name][/code], or [code]~/.local/share/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
- On Windows, this is [code]%AppData%\Redot\app_userdata\[project_name][/code], or [code]%AppData%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%AppData%[/code] expands to [code]%UserProfile%\AppData\Roaming[/code].
- On macOS, this is [code]~/Library/Application Support/Redot/app_userdata/[project_name][/code], or [code]~/Library/Application Support/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
- On Linux and BSD, this is [code]~/.local/share/redot/app_userdata/[project_name][/code], or [code]~/.local/share/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
- On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration.
- On Web, this is a virtual directory managed by the browser.
If the project name is empty, [code][project_name][/code] falls back to [code][unnamed project][/code].
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
If [code]true[/code], the application quits automatically when navigating back (e.g. using the system "Back" button on Android).
</member>
<member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false">
If [code]true[/code], the project will save user data to its own user directory. If [member application/config/custom_user_dir_name] is empty, [code]&lt;OS user data directory&gt;/&lt;project name&gt;[/code] directory will be used. If [code]false[/code], the project will save user data to [code]&lt;OS user data directory&gt;/Godot/app_userdata/&lt;project name&gt;[/code].
If [code]true[/code], the project will save user data to its own user directory. If [member application/config/custom_user_dir_name] is empty, [code]&lt;OS user data directory&gt;/&lt;project name&gt;[/code] directory will be used. If [code]false[/code], the project will save user data to [code]&lt;OS user data directory&gt;/Redot/app_userdata/&lt;project name&gt;[/code].
See also [url=$DOCS_URL/tutorials/io/data_paths.html#accessing-persistent-user-data-user]File paths in Redot projects[/url]. This setting is only effective on desktop platforms.
</member>
<member name="application/config/use_hidden_project_data_directory" type="bool" setter="" getter="" default="true">
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/RenderingDevice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@
<param index="1" name="allow_cache" type="bool" default="true" />
<description>
Compiles a SPIR-V from the shader source code in [param shader_source] and returns the SPIR-V as a [RDShaderSPIRV]. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using [method shader_compile_binary_from_spirv].
If [param allow_cache] is [code]true[/code], make use of the shader cache generated by Godot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If [param allow_cache] is [code]false[/code], Godot's shader cache is ignored and the shader will always be recompiled.
If [param allow_cache] is [code]true[/code], make use of the shader cache generated by Redot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If [param allow_cache] is [code]false[/code], Redot's shader cache is ignored and the shader will always be recompiled.
</description>
</method>
<method name="shader_create_from_bytecode">
Expand Down Expand Up @@ -2222,7 +2222,7 @@
Compute shader stage bit (see also [constant SHADER_STAGE_COMPUTE]).
</constant>
<constant name="SHADER_LANGUAGE_GLSL" value="0" enum="ShaderLanguage">
Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Godot shaders.
Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Redot shaders.
</constant>
<constant name="SHADER_LANGUAGE_HLSL" value="1" enum="ShaderLanguage">
Microsoft's High-Level Shading Language (used natively by Direct3D, but can also be used in Vulkan).
Expand Down
2 changes: 1 addition & 1 deletion modules/csg/doc_classes/CSGShape3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
The CSG base class.
</brief_description>
<description>
This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.
This is the CSG base class that provides CSG operation support to the various CSG nodes in Redot.
[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
</description>
<tutorials>
Expand Down
4 changes: 2 additions & 2 deletions modules/enet/doc_classes/ENetConnection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@
<param index="0" name="hostname" type="String" />
<param index="1" name="client_options" type="TLSOptions" default="null" />
<description>
Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before [method connect_to_host] to have ENet connect using DTLS validating the server certificate against [param hostname]. You can pass the optional [param client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].
Configure this ENetHost to use the custom Redot extension allowing DTLS encryption for ENet clients. Call this before [method connect_to_host] to have ENet connect using DTLS validating the server certificate against [param hostname]. You can pass the optional [param client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].
</description>
</method>
<method name="dtls_server_setup">
<return type="int" enum="Error" />
<param index="0" name="server_options" type="TLSOptions" />
<description>
Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after [method create_host_bound] to have ENet expect peers to connect using DTLS. See [method TLSOptions.server].
Configure this ENetHost to use the custom Redot extension allowing DTLS encryption for ENet servers. Call this right after [method create_host_bound] to have ENet expect peers to connect using DTLS. See [method TLSOptions.server].
</description>
</method>
<method name="flush">
Expand Down
8 changes: 4 additions & 4 deletions modules/gltf/doc_classes/GLTFCamera.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<return type="GLTFCamera" />
<param index="0" name="camera_node" type="Camera3D" />
<description>
Create a new GLTFCamera instance from the given Godot [Camera3D] node.
Create a new GLTFCamera instance from the given Redot [Camera3D] node.
</description>
</method>
<method name="to_dictionary" qualifiers="const">
Expand All @@ -35,7 +35,7 @@
<method name="to_node" qualifiers="const">
<return type="Camera3D" />
<description>
Converts this GLTFCamera instance into a Godot [Camera3D] node.
Converts this GLTFCamera instance into a Redot [Camera3D] node.
</description>
</method>
</methods>
Expand All @@ -47,13 +47,13 @@
The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's [code]znear[/code] property.
</member>
<member name="fov" type="float" setter="set_fov" getter="get_fov" default="1.309">
The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's [code]yfov[/code] property. This value is only used for perspective cameras, when [member perspective] is true.
The FOV of the camera. This class and GLTF define the camera FOV in radians, while Redot uses degrees. This maps to GLTF's [code]yfov[/code] property. This value is only used for perspective cameras, when [member perspective] is true.
</member>
<member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera [code]type[/code] property. See [member Camera3D.projection] and the GLTF spec for more information.
</member>
<member name="size_mag" type="float" setter="set_size_mag" getter="get_size_mag" default="0.5">
The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's [code]ymag[/code] property. This value is only used for orthographic/orthogonal cameras, when [member perspective] is false.
The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Redot defines it as a diameter in meters. This maps to GLTF's [code]ymag[/code] property. This value is only used for orthographic/orthogonal cameras, when [member perspective] is false.
</member>
</members>
</class>
16 changes: 8 additions & 8 deletions modules/gltf/doc_classes/GLTFDocument.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GLTFDocument" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Class for importing and exporting glTF files in and out of Godot.
Class for importing and exporting glTF files in and out of Redot.
</brief_description>
<description>
GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene.
GLTFDocument supports reading data from a glTF file, buffer, or Redot scene. This data can then be written to the filesystem, buffer, or used to create a Redot scene.
All of the data in a GLTF scene is stored in the [GLTFState] class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different [GLTFState] objects.
GLTFDocument can be extended with arbitrary functionality by extending the [GLTFDocumentExtension] class and registering it with GLTFDocument via [method register_gltf_document_extension]. This allows for custom data to be imported and exported.
</description>
Expand Down Expand Up @@ -42,7 +42,7 @@
<param index="1" name="state" type="GLTFState" />
<param index="2" name="flags" type="int" default="0" />
<description>
Takes a Godot Engine scene node and exports it and its descendants to the given [GLTFState] object through the [param state] parameter.
Takes a Redot Engine scene node and exports it and its descendants to the given [GLTFState] object through the [param state] parameter.
</description>
</method>
<method name="generate_buffer">
Expand All @@ -59,7 +59,7 @@
<param index="2" name="trimming" type="bool" default="false" />
<param index="3" name="remove_immutable_tracks" type="bool" default="true" />
<description>
Takes a [GLTFState] object through the [param state] parameter and returns a Godot Engine scene node.
Takes a [GLTFState] object through the [param state] parameter and returns a Redot Engine scene node.
The [param bake_fps] parameter overrides the bake_fps in [param state].
</description>
</method>
Expand Down Expand Up @@ -92,7 +92,7 @@
<members>
<member name="image_format" type="String" setter="set_image_format" getter="get_image_format" default="&quot;PNG&quot;">
The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array.
By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in [GLTFDocumentExtension] classes.
By default, Redot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in [GLTFDocumentExtension] classes.
</member>
<member name="lossy_quality" type="float" setter="set_lossy_quality" getter="get_lossy_quality" default="0.75">
If [member image_format] is a lossy image format, this determines the lossy quality of the image. On a range of [code]0.0[/code] to [code]1.0[/code], where [code]0.0[/code] is the lowest quality and [code]1.0[/code] is the highest quality. A lossy quality of [code]1.0[/code] is not the same as lossless.
Expand All @@ -104,13 +104,13 @@
</members>
<constants>
<constant name="ROOT_NODE_MODE_SINGLE_ROOT" value="0" enum="RootNodeMode">
Treat the Godot scene's root node as the root node of the glTF file, and mark it as the single root node via the [code]GODOT_single_root[/code] glTF extension. This will be parsed the same as [constant ROOT_NODE_MODE_KEEP_ROOT] if the implementation does not support [code]GODOT_single_root[/code].
Treat the Redot scene's root node as the root node of the glTF file, and mark it as the single root node via the [code]GODOT_single_root[/code] glTF extension. This will be parsed the same as [constant ROOT_NODE_MODE_KEEP_ROOT] if the implementation does not support [code]GODOT_single_root[/code].
</constant>
<constant name="ROOT_NODE_MODE_KEEP_ROOT" value="1" enum="RootNodeMode">
Treat the Godot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Godot. This uses only vanilla glTF features. This is equivalent to the behavior in Godot 4.1 and earlier.
Treat the Redot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Redot. This uses only vanilla glTF features. This is equivalent to the behavior in Redot 4.1 and earlier.
</constant>
<constant name="ROOT_NODE_MODE_MULTI_ROOT" value="2" enum="RootNodeMode">
Treat the Godot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Godot scene's root node will be preserved, as it will not be saved as a node.
Treat the Redot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Redot scene's root node will be preserved, as it will not be saved as a node.
</constant>
</constants>
</class>
Loading

0 comments on commit 49f7d38

Please sign in to comment.