Skip to content
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

Make auto_translate state inheritable #8897

Closed
YeldhamDev opened this issue Jan 16, 2024 · 1 comment · Fixed by godotengine/godot#87530
Closed

Make auto_translate state inheritable #8897

YeldhamDev opened this issue Jan 16, 2024 · 1 comment · Fixed by godotengine/godot#87530
Milestone

Comments

@YeldhamDev
Copy link
Member

Describe the project you are working on

The Godot Engine.

Describe the problem or limitation you are having in your project

auto_translate doesn't work correctly on some complex built-in Controls (e. g. FileDialog), due to the children being unaware if its parent's auto_translate is enabled or not.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a new auto_translate_mode member, that would work like process_mode, having values like INHERIT, ALWAYS, and DISABLED. This would not only fix the issue, but allow for some more advanced scenarios for users (e. g. having an entire portion of the UI not being translated).

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

To preserve compatibility, it would work as follows:

  • auto_translated_mode would be added with just the INHERIT (default) and ALWAYS values.
  • If auto_translate is disabled, it would be the same as setting auto_translated_mode to DISABLED.
  • Once we enter a phase were we can break compatibility again (likely Godot 5), auto_translate is removed and DISABLED is added to auto_translate_mode.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Not really, since this is for built-in nodes.

Is there a reason why this should be core and not an add-on in the asset library?

See above.

@MewPurPur
Copy link

MewPurPur commented Jan 17, 2024

I can attest to needing these advanced cases. Disabling auto-translate node by node is exhausting. In many workflows enabling it should be the exception, rather than the other way around.

The compatibulity breakage this change implies is also scary, but it's for the greater good I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants