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

Change translation to be on a script basis and add strings automatically #711

Merged
merged 1 commit into from
May 5, 2024

Conversation

MewPurPur
Copy link
Owner

@MewPurPur MewPurPur commented May 5, 2024

Supersedes #671

Moves all translation-related things to scripts and puts them inside TranslationServer.translate() commands and similar. In my opinion, this is the best way to handle the issue of gathering everything that should be translated.

Important

The way to update translations has changed. Strings don't have to be added manually to GodSVG.pot anymore, but contributors must write code using the TranslationServer.translate() methods. These methods work regardless of an object's state, so I've blanket-replaced all Object.tr() methods with them.

The new way to update strings is to run the godot_only/update_translations.gd script inside the Godot editor.

There's a new godot_only folder for all things that shouldn't be exported. Right now, that's editor icons for custom classes and the new script for updating strings.

@MewPurPur MewPurPur changed the title Change translation to be on a script basis Change translation to be on a script basis and add strings automatically May 5, 2024
@MewPurPur MewPurPur force-pushed the add-translation-script branch 6 times, most recently from a3db4bc to 31783e2 Compare May 5, 2024 18:24
@MewPurPur MewPurPur merged commit 1538888 into main May 5, 2024
2 checks passed
@MewPurPur MewPurPur deleted the add-translation-script branch May 5, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant