Skip to content

Commit

Permalink
Merge pull request #905 from Spartan322/4.3-fix/rebrand-codespell
Browse files Browse the repository at this point in the history
[4.3] Improve rebrand codespell regex structure
  • Loading branch information
Spartan322 authored Dec 22, 2024
2 parents 49f7d38 + c1d339b commit 01c9acd
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 13 deletions.
31 changes: 30 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,36 @@ repos:

- 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']
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|
Godot's\ donor|
donor\ names\ for\ Godot|
info\]\ for\ Godot's|
in\ relation\ to\ Godot|
Godot\ Physics|
\[code\]godot\.\[\/code\]\ are\ reserved\ for\ engine\ internals|
Godot's\ own\ color\ palette\ for\ editor\ icons
)
files: ^(doc/classes|.*/doc_classes)/.*\.xml$

### Requires Docker; look into alternative implementation.
Expand Down
2 changes: 2 additions & 0 deletions custom_dict.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Godot->Redot
godot->redot
GODOT->REDOT
Godots->Redots
Godot's->Redot's
2 changes: 1 addition & 1 deletion doc/classes/RDShaderSource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</brief_description>
<description>
Shader source code in text form.
See also [RDShaderFile]. [RDShaderSource] is only meant to be used with the [RenderingDevice] API. It should not be confused with Godot's own [Shader] resource, which is what Godot's various nodes use for high-level shader programming.
See also [RDShaderFile]. [RDShaderSource] is only meant to be used with the [RenderingDevice] API. It should not be confused with Redot's own [Shader] resource, which is what Redot's various nodes use for high-level shader programming.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/RenderingDevice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Abstraction for working with modern low-level graphics APIs.
</brief_description>
<description>
[RenderingDevice] is an abstraction for working with modern low-level graphics APIs such as Vulkan. Compared to [RenderingServer] (which works with Godot's own rendering subsystems), [RenderingDevice] is much lower-level and allows working more directly with the underlying graphics APIs. [RenderingDevice] is used in Redot to provide support for several modern low-level graphics APIs while reducing the amount of code duplication required. [RenderingDevice] can also be used in your own projects to perform things that are not exposed by [RenderingServer] or high-level nodes, such as using compute shaders.
[RenderingDevice] is an abstraction for working with modern low-level graphics APIs such as Vulkan. Compared to [RenderingServer] (which works with Redot's own rendering subsystems), [RenderingDevice] is much lower-level and allows working more directly with the underlying graphics APIs. [RenderingDevice] is used in Redot to provide support for several modern low-level graphics APIs while reducing the amount of code duplication required. [RenderingDevice] can also be used in your own projects to perform things that are not exposed by [RenderingServer] or high-level nodes, such as using compute shaders.
On startup, Redot creates a global [RenderingDevice] which can be retrieved using [method RenderingServer.get_rendering_device]. This global [RenderingDevice] performs drawing to the screen.
[b]Local RenderingDevices:[/b] Using [method RenderingServer.create_local_rendering_device], you can create "secondary" rendering devices to perform drawing and GPU compute operations on separate threads.
[b]Note:[/b] [RenderingDevice] assumes intermediate knowledge of modern graphics APIs such as Vulkan, Direct3D 12, Metal or WebGPU. These graphics APIs are lower-level than OpenGL or Direct3D 11, requiring you to perform what was previously done by the graphics driver itself. If you have difficulty understanding the concepts used in this class, follow the [url=https://vulkan-tutorial.com/]Vulkan Tutorial[/url] or [url=https://vkguide.dev/]Vulkan Guide[/url]. It's recommended to have existing modern OpenGL or Direct3D 11 knowledge before attempting to learn a low-level graphics API.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/ResourceImporter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Base class for resource importers.
</brief_description>
<description>
This is the base class for Godot's resource importers. To implement your own resource importers using editor plugins, see [EditorImportPlugin].
This is the base class for Redot's resource importers. To implement your own resource importers using editor plugins, see [EditorImportPlugin].
</description>
<tutorials>
<link title="Import plugins">$DOCS_URL/tutorials/plugins/editor/import_plugins.html</link>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/SoftBody3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</member>
<member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0">
The body's drag coefficient. Higher values increase this body's air resistance.
[b]Note:[/b] This value is currently unused by Godot's default physics implementation.
[b]Note:[/b] This value is currently unused by Redot's default physics implementation.
</member>
<member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between [code]0.0[/code] and [code]1.0[/code] (inclusive).
Expand Down
2 changes: 1 addition & 1 deletion modules/gltf/doc_classes/GLTFPhysicsBody.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Represents a GLTF physics body.
</brief_description>
<description>
Represents a physics body as an intermediary between the [code]OMI_physics_body[/code] GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
Represents a physics body as an intermediary between the [code]OMI_physics_body[/code] GLTF data and Redot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
</description>
<tutorials>
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
Expand Down
2 changes: 1 addition & 1 deletion modules/gltf/doc_classes/GLTFPhysicsShape.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Represents a GLTF physics shape.
</brief_description>
<description>
Represents a physics shape as defined by the [code]OMI_physics_shape[/code] or [code]OMI_collider[/code] GLTF extensions. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
Represents a physics shape as defined by the [code]OMI_physics_shape[/code] or [code]OMI_collider[/code] GLTF extensions. This class is an intermediary between the GLTF data and Redot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
</description>
<tutorials>
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
Expand Down
2 changes: 1 addition & 1 deletion modules/openxr/doc_classes/OpenXRActionMap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Collection of [OpenXRActionSet] and [OpenXRInteractionProfile] resources for the OpenXR module.
</brief_description>
<description>
OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Redot supports.
OpenXR uses an action system similar to Redots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Redot supports.
Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available.
The action map therefore needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map.
</description>
Expand Down
2 changes: 1 addition & 1 deletion modules/regex/doc_classes/RegEx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
results.push_back(result.get_string())
# The `results` array now contains "One", "Two", "Three".
[/codeblock]
[b]Note:[/b] Godot's regex implementation is based on the [url=https://www.pcre.org/]PCRE2[/url] library. You can view the full pattern reference [url=https://www.pcre.org/current/doc/html/pcre2pattern.html]here[/url].
[b]Note:[/b] Redot's regex implementation is based on the [url=https://www.pcre.org/]PCRE2[/url] library. You can view the full pattern reference [url=https://www.pcre.org/current/doc/html/pcre2pattern.html]here[/url].
[b]Tip:[/b] You can use [url=https://regexr.com/]Regexr[/url] to test regular expressions online.
</description>
<tutorials>
Expand Down
2 changes: 1 addition & 1 deletion modules/text_server_adv/doc_classes/TextServerAdvanced.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
An advanced text server with support for BiDi, complex text layout, and contextual OpenType features. Used in Redot by default.
</brief_description>
<description>
An implementation of [TextServer] that uses HarfBuzz, ICU and SIL Graphite to support BiDi, complex text layouts and contextual OpenType features. This is Godot's default primary [TextServer] interface.
An implementation of [TextServer] that uses HarfBuzz, ICU and SIL Graphite to support BiDi, complex text layouts and contextual OpenType features. This is Redot's default primary [TextServer] interface.
</description>
<tutorials>
</tutorials>
Expand Down
4 changes: 2 additions & 2 deletions modules/text_server_fb/doc_classes/TextServerFallback.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextServerFallback" inherits="TextServerExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
A fallback implementation of Godot's text server, without support for BiDi and complex text layout.
A fallback implementation of Redot's text server, without support for BiDi and complex text layout.
</brief_description>
<description>
A fallback implementation of Godot's text server. This fallback is faster than [TextServerAdvanced] for processing a lot of text, but it does not support BiDi and complex text layout.
A fallback implementation of Redot's text server. This fallback is faster than [TextServerAdvanced] for processing a lot of text, but it does not support BiDi and complex text layout.
[b]Note:[/b] This text server is not part of official Redot binaries. If you want to use it, compile the engine with the option [code]module_text_server_fb_enabled=yes[/code].
</description>
<tutorials>
Expand Down
2 changes: 1 addition & 1 deletion modules/upnp/doc_classes/UPNP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
- Port mappings may change (and be removed) at any time, and the remote/external IP address of the gateway can change likewise. You should consider re-querying the external IP and try to update/refresh the port mapping periodically (for example, every 5 minutes and on networking failures).
- Not all devices support UPnP, and some users disable UPnP support. You need to handle this (e.g. documenting and requiring the user to manually forward ports, or adding alternative methods of NAT traversal, like a relay/mirror server, or NAT hole punching, STUN/TURN, etc.).
- Consider what happens on mapping conflicts. Maybe multiple users on the same network would like to play your game at the same time, or maybe another application uses the same port. Make the port configurable, and optimally choose a port automatically (re-trying with a different port on failure).
[b]Further reading:[/b] If you want to know more about UPnP (and the Internet Gateway Device (IGD) and Port Control Protocol (PCP) specifically), [url=https://en.wikipedia.org/wiki/Universal_Plug_and_Play]Wikipedia[/url] is a good first stop, the specification can be found at the [url=https://openconnectivity.org/developer/specifications/upnp-resources/upnp/]Open Connectivity Foundation[/url] and Godot's implementation is based on the [url=https://github.com/miniupnp/miniupnp]MiniUPnP client[/url].
[b]Further reading:[/b] If you want to know more about UPnP (and the Internet Gateway Device (IGD) and Port Control Protocol (PCP) specifically), [url=https://en.wikipedia.org/wiki/Universal_Plug_and_Play]Wikipedia[/url] is a good first stop, the specification can be found at the [url=https://openconnectivity.org/developer/specifications/upnp-resources/upnp/]Open Connectivity Foundation[/url] and Redot's implementation is based on the [url=https://github.com/miniupnp/miniupnp]MiniUPnP client[/url].
</description>
<tutorials>
</tutorials>
Expand Down

0 comments on commit 01c9acd

Please sign in to comment.