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

GDScript: Add constant string support for POT generator #80020

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

dalexeev
Copy link
Member

Use GDScriptAnalyzer to take constant string expressions into account when generating POTs.

const TEST_CONST = "test_const"
var test_var = "test_var"
print(tr("test_literal"))
print(tr("test_" + "concat"))
print(tr(TEST_CONST))
print(tr(test_var))

Before:

#: node.gd
msgid "test_literal"
msgstr ""

After:

#: node.gd
msgid "test_literal"
msgstr ""

#: node.gd
msgid "test_concat"
msgstr ""

#: node.gd
msgid "test_const"
msgstr ""

Copy link
Member

@adamscott adamscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me! Thanks @dalexeev !

@YuriSizov YuriSizov merged commit 79e28e0 into godotengine:master Aug 1, 2023
@dalexeev dalexeev deleted the gds-pot-gen-const-string branch August 1, 2023 18:08
@YuriSizov
Copy link
Contributor

Thanks!

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.

4 participants