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

Add Translation Support for Glossary #1954

Merged
merged 77 commits into from
Jan 30, 2024

Conversation

CakeVR
Copy link
Collaborator

@CakeVR CakeVR commented Dec 15, 2023

This PR adds support for glossary translation via the Translation setting page in Dialogic 2.

The following fixes were added:

  • Empty resource files are skipped to prevent Godot complaining about empty CSVs.
  • Empty timelines are skipped to prevent indexing an empty events array.

Additional changes:

  • The timeline term in the settings page has been replaced with a blanket term for all translatable resources.
  • Added a setting to add a newline between sections in a combined (per project) CSV.

Here is an example of the newline between sections feature:

keys,en
Glossary/16/2e/New Entry,New Entry
Glossary/16/2e/text,A nice description.
,
Glossary/16/2f/New Entry 2,New Entry 2
Glossary/16/2f/title,Another cool description.

A translatable resource file is either a character, timeline, or glossary resource.


In order to minimise merge pain, I have added a fix addressing the failure of capturing all character names (#1987).
From now on, all character resource files will be picked up.

To-do:

  • Feature Testing
  • Remove Debug Logs
  • Fix order of properties in CSV to match editor order
  • Handle Invalid names

CakeVR and others added 30 commits December 14, 2023 19:24
If this prefix is missing, the files will be skipped during erasure.
Add `translation_keys` to Glossary resource.
Remove glossary in-editor help.
Add property constants for Glossary resource.
Entries are saved in an array and the valid keys link to the entries via a dictionary.
They broke matching on words.
@Jowan-Spooner Jowan-Spooner marked this pull request as ready for review January 30, 2024 09:58
@Jowan-Spooner Jowan-Spooner merged commit 5bca685 into dialogic-godot:main Jan 30, 2024
2 checks passed
@CakeVR CakeVR deleted the add-glossary-csv-support branch February 28, 2024 21:04
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