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 code to permit the use of grammar processors #2656

Open
Daneel53 opened this issue May 20, 2024 · 1 comment
Open

Add code to permit the use of grammar processors #2656

Daneel53 opened this issue May 20, 2024 · 1 comment
Milestone

Comments

@Daneel53
Copy link

Hello,
I would like to ask officially to the team that is today in charge of DFU code to accept to introduce into DFU some code that will permit mods in other languages than English to use a grammar processor in order to produce better translated text in a grammatical point of view.

I wrote a document that explain everything to be clearer.

If the modification is accepted by the team and implemented in a future release of DFU, the French translation shall be the first to benefit of a grammar processor to ameliorate the French translation, it is already working on my PC. Then other translators may try, if they feel ready, to write a mod with their own grammar processor for their language, the French one being an example for them.
Grammar processors for DFU.pdf

You can also contact me via my Discord account for further discussion.

@KABoissonneault KABoissonneault added this to the DFU 1.2 milestone May 20, 2024
@Daneel53
Copy link
Author

Hi,
Think that I've finally found all the scripts where I have to add calls to both methods of the grammar processor in order to deal with grammar tokens in all the screens of the game.

For calls to ProcessGrammar():

  • Game\PlayerActivate.cs
  • Game\TextManager.cs
  • Game\UserInterface\MultiFormatTextlabel.cs
  • Game\UserInterfaceWindows\DaggerfallExteriorAutomapWindow.cs
  • Game\UserInterfaceWindows\DaggerfallPlayerHistoryWindow.cs
  • Game\UserInterfaceWindows\DaggerfallTalkWindow.cs

For calls to SetGenreHero():

  • API\Save\CharacterRecord.cs: get character genre when loading a classic save
  • Game\Serialization\SerializablePlayer.cs: get character genre when loading a DFU save
  • Game\UserInterfaceWindows\CreateCharGenderSelect.cs: genre selection during a new game creation

I've tested in Unity editor all modification with the current code contained into the Github master branch, everything's working fine.

I'm preparing the package and I will create the PR in Github as soon as I will be ready.

Daneel53 added a commit to Daneel53/daggerfall-unity that referenced this issue Jun 21, 2024
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 Interkarma#2656.
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

No branches or pull requests

2 participants