-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Move pseudolocalization into TranslationDomain
#96230
Move pseudolocalization into TranslationDomain
#96230
Conversation
ac3b810
to
e46ec00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the issues mentioned above, it works correctly.
Yes. This is the same behavior when pseudo-localization is enabled in game projects. Maybe pseudo-localization can skip empty strings. We can tweak this behavior in a later PR.
Labels in inspectors are not subject to auto translation.
It seems that tooltip texts always go through |
e46ec00
to
b029ff5
Compare
Also adds command-line option `--editor-pseudolocalization`
b029ff5
to
cca54ba
Compare
Yes, this is a better way to handle it. I'll update the remaining part of #96105 (number formatting) after this one is merged. |
Thanks! |
Follow-up to #95787
Partially supersedes #96105
This PR:
TranslationDomain
. So they can be changed per translation domain.--editor-pseudolocalization
command-line option to turn on pseudolocalization for the editor and project manager at startup.How plugins toggle their pseudolocalization
Demo project: test-4.zip
How to toggle editor pseudolocalization
The pseudolocalization of the project manager and editor can be enabled by using the command line parameter
--editor-pseudolocalization
.To toggle pseudolocalization of the editor at runtime, run this editor script:
Note that this script is meant for editor developers. The domain name
godot.editor
is an implementation detail. It might change without considering (i.e., breaking) existing editor scripts.Why you need to propagate
TRANSLATION_CHANGED
yourselfRegular users toggle pseudolocalization for their projects via
TranslationServer.pseudolocalization_enabled = enabled
. This will automatically emitNOTIFICATION_TRANSLATION_CHANGED
. So does the previous workflow of modifying Project Settings and callingTranslationServer.reload_pseudolocalization()
.Dealing with translation domains is advanced usage: