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

Don't list CSV as a valid extension for Translation resource #97222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented Sep 20, 2024

Resolves #87187

When adding translation files in the Project Settings dialog, a .csv file is currently valid choice.

CSV is recognized by the resource importer to generate translation files, but it's not a Translation resource file itself.

Also removed an unused header include in the modified source file :P

Note: One drawback is that if someone created a custom importer that does import a CSV file as one valid Translation resource (which is not very useful), this PR also prevents the user from selecting the file directly. However, the user can still select the file by selecting the "All Files" filter.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Seems good for now, but we really need to change the way we deal with CSV for translations to remove this and many other hacks.

For example .csv files are the only "1 source to multiple Resources" imported files, which also mean that the generated .translation files can't be put in .godot/imported/, because there's no way for load("res://translations.csv") to be remapped to a single resource (as seen in #42392 (comment)).

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.

CSV translation file cannot be imported properly
2 participants