Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
355 stars 55 forks source link

Importing the French GOG version result in no French strings imported #377

Closed psa-jforestier closed 3 years ago

psa-jforestier commented 3 years ago

Describe the bug The Warcraft II BNE exists in GOG for French language (also in German), in a separate CD installer (setup_warcraft_ii_2.02_v4_(french)_(28734).exe). The game is all in french : video, voices, campaign scenario and objectives, unit names, UI.

But when I import it with Wargus, only the video are in French.

Looking at the CD content, all the voices are in a GameSFX folder. The Support\TOMES\TOME.4 file contains text, but all in english. I did not find the file where the French labels are stored. They are several .mpq files but none seems to contains French words (I searched for "Chevalier" in all of them and found no occurrence).

I also did some test, by modifying the .po files in scripts\translate\ but the accentuated chars do not working (even if they are in the PNG fonts size). The éàô chars stop the string to be displayed (they are cutted). Even the Spanish version do not display any strings with ó (you should have one at the 1st screen for "Load modificación").

To Reproduce Steps to reproduce the behavior:

  1. Import
  2. Click on '....'
  3. See error

Desktop (please complete the following information):

timfel commented 3 years ago

Yes, I noticed this about the GoG version for German, too. The game doesn't support accented characters very well, I don't know if/when anyone will have time to fix this.

timfel commented 3 years ago

Also, for Wargus we need separate translations for the unit names etc as po files. Those labels are all not extracted from the CD. Sorry, I was confused about what you were saying. The only thing that should be extracted in French is: videos, voices, and the briefing reading for the missions. All the buttons and unit names etc must be manually translated by us. If you want to contribute a French translation, we'd be happy to include it :)

psa-jforestier commented 3 years ago

Ok, got it for the translated resources. I started to work for po files for units etc, but the lack of accented char make it almost useless (the translations may look like there is a lot of grammal mistakes)

timfel commented 3 years ago

the accented chars can be fixed 🙂

psa-jforestier commented 3 years ago

Are you challenging me ;-) ? I close this issue because it seems there is no easy fix, or I did not understand how the import process work.

I will have a look at how to fix the accented chars bug (if you have any idea on how to start with this bug - I presume it is related to stratagus/src/video/font.cpp )

timfel commented 3 years ago

@psa-jforestier yes, font.cpp has code to convert things to UTF-8 - I'm not sure why that exists, I think it doesn't make sense, since the Warcraft font files look like they are basically ISO 8859-15, so the translation files should simply not be written in UTF-8, but instead in that encoding, and then the game shouldn't do anything to convert from UTF-8, just take the bytes directly and draw them directly using the fonts.

psa-jforestier commented 3 years ago

I found different problem when digging into the code :

timfel commented 3 years ago

Awesome!