Skip to content

Conversation

leNicDev
Copy link

@leNicDev leNicDev commented Oct 7, 2024

This PR implements a basic C# translation parser plugin. It extracts Tr, TrN, Atr and AtrN calls from C# scripts and generates entries for the POT file generator. The implementation is very basic compared to the GDScript translation parser because we can't properly parse C# source code for obvious reasons.

I have no prior C++ experience at all. I only implemented this because I needed it for my project.

@Starkium
Copy link
Contributor

Starkium commented Oct 7, 2024

this is neat, we're currently not working in master at the moment. We'll have to come back and look at this after we got all the rebranding stuff done and into master.

@scgm0
Copy link
Contributor

scgm0 commented Oct 7, 2024

Is it possible to write this feature in C#? Just like the C# export feature, if write this feature in C#, should have an advantage in parsing the C# source code.

@Spartan322
Copy link
Member

I would also like to see this type of feature sent upstream to Godot, though yeah probably a better plan if this could be done from C# for source code parsing reasons.

@SkogiB
Copy link
Contributor

SkogiB commented Oct 27, 2024

Since we've re-assessed our position on sending things upstream by default recently, we can take a look at this closely soon

@Spartan322
Copy link
Member

Changes to this PR were already requested, the author has not come back.

@shitake2333
Copy link

shitake2333 commented Nov 13, 2024

I think this function should be implemented by Godot.NET.SDK. Obviously, using C# can use the ast parsing tool provided by Roslyn to better obtain the parts that need to be generated. This is more accurate than the current implementation.

@shitake2333
Copy link

godotengine/godot#99195

I finished it

@Arctis-Fireblight
Copy link
Contributor

Looks like this is being addressed upstream in godotengine/godot#99195 which has been approved and is pending merge. I also agree with @shitake2333 that this really needs to be implemented C# side in the Godot.NET.SDK, not in the C++ side of the glue. I am going to go ahead and close this out.

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.

7 participants