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 multilingual(localization) support for GDExtension documentation #10087

Open
Lazy-Rabbit-2001 opened this issue Jul 1, 2024 · 0 comments

Comments

@Lazy-Rabbit-2001
Copy link

Describe the project you are working on

Any GDExtension projects that needs localization

Describe the problem or limitation you are having in your project

As we all know, we have custom documentations for GDExtensions since 4.3. However, it seems that there lacks a way to enable it more localized, or more directly, to be more multilingual.
We hope that this feature, as an enhancement of the GDExtension documentations, could get implemented in recent versions or 4.4.

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

Add support for localization, like .csv files, .po files (which is how Godot is now operating it).

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

Here I just put what the SConstruct should add (based on @akien-mga's Threen, thanks to him):

if env["target"] in ["editor", "template_debug"]:
    try:
        doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("src/doc_classes/*.xml"))
        doc_loc = env.GodotCPPDocDataLoc("src/gen/doc_data_loc_*.gen.cpp", source=Glob("src/doc_classes/*.po")) # Here uses .po as an example
        sources.append(doc_data)
    except AttributeError:
        print("Not including class reference as we're targeting a pre-4.3 baseline.")

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

No, since it may be related to C++ source code

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

Addon doesn't have ability to provide advanced operations like adding supports for multilingual GDExtension documents, and only C++ source code can solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants