Issues with .trs translation file (mixed english and original language)

Started by fslz, Sun 21/05/2017 17:00:02

Previous topic - Next topic

fslz

Hi folks! :)
After filling up the translation text file, by alternating original lines with the respective translations, all the hotspots, gui's and buttons are correctly translated.
For the speech we used the .DisplayAt function instead of the .Say one and that's where shit hits the fan: most of them are translated but there's a few of them that keep being in their original version.
We updated, compiled and double checked the .trs file, and we were not able to find any solution to this.
Any help is much appreciated, thanks in advance.




Mandle

I usually find that this is a problem with a mistake in the way the TRS file was handled:

Look for line breaks where there shouldn't be any, or missing line breaks where there should be...

The TRS is a delicate beast...

CrashPL

Just like Mandle says, one of the things to remember, while handling the *.trs file, is the space at the end of the string - if the original string happens to have a space at the very end, it won't be translated. I remember spending a good amount of time wondering why "Acquired " kept displaying in English, while doing the translation... Maybe that's the cause here?

Crimson Wizard

I think I'd mention just in case that not all strings get automatically translated. For example, string formatting arguments are not.

Code: ags

String s = "Red";
Display("My favourite color is %s", s); // "My favourite color" will be translated, but "Red" won't be.


For these you'd need to do something like this:
Code: ags

String s = "Red";
Display("My favourite color is %s", GetTranslation(s)); // Now both parts will be translated

SMF spam blocked by CleanTalk