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

Improve string extraction of ETR POT file #90162

Merged
merged 1 commit into from
May 8, 2024

Conversation

YeldhamDev
Copy link
Member

One of the additions of my recent work on auto-translation was that the strings from the "extract.pot" file are used to fill-in the generated POT from an user's project. This is done currently be loading the file with TranslationLoaderPO, and while the file itself is a POT and not a PO, it works fine. However...

I've done some extra testing, and if one of ETR string-types would happen to be a plural (using ETR_N()), this would cause it to break, because the way POT files store plurals is incompatible with how TranslationLoaderPO loads them. This PR fixes that by copying the function that extracts the data from the file and editing it to work specifically with POTs.

@akien-mga akien-mga merged commit 4509404 into godotengine:master May 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@YeldhamDev YeldhamDev deleted the pot_future_proof branch May 8, 2024 13:26
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.

2 participants