Skip to content

Commit

Permalink
Add Redot codespell documentation correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Spartan322 committed Dec 22, 2024
1 parent 6b505cc commit 7cb659e
Show file tree
Hide file tree
Showing 30 changed files with 141 additions and 107 deletions.
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,36 @@ repos:
)
additional_dependencies: [tomli]

- id: codespell
name: codespell-redot-docs
args:
- -D
- custom_dict.txt
- --ignore-regex
- |
(?x)(
Godot\.\w|
Godot;|
Godot\ Shader\ Language|
highlight=Godot%20Engine%3%docs|
highlight=Godot\ Engine:docs|
github\.com\/godotengine\/godot|
not\ Godot\ (Shaders|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|
donor\ names\ for\ Godot|
Godot\ Physics|
\[code\]godot\.\[\/code\]\ are\ reserved\ for\ engine\ internals
)
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
4 changes: 4 additions & 0 deletions custom_dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Godot->Redot
godot->redot
GODOT->REDOT
Godots->Redots
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/EditorScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
Scripts extending this class and implementing its [method _run] method can be executed from the Script Editor's [b]File &gt; Run[/b] menu option (or by pressing [kbd]Ctrl + Shift + X[/kbd]) while the editor is running. This is useful for adding custom in-editor functionality to Redot. For more complex additions, consider using [EditorPlugin]s instead.
[b]Note:[/b] Extending scripts need to have [code]tool[/code] mode enabled.
[b]Example:[/b] Running the following script prints "Hello from the Godot Editor!":
[b]Example:[/b] Running the following script prints "Hello from the Redot Editor!":
[codeblocks]
[gdscript]
@tool
Expand Down
12 changes: 6 additions & 6 deletions doc/classes/OS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,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 Expand Up @@ -887,13 +887,13 @@
Standard I/O device is invalid. No data can be received from or sent to these standard I/O devices.
</constant>
<constant name="STD_HANDLE_CONSOLE" value="1" enum="StdHandleType">
Standard I/O device is a console. This typically occurs when Godot is run from a terminal with no redirection. This is also used for all standard I/O devices when running Godot from the editor, at least on desktop platforms.
Standard I/O device is a console. This typically occurs when Redot is run from a terminal with no redirection. This is also used for all standard I/O devices when running Redot from the editor, at least on desktop platforms.
</constant>
<constant name="STD_HANDLE_FILE" value="2" enum="StdHandleType">
Standard I/O device is a regular file. This typically occurs with redirection from a terminal, e.g. [code]godot &gt; stdout.txt[/code], [code]godot &lt; stdin.txt[/code] or [code]godot &gt; stdout_stderr.txt 2&gt;&amp;1[/code].
Standard I/O device is a regular file. This typically occurs with redirection from a terminal, e.g. [code]redot &gt; stdout.txt[/code], [code]redot &lt; stdin.txt[/code] or [code]redot &gt; stdout_stderr.txt 2&gt;&amp;1[/code].
</constant>
<constant name="STD_HANDLE_PIPE" value="3" enum="StdHandleType">
Standard I/O device is a FIFO/pipe. This typically occurs with pipe usage from a terminal, e.g. [code]echo "Hello" | godot[/code].
Standard I/O device is a FIFO/pipe. This typically occurs with pipe usage from a terminal, e.g. [code]echo "Hello" | redot[/code].
</constant>
<constant name="STD_HANDLE_UNKNOWN" value="4" enum="StdHandleType">
Standard I/O device type is unknown.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,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 @@ -791,7 +791,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 @@ -2404,7 +2404,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]Performance:[/b] CSG nodes are only intended for prototyping as they have a significant CPU performance cost.
Consider baking final CSG operation results into static geometry that replaces the CSG nodes.
Individual CSG root node results can be baked to nodes with static resources with the editor menu that appears when a CSG root node is selected.
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 [code]true[/code].
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 [code]true[/code].
</member>
<member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
If [code]true[/code], the camera is in perspective mode. Otherwise, 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 [code]false[/code].
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 [code]false[/code].
</member>
</members>
</class>
Loading

0 comments on commit 7cb659e

Please sign in to comment.