Interkarma / daggerfall-unity

Open source recreation of Daggerfall in the Unity engine
http://www.dfworkshop.net
MIT License
2.67k stars 326 forks source link

Add the use of grammar processors #2667

Open Daneel53 opened 1 month ago

Daneel53 commented 1 month ago

Create two scripts with new classes into Game/Localization and add calls to grammar processor methods into nine existing scripts that display text to screen. See issue #2656 for explanation.

KABoissonneault commented 1 month ago

Would you be willing to post a sample script of how you would use this in your French localization for testing? Doesn't have to be the full thing if you don't want to, just an example of how you're using this.

Daneel53 commented 1 month ago

I will post a package with the current 3 "tokenized" French translation files that I'm using into Unity Editor with current state of the DFU Github.... and the scripts modified by this PR, for sure. I will join a document to explain how it works and what is the result in game with some easy examples. Just let me the time needed to pack all this. Side question: as you leave in Montreal, can you confirm that you can speak French? Just to know if you will understand my examples in French. Our public communication shall stay in English anyway.

Daneel53 commented 1 month ago

Found the right place to get the NPC gender in quests and send it to the grammar processor. Added a call to ProcessGrammar() so that the NPC gender is used peoperly into the localized text of quests.

The PR is complete for 1.2.