-
-
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
Add translation preview in editor #96921
base: master
Are you sure you want to change the base?
Conversation
3181ac3
to
d0dd382
Compare
d0dd382
to
810e959
Compare
810e959
to
32007d2
Compare
32007d2
to
1890e10
Compare
1890e10
to
899c978
Compare
899c978
to
c9a99d7
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.
Tested locally, it works as expected (including with custom language codes).
As @AdriaandeJongh pointed out, I agree we should have some kind of visible notice that the translation is currently being overridden in the editor. This could be an overlay displayed in a corner of the 2D editor viewport, so that you don't need to select a specific node to view it. It could be shown below the zoom level, with a globe icon and the language name next to it.
Some more feedback:
- Language codes in the dropdown should display the language names when available, like in the project manager dropdown.
- Custom language codes don't have a language name set (not without Update language list, add new locale selection dialog and support for custom codes. #103498 at least), so only the code should be displayed if we try to get the name and it's empty.
- I suggest keeping the dropdown open after selecting a language, so you can switch between languages more quickly. Call
set_hide_on_item_selection(false)
on the submenu's PopupMenu to achieve this.
Follow-up to #96230
Closes godotengine/godot-proposals#8171
Allow previewing the edited scene in the specified locale.
Mainly a proof-of-concept for now, marking as draft. Not thoroughly tested.
Peek.2024-09-13.00-48.mp4