-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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 POT generation feature in Editor #39415
Conversation
3c470b6
to
c2b15c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only reviewed the first commit so far, but here are some initial comments.
Great work overall!
I got a crash when trying to write the POT file using the files from the ZIP (I initialized a project with This was the first time opening the project, and I added the two
|
@akien-mga I've looked at the crash. The .tscn file that I've included have dependencies on other resources in the project, but I did not put them together in the ZIP. Hence the .tscn is corrupted. |
Alright. That's a good testcase still, the engine shouldn't crash even if given invalid input, so you should use For example: translation_strings = _parse_scene(res->get_state()); This will crash if |
0fd367d
to
a07bd25
Compare
a07bd25
to
71beb38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
7eeaab5
to
9a12318
Compare
Tested locally and re-reviewed the code, amazing work! It's good to merge IMO. One last change though, could you generate and fill the documentation for the new class and methods? See https://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html, the TL;DR is |
6bba3ca
to
ff829e7
Compare
ff829e7
to
e3f1128
Compare
e3f1128
to
efb4609
Compare
Thanks! |
Context: i18n, localization
Added "POT generation" tab under "Localization" to generate translation template files (known as POT files) from selected files.
Behind the scene, the system collects all translatable strings from the included files, and write the collected strings to a user-selected POT file.
==============
Update 23/06/2020
Added plugin support. Users can now define their custom parser to extract translation strings from custom files (.csv, .json etc.) into the POT file.
Test project:
test_project.zip