-
-
Notifications
You must be signed in to change notification settings - Fork 270
Implement gettext translation file generation #2356
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for your PR. I want to quickly talk about the Glossary. I have not looked at the code, so this is only a quick exchange of information. The Glossary, unlike Timeline Text Events, does not fall back and that is intended by design. If there is no translation for the target locale, they won't do anything. This ensures no wrong Glossary is displayed between languages. Let me know if this is what you encountered. |
Not sure what I did different this time, it works on the old version. Available translations of the timelines: en, it Testing locale: en
Testing locale: it
Testing locale: de
Testing locale: fr
So the behavior is still the same and it always used the fallback logic of godot. There is still one issue in the old version and fixed in this PR:
|
Bypassing the fallback logic of godot completely would be possible, but the new code would still need some sort of fallback. Otherwise the game would need to have the glossary in every single language+country+variant+... combination a player could have. I am not sure if the large complexity of building our own fallback logic is really worth it. The only situation where it makes a difference is if timelines, but not glossary, are translated for a specific locale. And it would also be extremely difficult to test it because locales have so many corner cases. |
I also made changes to some events to reduce the number of unused translation entries:
Please let me know if you want to keep the old behavior or prefer something different. |
Hey there 💭 It would be awesome to get this merged - this would enable me and my team to have unified translation handling, as we prefer to use gettext for the translation of our godot scenes and scripts. I've rebased the branch onto the current state of I've tested the rebased branch using https://github.com/dialogic-godot/test-project and from my view it works flawlessly 🎉 @jrb0001 While rebasing I dropped 9f71491 as on Regarding the glossary #2356 (comment), from my perspective the current state is fine - it follows the same fallback logic of Godot in scenes and scripts when using gettext translations so I'd say the behavior is expected and acceptable. |
I wrote this PR 11 months ago so I am not sure anymore about the exact reason. Maybe it was to fix the line numbers when a timeline with newly added or reodered events get saved? |
This PR allows selecting gettext as an alternative to the CSV format in the translation settings.
It also fixes the following issues:
Things I noticed while testing: