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

Implement live translation display in the editor #8171

Open
CantyCanadian opened this issue Oct 17, 2023 · 3 comments · May be fixed by godotengine/godot#96921
Open

Implement live translation display in the editor #8171

CantyCanadian opened this issue Oct 17, 2023 · 3 comments · May be fixed by godotengine/godot#96921

Comments

@CantyCanadian
Copy link

Describe the project you are working on

All of my projects would love to have that.

Describe the problem or limitation you are having in your project

Currently, if you assign a localization key to a label, the label's text in the editor becomes the key. This makes testing multiple languages in the editor a chore, requiring starting the game with each language, going through all the labels to see if the appearance is right.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

If we could have a little dropdown in the top bar, maybe near the play button, that allows us to load one of the locales found in our localization, changing all the current elements in the scene into that locale, it would save so much time.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

In a scene with a lot of localized UI elements, I would switch the current displayed language from "Default" to "en-us" using a little editor widget, switching all the UI elements' text to English. Then, if satisfied, I would switch to "fr-ca" and look at the UI elements in French.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Currently, from what I've looked into, using the TranslationServer in the editor brings a lot of problems, like translations overriding the key in the UI elements. So I don't think there is a current equivalent.

Is there a reason why this should be core and not an add-on in the asset library?

Localization is already a critical component of the engine that is supported out of the box. I believe that it needs a few rounds of QoL to make it easier to use before it becomes second nature to add localization in one's game.

@Calinou
Copy link
Member

Calinou commented Oct 17, 2023

This was previously proposed in #7383, but its author closed it.

@paskausks
Copy link

This would be a very useful feature for projects which choose to use separate keys rather than primary-language-as-key (i think, that's the usual approach with gettext).

Now, using predetermined keys is more clunky, both in initial iteration and later in language QA, but this feature would probably make KEYS the preferred choice of marking localizable text.

Now, I'm not sure for the DX for this would be, but if you needed to adjust the sizing for a control while previewing a specific locale, you could do a Save As Locale Override or something like that, eventually.

@stephanbogner
Copy link

In my case a preview of the default locale would be a great improvement already.

I currently struggle because I want descriptive translation keys but they totally mess up the width of the buttons and thus the layout (which I think is what @paskausks describes):

In editor:
Screenshot 2024-07-31 at 10 31 15
In game:
Screenshot 2024-07-31 at 10 33 17

I don't want to limit the max characters as it can introduce other problems, but I don't know a good workflow to resolve my issue.

@Calinou Calinou changed the title Improve QoL of localization by adding live language display. Implement live translation display in the editor Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants