The translation function doesn't work

Started by natpsyblue, Tue 25/01/2022 00:37:50

Previous topic - Next topic

natpsyblue

Hello, I'm trying to translate a game from English into Spanish, "Cart Life" (https://github.com/gondur/cartlife_src#readme). I've followed the steps of the translation guide (https://www.adventuregamestudio.co.uk/manual/ags17.htm), but it doesn't work. I'm using the latest version of AGS, 3.5.1. and this game was originally made with 3.4.0. However, that version is no longer available on the main web page (maybe that could be the problem? I don't think so, though).
I made an attempt to translate some random line that appears on one of the first texts in-game, but when I compile and update the translation, build and run the game, that line is untraslated... (maybe the file needs to be all translated...?)
Any ideas of what could possibly be the problem? Thanks!

heltenjon

Have you run the setup and changed the default language?

natpsyblue

#2
Yes, I've tried that. I made the translation the default language by right-clicking on the translation, and also in the general page of the project it lets you change the default language, so I chose the translation. And to build and run the game I clicked "Rebuild all files" first, and then also "Run game setup", which shows a menu with the option of choosing the translation as well.
When I opened the .trs* file from the folders with notepad again (where I edited to translate) my line was empty...

*Edited to .trs

heltenjon

Quote from: natpsyblue on Tue 25/01/2022 10:53:04
When I opened the .tra file from the folders with notepad again (where I edited to translate) my line was empty...
If I remember this correctly, it's the .trs file you need to edit in notepad, while .tra is the finished translation file.

natpsyblue

Oh, sorry, yes, i meant that. I open the .trs file in notepad.

heltenjon

The translation should just be skipped where you haven't written anything in the the blank line underneath the original text, so you shouldn't need to translate the whole file. But if there aren't any changes in the .trs file, it sounds like it wasn't saved for some reason after you edited it. I'd try again, make sure I save after editing in notepad, close notepad and then reopen the file in notepad just to check that what you have typed in is saved. If that doesn't work, the solution is beyond my capabilities (which are quite limited).

Unless you accidentally created a new .trs file when you rebuilt (which would then snag all text from the game) and replaced the one you had edited...you should right click the edited .trs file and choose compile. I could be mistaken, but I don't think you need to rebuild the game in order to use the translation file.

Khris

#6
Open the translation source in a text editor with line numbers, then go to line 5275. You will see a bunch of code. Remove it, so all the following English lines have odd line numbers again. Then compile the source again in the editor. It should work now (it did for me).

This is a bug btw, where what I guess is code from a dialog script ends up in the translation source.

SMF spam blocked by CleanTalk