Author Topic: Translation missing words  (Read 1473 times)

WHAM

  • WHAMGAMES
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
    • WHAM worked on one or more games that won an AGS Award!
    •  
    • WHAM worked on one or more games that was nominated for an AGS Award!
Translation missing words
« on: 14 Mar 2012, 19:46 »
Hiya everyone!

We're working on translating Big Blue World Domination and there seems to be a problem. While most of the game translates just fine, a few bits just will not take the translation, and I am wondering if this has something to do with how the translations work, as I can't seem to figure it out.

I have checked the .trs file and the original words and phrases are all there, but for example the agent codenames are not translated and neither are the description texts for empty save game slots.

An example:

In a script file "names" i have an array that contains all the codenames, and I have a function that populates this array (NameSetup()) at the start of the game, with names I punched into the source code manually.
Code: [Select]
Name[0].codename = "Ponch"; Name[1].codename = "Darth"; Name[2].codename = "Ghost"; Name[3].codename = "Icey"; Name[4].codename = "Dualnames";
All the names above appear correctly in the .trs file.

As an agent is assigned a name, the codename is generated like this:

Code: [Select]
String CodeNameGen() { // Generates a (cool) code name for an agent
  String N;
  N = String.Format("%s-%d", Name[Random(29)].codename,  Random(99));
  return N;
}

However, this apparently does not manage to draw a translated codename, but an untranslated one instead.
Any ideas?
Wrongthinker and anticitizen one. Pending removal to memory hole. | WHAMGAMES proudly presents: One More Fathom!

Ghost

  • Guest
Re: Translation missing words
« Reply #1 on: 14 Mar 2012, 20:08 »
I had similar troubles with COTD- even though the translation files were complete, and the trs files compiled without an error, the italian translation skipped parts of a hardcoded "USE a ON b" string to create the GUI text, and the french file skipped a couple of words from character.Say commands. I am still fiddling around to solve that...

You can check, at runtime, if a certain translation file is used. It sounds like a pain in the ass, but you could simply provide translated names in the code, and use them depending on the translation used.
Then again, EVEYBODY uses English codenames these days. Is a translation of those really necessary?
« Last Edit: 14 Mar 2012, 20:10 by Ghost »

WHAM

  • WHAMGAMES
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
    • WHAM worked on one or more games that won an AGS Award!
    •  
    • WHAM worked on one or more games that was nominated for an AGS Award!
Re: Translation missing words
« Reply #2 on: 14 Mar 2012, 20:37 »
The problem exists on several more areas as well, and due to the state of the code I really don't want to go in and start adding checks for translations in the old code, as it is poorly documented and hastily written. It would take me hours and hours to find all the problem areas in the code, let alone fix everything manually based on the translations. :(
Wrongthinker and anticitizen one. Pending removal to memory hole. | WHAMGAMES proudly presents: One More Fathom!

Re: Translation missing words
« Reply #3 on: 15 Mar 2012, 00:19 »

WHAM

  • WHAMGAMES
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
    • WHAM worked on one or more games that won an AGS Award!
    •  
    • WHAM worked on one or more games that was nominated for an AGS Award!
Re: Translation missing words [solved]
« Reply #4 on: 15 Mar 2012, 07:23 »
You make me feel like an idiot again, I recall seeing that in the manual but I thought it was something that just returns the name or ID of the translation that is currently being used or something, and dismissed it.

I just did a quick test to see how this works and I think I can resolve most, if not all, issues using this. It will still take me an hour or two to do it, but that's scripting for you.
Wrongthinker and anticitizen one. Pending removal to memory hole. | WHAMGAMES proudly presents: One More Fathom!

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Translation missing words
« Reply #5 on: 15 Mar 2012, 20:55 »
an hour or two to do it, but that's scripting for you.

Nah, scripting for Khris it'd take 5-10 minutes. 8)

WHAM

  • WHAMGAMES
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
    • WHAM worked on one or more games that won an AGS Award!
    •  
    • WHAM worked on one or more games that was nominated for an AGS Award!
Re: Translation missing words
« Reply #6 on: 15 Mar 2012, 21:45 »
Monkey speaks the truth.
I also realized that I can check for the translations as I am initializing the arrays at game start, instead of checking for translations later on when the array contents are called. This way I had to add a check for each entry into the arrays, but due to the fact that the arrays were well organized unlike my other code in this game the job was surprisingly easy.

There are still some oddities that I am investigating, but the function seems to work just right.

As a result: MORE TRANSLATIONS! WOO!
Wrongthinker and anticitizen one. Pending removal to memory hole. | WHAMGAMES proudly presents: One More Fathom!