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

A CSV-formatted .TXT file cannot be edited as if it were a CSV #41

Closed
Vine2D opened this issue Jan 22, 2021 · 3 comments
Closed

A CSV-formatted .TXT file cannot be edited as if it were a CSV #41

Vine2D opened this issue Jan 22, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Vine2D
Copy link

Vine2D commented Jan 22, 2021

Describe the bug
A CSV-formatted .TXT file cannot be edited as if it were a CSV (Control-2)

To Reproduce

  1. Create a copy of translation.csv, name it translation.txt
  2. Open translation.txt in file-editor within Godot
  3. Attempt to view as CSV (Press Control-2 or use the Editor dropdown menu and select CSV)

Expected behavior
I would expect files to be parseable based on their contents or user choice and not strictly forbidden by their file extension.

Desktop:

  • OS: Win10
  • Godot Engine Version 3.2.2.stable
  • Plugin Version v1.8.6

Additional context
This is primarily a problem for unusual file extensions, or scenarios in which files must be given different names as workaround for Godot's currently-finnicky export system. An example might be a monster_data.csv that is not a translation file, but would give Godot errors upon export. The current workaround for this is to rename it to monster_data.txt.
Some examples of this particular issue with Godot;
godotengine/godot#41042
godotengine/godot#38957

@Vine2D Vine2D added the bug Something isn't working label Jan 22, 2021
@fenix-hub
Copy link
Owner

Hi @Vine2D ,
I'm very sorry for what You are experiencing, since it's one of those Godot stressing things that we can't just do nothing about it.
I could for sure make some workarounds if you think it would be useful for your work and the work of others.
I have to say that currently you are able to reimport .csv file from translation file to standard file just in the same way you can re-import images.
Click con the .csv file inside Godot's FileSystem, open the Import tab and reimport that file. note I'm note sure you could do this with the 3.2.2, but for sure you can do it with the 3.2.3 since it's the main thing I do working with csv both with my editor and my plugin for plotting charts.
I know it is pretty annoying, but it's the only way to overcome the problem in the Godot way.
Anyway, I'll implement an internal workaround to let people chose what type of editor they want to open, not only based on the extension itself anymore.
As you could imagine, giving user pre-defined editors based on file extension instead of their content is not just easier to do, but also a programming choice to avoid user editing errors opening editors for files not properly formatted.

Try using the Godot method if it is still available for 3.2.2.
I will never ask you to change your version, so I'll try to do my part anyway to let you have the best experience.
Thus - I'll live this issue opened. I will close it with my implementation, but feel free to close it yourself or just comment.

Have a good day, thank you very much for using my plugin.

@Vine2D
Copy link
Author

Vine2D commented Jan 23, 2021

Unfortunately, converting a .CSV from a translation file into a standard file only halfway solves the problem Godot has with exports! To the best of my knowledge, I had to change it to a .txt or Godot would crash on an exported application. This is not a problem with file-editor however (:

Anyway, I'll implement an internal workaround to let people chose what type of editor they want to open, not only based on the extension itself anymore.

This sounds perfect! Thank you so much for file-editor and your assistance (:

@Vine2D Vine2D closed this as completed Jan 23, 2021
@fenix-hub
Copy link
Owner

closed by release v1.8.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants