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 CSV File Handling #1887

Merged
merged 23 commits into from
Nov 10, 2023

Conversation

CakeVR
Copy link
Collaborator

@CakeVR CakeVR commented Nov 9, 2023

This PR aims to improves handling CSV file creation and improve code quality.

  • Adds class for CSV file handling, includes related CSV features.
  • Adds Save file mode allowing to save CSVs next to timelines or inside the Translation file path.
  • Fixes Update CSV files not finding all timelines outside of Translation file path.
  • Adds Save file mode setting to signal receivers saving settings.
  • Disables Update CSV files if Translation file path is required and invalid.
  • Updates related tooltips.

Tasks left to do:

  • Disable Update CSV files button, if Translation file path is empty and a project CSV file is used or the save file mode requires it.
  • Further testing.

@CakeVR CakeVR marked this pull request as ready for review November 10, 2023 10:46
Copy link
Collaborator

@Jowan-Spooner Jowan-Spooner left a comment

Choose a reason for hiding this comment

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

Looks a lot better. Left some small style comments. Haven't battle-tested this but seems to work well on a first glance.

addons/dialogic/Editor/Settings/settings_translation.gd Outdated Show resolved Hide resolved
addons/dialogic/Editor/Settings/csv_file.gd Outdated Show resolved Hide resolved
addons/dialogic/Editor/Settings/csv_file.gd Outdated Show resolved Hide resolved
addons/dialogic/Editor/Settings/csv_file.gd Show resolved Hide resolved
@Jowan-Spooner
Copy link
Collaborator

Lgtm. Thanks!

@Jowan-Spooner Jowan-Spooner merged commit 8c99140 into dialogic-godot:main Nov 10, 2023
@CakeVR CakeVR deleted the improve-csv-file-creation branch January 1, 2024 21:47
Invertex pushed a commit to Invertex/dialogic that referenced this pull request Jan 26, 2024
* Use `ProjectSettings` to get settings.

* Rework updating CSV.
Move CSV file handling to class.
Reduce code repetition.
Update project settings when changing translation file mode.
Add save file location mode.

* Relocate tooltips on translation settings.

* Improve translation settings text.

* Add event statistics to `DialogicCsvFile`

* Properly clear and write to the file.

* Improve collecting translations.
Remove invalid translation file paths.
Find the the correct translation file ending.

* Improve tooltip wording.

* Improve tooltip.

* Create the file if it does not exist.
Use `WRITE` instead of `READ`.

* Improve node naming.

* Update tooltips.

* Conditionally disable the `Update CSV` button.

* Add `_verify_translation_file` method.

* Minor variable  improvements.

* Minor style guide improvements.

* Add trailing newline at the file end.

* Fix `class_name` and `extends` order.

* Fix comment text.

* Remove `print`.

* Add extra newline between methods.

* Reorder translation settings and reword labels.

* Improve text on translation settings page.
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.

None yet

2 participants