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

Add translation preview in editor #96921

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented Sep 12, 2024

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

@AdriaandeJongh
Copy link
Contributor

Incredible work, truly.

One UX note that wasn't covered in the proposal: when a translation is selected, there is a discrepancy between what is in a Label's inspector and what is shown in the scene. Perhaps some sort of indication in the text field of the fact that the field is translated is in order?

For example: the text field is expanded to include a row explaining what this label translates to (ugly example incoming, but you get the point...):
Screenshot 2024-09-13 at 12 21 15

Copy link
Member

@Calinou Calinou left a 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.
  • 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.

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.

Implement live translation display in the editor
3 participants