Translation troubles (SOLVED. TRANLSATIONS MALFUNCTIONS)

Started by JpSoft, Thu 19/06/2008 15:25:37

Previous topic - Next topic

JpSoft

ALready checked the forums and i dont found nothing...

Using AGS 3.00

I begun trying to translate the main game into english to release the final beta version. Of course, i just translate basic issues related with text in buttons and labels to make the game understable for non-spanish speakers.
The first i noticed is that now the translation file is not separated in different rooms (like it was in AGS 2.72 as i noticed when translating paul quest). Maybe it was posted before, but I'm unable to find the topic related.
Second, almost all the translation works, but i have many fails:

1- In the global script, i have declared this array

String SDificultad[6];
Export SDificultad;

Then, in game start, i assign values to the arrays:
SDificultad[1] = "Muy Facil";
SDificultad[2] = "Facil";
SDificultad[3] = "Estandard
SDificultad[4] = "Dificil
SDificultad[5] = "Muy Dificil";

This text appears in the translation file and i translated it, but when the translation file is compiled, it still shows the spanish words. Maybe something with arrays? I trying updating the translation and even  i delete it and create a new one and still have the same trouble.

2.- One label need have a very LONG text (more than 500 characters), so waht i did was this declaration:

String text1campana, text2campana;

Acording to what the game needs, i adjusted the value of this 2 variables and finally:

LabelCampana.Text  = String.Format("%s%s",text1campana, text2campana);

The game works perfect in the default language and all the text appears in the translation file, but again when the translation file is compiled and used, it shows the default language strings.

3- My game dont use hospots at all; you cant find one in all the rooms, but the translation file still have "hotspot 1" till "hotspot  40". Is this a known BUG? I neither found nothing about this in older topics.

Thanks for any help

Jp

JpSoft

Solved after an entire night working...

Looks like the translations do not work in the same way the main engine, so multiple strings variables displayed do not work properly.

For example:
Code: ags
String mensaje1 = "This is the begin";
String mensaje2 = "... and this is the end";
String mensaje3 = String.Format("%s%s",mensaje1,mensaje2);


Give you "This is the begin... and this is the end" always, even if you are using a translation of the game.

To avoid this, i just did this...
Code: ags
String mensaje1 = String.Format("This is the begin");
String mensaje2 = String.Format( "... and this is the end");
String mensaje3 = String.Format("%s%s",mensaje1,mensaje2);


And then i get the correct translated message. So i decided add the string format to every string i declared in the game and now the translation works perfect.

I found some malfunctions during the various tests i did. For example, if the las line is...

Code: ags
String mensaje3 = String.Format("(%s%s)",mensaje1,mensaje2);


What i get in the screen is "((null))"  ::)

Hope this helps anyone else.

Jp

Gilbert

Hmmm these look certainly like bugs (I have no idea why you can't define the contents of Strings directly, unless CJ has a good reason; also the (null) problem is strange too).

As you're using V3.0.0, can you try the most recent official version (V3.0.1, back up your game first) and see whether the problems persist? If this is not fixed yet, you can always post a message in the V3.0.2 beta thread to prompt CJ to look at this threade (as he may not check beginners' forum that frequent) and maybe, you'll get a fix in time when V3.0.2 comes out. (Too bad I'm not a mod in beginners' tech forum, otherwise I'll just move this to technical forum.)


Khris

Hmm, doesn't this fall under what's covered by GetTranslation()?

JpSoft

Quote from: Gilbot V7000a on Fri 20/06/2008 11:01:14
Hmmm these look certainly like bugs (I have no idea why you can't define the contents of Strings directly, unless CJ has a good reason; also the (null) problem is strange too).

As you're using V3.0.0, can you try the most recent official version (V3.0.1, back up your game first) and see whether the problems persist? If this is not fixed yet, you can always post a message in the V3.0.2 beta thread to prompt CJ to look at this threade (as he may not check beginners' forum that frequent) and maybe, you'll get a fix in time when V3.0.2 comes out. (Too bad I'm not a mod in beginners' tech forum, otherwise I'll just move this to technical forum.)



I tried the update to 3.0.1 but i have too many troubles so i downgarde it again. Anycase i will create a recopilation of the malfunctions and post it in the technical forum. (i even have a serious crash, which needed close the AGS, delete manually the .trs file and then reopen the AGS)

Jp

SMF spam blocked by CleanTalk