godot-orchestrator icon indicating copy to clipboard operation
godot-orchestrator copied to clipboard

Support multiple translations (plug-in and documentation)

Open SettingSail opened this issue 1 year ago • 4 comments

Description

Hello! I am a beginner who does not understand code and have used UE Blueprint. UE Blueprint supports Chinese, but UE Engine is not friendly for small independent games. Therefore, I have a liking for Godot Engine. However, I think learning code takes a long time, so I chose visual development. However, it seems that the Orchestrator script developed by your team does not support Chinese. I hope it would be great if you and your team could produce Simplified Chinese. Thank you!

Implementation ideas

No response

SettingSail avatar Apr 05 '24 03:04 SettingSail

Hi @SettingSail, I just wish to confirm that you're requesting the plug-in to be translated and not the documentation, correct?

Naros avatar Apr 05 '24 22:04 Naros

So, from an editor plug-in perspective, there are some Godot Editor problems.

First, after the Godot Editor loads its translations, the TranslationServer service is immediately disabled. This prevents any further translations from being possible. What makes matters worse is that there is no way from GDScript, C#, or GDExtension to turn the TranslationServer service back on when the editor disables it.

Usually, in Godot engine code, one would use tr("text") or tr_n("text", "plural text"), where tr and tr_n are special functions that handle the localization concerns; however, with how these functions are written combined with the disabling of the server that is responsible for translations, this normal approach isn't possible.

The only solution that I can see works is that we explicitly write our own TranslationServer implementation that loads our .po file based on the editor locale setting and then at each call site, rather than relying on tr and tr_n, we'd need to write our own glue to interface directly with the loaded Translation resource. While doable, this is a substantial undertaking, and it completely goes against what Godot should allow editor plug-ins to do.

I've raised this concern on the Godot Rocket.Chat in the #editor channel. Let's see what reaction we get and if there is possibly a workaround that isn't immediately obvious other than what I just outlined above.

Naros avatar Apr 06 '24 02:04 Naros

We need to test KoBeWi's work on godotengine/godot/pull/77104 to see if this satisfies our needs.

Naros avatar Apr 07 '24 20:04 Naros

So we the new documentation at https://github.com/Vahera/godot-orchestrator-docs, we can now begin the translation step to Chinese. Would you be able to help with that translation effect @SettingSail ?

Naros avatar Apr 15 '24 22:04 Naros