Skip to content

Fix miscellaneous oddities around the class reference (part 6) #107536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mickeon
Copy link
Member

@Mickeon Mickeon commented Jun 14, 2025

Continuation of #107143

This PR addressed yet yet another huge chunk of class reference oddities I remembered to note down for later while localizing the class reference. Some of these are clear typos, some are inconsistencies, some are just awkward.

Of particular note:

  • Standardize the description for language everywhere
    • "Language code used for line-breaking and text shaping algorithms [...]" and similar
  • Replace a very nasty "The color's alpha channel" pun
  • Reword EditorSetting's network/connection/network_mode to be somewhat less awkward
  • Reword the following for clarity:
    • Window's move_to_center
    • Sprite2D's is_pixel_opaque
    • StreamPeer's get_data and get_double
    • TabBar's tab_close_pressed
    • PortableCompressedTexture2D's keep_compressed_buffer
  • Shifted VoxelGI's size description around
  • Mention CanvasItem in the deprecated warnings of the oversampling properties
  • Remove redundant "deprecated" from some descriptions
    • There is no point stating this in the description itself. The deprecation warning is already enough
  • Reword GeometryInstance3D's cast_shadow to be more meaningful
  • Remove "0 = off [...]" from ProjectSetting's xr/openxr/foveation_level
    • We genuinely don't do this anywhere, and it's not particularly polished
  • Removed "user signals" from Script's get_script_signal_list
    • This is hugely misleading, because "user signals" are separate and created through add_user_signal
  • Add [code] tags to TextServer's string_to_upper & similar
    • For consistency with the corresponding String methods
  • Add link to RFC 645 specifications to a few of WebSocketPeer's descriptions
  • Replace a few occurrences of "timely" and "forward renderer" with more common alternatives
  • Fix missing word in all array's get methods
  • Fix typo in Control's leading description
    • This has been so long-standing, I am not sure if I should actually fix it, because it will invalidate localizations really badly
  • Fix DisplayServer's screen_get_pixel claiming it returns a whole screenshot and literally the entire [Color] type
  • Fix missed standardization of horizontal_alignment properties, leading to duplicate translation strings
  • Fix "parameters" being referred as "arguments" in a few places
  • Fix some missing articles on the way

For some of the descriptions affected, additional tweaks have been made to justify a whole translation string change.

@Mickeon Mickeon added this to the 4.5 milestone Jun 14, 2025
@Mickeon Mickeon requested review from a team as code owners June 14, 2025 15:14
@Mickeon Mickeon removed the request for review from a team June 14, 2025 15:15
@Mickeon Mickeon force-pushed the documentation-miscellaneous-oddities-part-6 branch from 765a896 to 5735913 Compare June 14, 2025 15:16
@@ -31,7 +31,7 @@
</methods>
<members>
<member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting" default="1">
The selected shadow casting flag.
The mode used to cast shadows from this instance.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternative which I am genuinely not sure.

Suggested change
The mode used to cast shadows from this instance.
The way in which this instance casts shadows.

Comment on lines 294 to +296
<param index="0" name="file" type="String" />
<description>
Returns file size in bytes, or [code]-1[/code] on error.
Returns the size of the file at the given path, in bytes, or [code]-1[/code] on error.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, file is actually a file path. Put a pin on this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be changed to path, renaming argument is not breaking change.

@@ -3745,7 +3745,7 @@
<param index="7" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" default="0" />
<description>
Creates a texture based on a native handle that was created outside of Godot's renderer.
[b]Note:[/b] If using only the rendering device renderer, it's recommend to use [method RenderingDevice.texture_create_from_extension] together with [method RenderingServer.texture_rd_create], rather than this method. It will give you much more control over the texture's format and usage.
[b]Note:[/b] If using only the rendering device renderer, it's recommend to use [method RenderingDevice.texture_create_from_extension] together with [method RenderingServer.texture_rd_create], rather than this method. This way, the texture's format and usage can be controlled more effectively.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason this was done is because the previous sentence is indirect (no "you"). But, alternatively:

Suggested change
[b]Note:[/b] If using only the rendering device renderer, it's recommend to use [method RenderingDevice.texture_create_from_extension] together with [method RenderingServer.texture_rd_create], rather than this method. This way, the texture's format and usage can be controlled more effectively.
[b]Note:[/b] If using only the rendering device renderer, it's recommend to use [method RenderingDevice.texture_create_from_extension] together with [method RenderingServer.texture_rd_create], rather than this method. You will be able to control the texture's format and usage more effectively.

@@ -3410,7 +3410,7 @@
The ratio of [WorkerThreadPool]'s threads that will be reserved for low-priority tasks. For example, if 10 threads are available and this value is set to [code]0.3[/code], 3 of the worker threads will be reserved for low-priority tasks. The actual value won't exceed the number of CPU cores minus one, and if possible, at least one worker thread will be dedicated to low-priority tasks.
</member>
<member name="threading/worker_pool/max_threads" type="int" setter="" getter="" default="-1">
Maximum number of threads to be used by [WorkerThreadPool]. Value of [code]-1[/code] means [code]1[/code] on Web, or a number of [i]logical[/i] CPU cores available on other platforms (see [method OS.get_processor_count]).
Maximum number of threads to be used by [WorkerThreadPool]. On Web, a value of [code]-1[/code] means [code]1[/code]. On other platforms, it means all [i]logical[/i] CPU cores available (see [method OS.get_processor_count]).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something about this still bothers me.

@@ -3356,7 +3356,7 @@
If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP.
</member>
<member name="rendering/textures/vram_compression/cache_gpu_compressor" type="bool" setter="" getter="" default="true">
If [code]true[/code], the GPU texture compressor will cache the local RenderingDevice and its resources (shaders and pipelines), allowing for faster subsequent imports at a memory cost.
If [code]true[/code], the GPU texture compressor will cache the local RenderingDevice and its resources (shaders and pipelines), making subsequent imports faster at the cost of increased memory usage.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this was fine before? It was very succinct, maybe too much.

@@ -522,7 +522,7 @@
A signal can only be connected once to the same [Callable]. If the signal is already connected, this method returns [constant ERR_INVALID_PARAMETER] and generates an error, unless the signal is connected with [constant CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections.
[b]Note:[/b] If the [param callable]'s object is freed, the connection will be lost.
[b]Note:[/b] In GDScript, it is generally recommended to connect signals with [method Signal.connect] instead.
[b]Note:[/b] This operation (and all other signal related operations) is thread-safe.
[b]Note:[/b] This method, and all other signal-related methods, are thread-safe.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I genuinely don't think this note needs to exist, especially specifically only in Object.connect, but I digress.

@Mickeon Mickeon modified the milestones: 4.5, 4.x Jun 14, 2025
@Mickeon Mickeon force-pushed the documentation-miscellaneous-oddities-part-6 branch 2 times, most recently from c82c970 to 216435e Compare June 15, 2025 19:47
@Mickeon Mickeon requested a review from bruvzg June 15, 2025 19:47
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GUI/TextServer related changes look good.

Comment on lines 294 to +296
<param index="0" name="file" type="String" />
<description>
Returns file size in bytes, or [code]-1[/code] on error.
Returns the size of the file at the given path, in bytes, or [code]-1[/code] on error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be changed to path, renaming argument is not breaking change.

@Mickeon Mickeon force-pushed the documentation-miscellaneous-oddities-part-6 branch from 216435e to 6df0ff0 Compare June 16, 2025 15:48
@Mickeon Mickeon requested review from AThousandShips and bruvzg June 16, 2025 15:50
@Mickeon Mickeon modified the milestones: 4.x, 4.5 Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants