Author Topic: Maniac Mansion Deluxe - improved translation, need help to re-build TRA files  (Read 500 times)

Can someone help me with Maniac Mansion Deluxe (re)translation?
I've found an unofficial tool on the net: forum.xentax.com/viewtopic.php?f=33&t=13316, to convert TRS <-> TRA but has some problems with special chars (e.g. àèìòù) that will be incorrectly compiled into final Italian.tra file, e.g. "È così" becomes "ï¿Õ cosï¿Õ".
I tried to save the Italian.trs in Windows 1252, 1250, ANSI, UTF but the problem was still there.

I don't know AGS unfortunately :(, so I wondered if someone can help me to recompile just the new Italian.trs correctly into Italian.tra, with special char support.

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Unfortunately I can't help you with your translation problems (although considering the source code is available, maybe the problem could be fixed internally).

But I am very grateful for you posting this. I've been searching for a tool like that for years!
So thank you so very much for showing me this tool. :-D

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
problems with special chars (e.g. àèìòù) that will be incorrectly compiled into final Italian.tra file, e.g. "È così" becomes "ï¿Õ cosï¿Õ".
I tried to save the Italian.trs in Windows 1252, 1250, ANSI, UTF but the problem was still there.

The thing is that you do not only have to save the text in correct ANSI codepage for italian language, but you also need to supply game font which corresponds to that ANSI codepage.
This is how unofficial translators do, - they have to supply both the translation and the font.
Font can be TTF of WFN, I guess TTF will be much easier to find. It must NOT be a Unicode font, but ANSI Italian font. Just put it in the game's folder.

"D:\RetroGames\MMC\DATA\Menu1.ttf" is actually std Arial TTF opentype font, and as far I can understand it does support all codesets (the game can be played with special char fonts also in French, Deutsch, Russian etc.)...
I think the problem is with the tool TRA recompile, not sure HOW does it converts ANSI special chars internally.
Other ideas on how to recompile the TRA with special chars, starting from a revised Italian.trs (ANSI)? :(

P.S.
Unfortunately I've never used AGS, so I may be wrong and didn't understand something, so please explain me everything in detail! Thanks a lot! :-[
« Last Edit: 12 Feb 2018, 14:56 by hexaae »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
"D:\RetroGames\MMC\DATA\Menu1.ttf" is actually std Arial TTF opentype font, and as far I can understand it does support all codesets (the game can be played with special char fonts also in French, Deutsch, Russian etc.)...

When you say "the game can be played in French, Russian etc", do you mean that you've actually seen these characters in the game, or you only think that will happen?
The problem is that AGS is not a Unicode program, it can use only characters in codes from 0 to 255. For that reason it cannot fully use the font that supports all codesets.

I never used that TRA/TRS converter myself, so don't know what it does.

E: Well, to be honest, I also don't know Italian language, so IDK if it even requires special codepage and font. Maybe standard Latin font should be enough.
« Last Edit: 12 Feb 2018, 15:10 by Crimson Wizard »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Sorry, I could have been confused myself.
An important question I have is, why do you convert the text to UTF8? Or does this tool convert it to UTF8? AGS won't be able to read UTF8 format.

EDIT: I checked the source code of the program, it looks like it is using UTF7 and UTF8 encodings to read and write the translations... Unless I misunderstand something, I am not sure how that is even supposed to work with AGS.

I guess some testing and research is required first.
« Last Edit: 12 Feb 2018, 15:16 by Crimson Wizard »

Yes, the game already displays French, Russian, etc. special chars correctly when you change language...

I tried to save the Italian.trs as UTF-8 and UTF-7, but the game still uses wrong chars. I think the problem is with TRS -> TRA recompile/conversion (i.e. a problem with the unofficial conversion tool), not with the Italian.trs file itself and its codeset :(

Are the sources of this game available (where)? I could try recompiling it from scratch...
I've sent some PM to original author of Maniac Mansion Deluxe but still got no reply. I hope he can help me.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Yes, the game already displays French, Russian, etc. special chars correctly when you change language...
It probably uses compatible fonts for each translation. My point was that it won't be able to do so using the single font you mentioned.


I tried to save the Italian.trs as UTF-8 and UTF-7, but the game still uses wrong chars. I think the problem is with TRS -> TRA recompile/conversion (i.e. a problem with the unofficial conversion tool), not with the Italian.trs file itself and its codeset :(

The point is that AGS CANNOT use UTF, it just cannot! Because it expects all text in ANSI.
From the looks of its source code, the conversion tool also saves files in UTF, which may be the cause of the problem. But this needs investigation.


« Last Edit: 12 Feb 2018, 15:38 by Crimson Wizard »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Forgive me, looks like I myself completely misunderstood what you were saying.

You mean that you tried saving TRS in UTF in attempt to make the conversion tool work correctly, since it is conversion tool that takes TRS and writes new TRA file.

Sorry, I will try to check how this tool works when I find free time, since its source code is open (https://bitbucket.org/Taktloss/ags_translationeditor).
« Last Edit: 12 Feb 2018, 15:46 by Crimson Wizard »

Thank you for taking care! Would be great an updated version of that very useful tool more "compatible" with AGS and its ANSI restrictions :-D
Would make translators' life much easier and open up the possibility of translating many other AGS games for all the easy way...

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
I just want to add to this discussion.
I've tried using the tool, and it seems as though it has problems with all special characters, even if those special characters are on the non-translated lines.

Because if you try to translate a line with a special character on it, the special character(s) gets messed up and the game does not recognise the line, and therefore doesn't translate it.

So the problem is definitely in the way the program is converting it to a .TRA file.


Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Well, I was planning to look into this on weekends, but then got busy on previous weekends with something else and forgot.

Try this: https://www.dropbox.com/s/zumhd381xopdmh1/AGS_TranslationEditor--tryfixutf8.zip?dl=0

I literally changed 3 lines in the program to make it save TRA in current ANSI codepage instead of UTF8.
The result will depend on your system local settings, but in theory it should work same as if you were working with AGS Editor.

Probably for better experience the program needs a ANSI page selection in the window.


Did program author reply to you, by the way? I could send a patch suggestion to him if he's still active.
Although something I don't like about this program is how it is installed.

PS. it would also may be a good idea to write standalone utilities run from command line which would do this job to extract strings from the game into TRS, and create TRA from TRS, so that they don't depend on GUI.
« Last Edit: 03 Mar 2018, 14:27 by Crimson Wizard »

WOW!!
It seems to work fine: I've saved the .TRS as UTF-8* with Notepad2, loaded it through your new version of the tool, exported as .TRA and BAHM! Everything worked as expected! (nod)



I can now release a revised Italian translation for this great remake! :D
Great work! Thank you so much!
This will open a new chapter in AGS localizations...

P.S.
No, I'm not in touch with the original author but in the first forum I've found the tool, he said was totally open to any improvement from other users, so...

* UTF-8 (ITA special chars)

+ à - \u00e0 - "Ã " [%C3%A0]
+ è - \u00e8 - "è"
+ é - \u00e9 - "é"
+ ì - \u00ec - "ì"
+ ò - \u00f2 - "ò"
+ ù - \u00f9 - "ù"


+ À - \u00c0 - "À"
+ È - \u00c8 - "È"
+ É - \u00c9 - "É"
+ Ì - \u00cc - "ÃŒ"
+ Ò - \u00d2 - "Ã’"
+ ٠- \u00d9 - "Ù"

« Last Edit: 04 Mar 2018, 13:54 by hexaae »