godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Allow enabling POT generation at build-time in export templates #11174

Open molingyu opened 6 days ago

molingyu commented 6 days ago

Describe the project you are working on

Dev game mod system

Describe the problem or limitation you are having in your project

Godot's ability to generate translation content templates is only available in the editor.

I want to be able to generate translation content templates for my mods in-game while the game is running.

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

Separate the relevant codes for generating multi-language templates into a separate module, and modify the build system to make building internationalized export templates optional.

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

scons module_i18n=yes

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

This is a complex system. Keeping it consistent with the editor is a hassle.

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

This avoids the need to re-implement the translation content template generation functionality in runtime.

Calinou commented 6 days ago

This is dependent on https://github.com/godotengine/godot-proposals/issues/10986, as POT generation is currently not designed to be used outside an editor context.