The Cat Lady - problem of subtitles

Started by Martin2306, Fri 07/10/2022 12:01:56

Previous topic - Next topic

Martin2306

Hello!
I created a translation of this game (CZ). When I tried how the translation works, some texts (dialogues) in the game were in English.
I thought I made a mistake somewhere, but I couldn't find anything (like a blank line). I deleted the game and reinstalled it.
I tried different translations in the game and the errors were repeated.
The first error is in chapter 1, where Susan finds a hanging body and a locked door and goes back and says "I can't remember this place... Am I lost?...". 
Instead of the translation (HU, PL, GE, RU, IT, FR) the English text "I can't remember this place... Am I lost?...".
It looks to me like there is "default" English inside the game that it switches to incorrectly.
Can anyone give me some advice?
 :(

Win11, TCL v. 1.7   

Khris

The most likely explanation is that the English source string was changed after the translation source was created.
AGS does a basic text lookup on the string in the script / dialog, so the English string in the translation source has to match the game's English string exactly or AGS doesn't find it in the translation file and uses the English original.

I guess you have access to the source files? Open the room script in question and make sure the strings match exactly, including all the punctuation and spaces etc.

(also this is a thread about a technical issue and should be moved accordingly)

Wiggy

Hi,

Having done a few translations I think I can help. If your translated string is longer than the original string, AGS will not substitute the text. For designers, if you want translations for your games then add about 10 spaces after every dialog          like that. For translators keep it short. :grin:

Martin2306

To Khris:

It's like you say. Using Notepad++ I found the text "@188 I can't remember this place... Am I lost?..." in the compressed file "TheCatLady.002". The text belongs to the file "room16.crm". Then I created a TRS file and searched for the same text and compared it:

&188 I can't remember this place... Am I lost?...(Hungarian.trs)
@188 I can't remember this place... Am I lost?...(TheCatLady.002)

So the difference is in the "&" and "@" at the beginning of the text. Out of curiosity, I created TRS files for other languages as well. Some have & (5x) and some have @ (4x). As it is, it starts the audio file (EN) and the text file (EN) for all translations. If I replace @ with & in the file "TheCatLady.002" (room16.crm), no translation will run the sound file, where @ is EN text and where & is text in the correct language. Something is wrong...  :(

Crimson Wizard

#4
Quote from: Wiggy on Fri 07/10/2022 20:07:20Having done a few translations I think I can help. If your translated string is longer than the original string, AGS will not substitute the text. For designers, if you want translations for your games then add about 10 spaces after every dialog          like that. For translators keep it short. :grin:

This is not true, the way AGS is substituting translations is not related to the differences in strings' lengths in any way. If that were the case, I imagine this would have been reported like a bug long time ago. The only condition is to have a key string in TRS identical to the string in the game.

This is very easy to test if you make a dummy game with translations from one of the templates (takes 5 minutes to try).

Martin2306

So I searched the Internet. I looked in the game files. This is the result:

I don't have the source files so I can't open the game in AGS Editor.

Using QuickBMS and the script "adventure_game_studio.bms" I can get to the ".crm" and "game28.dta" files. These files contain the "default" game text.

In the CRM and DTA files, I search for the text. I copy the file with the searched text to the main directory of the game. This will ensure that the game loads this file in preference. I translate the search text in this file. Wiggy is right here - the translated text must be the same length as the "default" text.

This procedure solved the aforementioned error in the game's subtitles. Thank you all for your replies.  :)

Crimson Wizard

#6
Quote from: Martin2306 on Sun 16/10/2022 11:43:51In the CRM and DTA files, I search for the text. I copy the file with the searched text to the main directory of the game. This will ensure that the game loads this file in preference. I translate the search text in this file. Wiggy is right here - the translated text must be the same length as the "default" text.

Of course, if you edit the compiled files directly, then you have to keep the string lengths, as well as other data length. But this is a completely separate case, and I honestly did not expect you translating the game this way. Normally you create TRS (translation source file), either having an original one from the author, or using a tool that let you extract the text out of the AGS game. Then compile TRS to TRA using a translation compiler, and then AGS can use these TRA files if they are set in setup (or config file). If you do it that way then you don't have to bother with text lengths.

EDIT: thinking more on this, the engine does not translate certain texts automatically; in some circumstances developers are expected to use a script command explicitly (GetTranslation). If this was the case, that might explain why certain strings were not translated even if they are present in the TRA. Although I do not know all the details to say for sure.

Martin2306

Quote from: Crimson Wizard on Tue 18/10/2022 22:12:49Of course, if you edit the compiled files directly, then you have to keep the string lengths, as well as other data length. But this is a completely separate case, and I honestly did not expect you translating the game this way. Normally you create TRS (translation source file), either having an original one from the author, or using a tool that let you extract the text out of the AGS game. Then compile TRS to TRA using a translation compiler, and then AGS can use these TRA files if they are set in setup (or config file). If you do it that way then you don't have to bother with text lengths.

I agree with you. I used the "AGS Translator Editor" to translate this game. For decompile TRA and compile TRS I use "AGS Tool".  I only use the editing of the compiled CRM and DTA files if I find an error where "deafault" EN text is used in the game instead of the translated text. The one my description of the procedure is intended for laymen like me, who would solve a similar problem and look for an answer on the Internet.  :)

SMF spam blocked by CleanTalk