Skip to content

Document quirks when using TranslationServer in the Editor #107892

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 5 commits into
base: master
Choose a base branch
from

Conversation

betalars
Copy link
Contributor

This is a small enhancement to the TranslationServer documentation mainly aimed at preventing #98935 from being raised again in the future.

Feel free to not use the code example. I think it adds some utility and clairity, but may be better suited for a dedicated tutorial on different tool quirks I am still trying to work on in the background.

@betalars betalars requested a review from a team as a code owner June 23, 2025 12:57
@betalars
Copy link
Contributor Author

Hm, I don't seem to understand why the check failed.

@timothyqiu
Copy link
Member

TranslationServer will not load translations in the editor.

It loads.

But the main domain and godot.* domains are controled by the editor. e.g., disabling translation preview disables the main domain. So when translation preview is off, calling translate() on the main domain won't translate anything, and your MRP for #98935 still fails.

I think your sample code is too scenario specific. It could just be adding a note like:

[b]Note:[/b] The editor uses the main translation domain internally. Do not use tool scripts in the editor to perform operations involving the main translation domain unless you know what you are doing.

I'm not sure about the wording.

@betalars
Copy link
Contributor Author

@timothyqiu okay I really got this backwards then trying to explain it from the responses I have gotten to my bug report.

Thanks for the fact-check, I fixed it based on your advice.

@AThousandShips AThousandShips added this to the 4.x milestone Jun 23, 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.

5 participants