-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[WIP] Add pseudolocalization support to Godot #49361
Conversation
eb79445
to
69a55f0
Compare
609cd91
to
bab9a68
Compare
52e6586
to
9a0ff32
Compare
9a0ff32
to
0ae14e2
Compare
…h reload_pseudolocalization()
ac2e76d
to
92942cd
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.
Documentation changes:
Co-authored-by: Hugo Locurcio <[email protected]>
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.
Looks pretty good, I left some comments on style and a few possible improvements.
Once ready, the commits should be squashed before merge, so that we have a clean Git history once merged. This can be done with an interactive rebase.
Might be worth doing it in a new branch and new PR if we want to preserve the development history in this PR (so the new PR would supersede this one). The squashed version would also be easy to backport to the 3.x
branch with git cherry-pick -x <commit>
and then solving merge conflicts.
ClassDB::bind_method(D_METHOD("is_pseudolocalization_enabled"), &TranslationServer::is_pseudolocalization_enabled); | ||
ClassDB::bind_method(D_METHOD("set_pseudolocalization_enabled", "enabled"), &TranslationServer::set_pseudolocalization_enabled); |
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.
You can add a pseudolocalization_enabled
property with ADD_PROPERTY
additionally to the setter and getter. This will remove the setter and getter from the docs and expose the property instead, which is more user-friendly.
For its documentation, you can copy what you had in the setter, and edit it to start following our style for boolean property descriptions: If [code]true[/code], ...
. (No need to say what happens if false since nothing happens.)
_initial_set("interface/editor/enable_debugging_pseudolocalization", false); | ||
set_restart_if_changed("interface/editor/enable_debugging_pseudolocalization", true); | ||
// Use pseudolocalization in editor. |
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.
Instead of this here, you can use EDITOR_DEF_RST
where you actually use it in TranslationServer
directly. The _RST
part will also enable restart if changed. (See my other comment about caching the value too.)
2cb309c
to
e7e1c19
Compare
e7e1c19
to
4de2a1f
Compare
ef209cf
to
e10e446
Compare
e10e446
to
dc53786
Compare
Squashed the commits and added PR #51395 |
GSoC Pseudolocalization project
This is a work in progress PR
This PR will be updated over the course of the next two months as I implement the pseudolocalization feature in Godot for GSoC'21. The GSoC project link for this can be found here and the original proposal can be found here. Also check out the todo list here. Demo project for this feature can be found here. PR for Godot-Docs tutorial can be found here. PR for Godot-Demo-Projects can be found here.