Made a translation but half my lines didn't translate

Started by doctorhibert, Sat 23/03/2019 23:41:59

Previous topic - Next topic

doctorhibert

Edit: I still don't know what's wrong, but sending the entire game over to my other computer seems to have fixed it, so whatever. Sometimes you gotta take the nuclear option


Hi. I made a translation for my game. Just created a .trs file, put the translated lines in the space for the ones I wanted to translate, and left the ones I didn't want to translate with their black spaces in between. Yet, when I make the translation the default language, half the lines are still in the original language. I've looked at it, but there's no rhyme or reason as to why, they just seem chosen at random. Let me give you an example: This is the original translation

QuoteBueno, bueno, tranqui, ya te ayudo
Alright, alright, relax. I'll help you
*Fortbot carga un pu�o el�ctrico*
*Fortbot charges an electric punch*
*Le pega una alta pi�a a la mina, tan cargada que hasta te electrocuta. Posta, deber�as haberlo visto*
*He throws the woman a shocking jab, so charged it electrocutes you. For real, you should've seen it*
*Rick saca su arma y la apunta a la mujer*
*Rick pulls out his pistol and takes aim*
Lo siento, nena, nada personal
Sorry, baby, nothing personal
*CLICK*

*Rick se da cuenta que no tiene balas*
*Rick realizes he forgot to load his gun*
*La mujer tambi�n*
*So does the woman*

Now, here I made the translation the default language, then created a blank .trs file to see all the new text in one file

QuoteAlright, alright, relax. I'll help you

*Fortbot carga un puño eléctrico*

*Le pega una alta piña a la mina, tan cargada que hasta te electrocuta. Posta, deberías haberlo visto*

*Rick pulls out his pistol and takes aim*

Sorry, baby, nothing personal

*CLICK*

*Rick realizes he forgot to load his gun*

*La mujer también*

doctorhibert

#1
Reading through this now it seems all the lines with spanish characters (áéíóúñ) didn't translate. Which is really weird since ags supports these characters natively, and had absolutely no problem displaying them in the original release of the game. What is even going on right now? How do I fix this?

Edit: I will also clarify, that even though it looks like an error here in the forums, the files show these letters correctly, but not in the editor. Why did they suddenly stop working. I released the game 5 months ago and it worked perfectly fine. Why is it suddenly broken?

Edit 2: I'm even more confused. The build where I set english as the default language has all spanish letters broken. If I go to the build before I did that, some are broken some are not. I can not tell why that is. For example: In the tutorial, they don't work, but in the introduction of the game, and in the first level, they work, but you go 3 more levels, and THEN they break again. WHAT is going on???

I though, alright, it's gotta be something that happened at some point, so I went back and downloaded a build from December 2017. I ran it. And guess what: It's the exact same thing as the last one. Even though it predates the last one by several months, the exact same dialogues are broken, and the exact same ones work.

It's gotta be something with AGS. Some update or something that broke everything. But the problem is: It didn't break everything. It just didn't. Some parts of the text still work. If I go into the room .asc they show up as broken, BUT THEY WORK IN GAME. Yet in other rooms it looks the same BUT THEY DON'T

In my dreams we're all burning and the only one left is satan

Crimson Wizard

#2
Ok, I did not understand much from all this, I will have to come back later after I had a sleep.
Could you for instance clarify, what do you mean by "made the translation the default language"? Also please show an example of a line that does not translate in script.


But I will mention one thing: AGS is not a Unicode application, which means it only shows correct letters in the editor if you have corresponding language as the default for non-Unicode programs in system settings.
At the same time AGS games do not care whether these letters are displayed correctly in the editor or not because they work with letter codes which they use to find a proper symbol in font.

For this reason it's best not to mix languages inside a script if they use very different set of letters (not sure if this is relevant to English + Spanish though).

eri0o

Uhm, just a curiosity, are you sure the fonts you are using support the characters you are trying to print?

Also, can you make a minimal game where your problem happens? Just create an empty game and do a display with translation and use the fonts you are using.

doctorhibert

By "Made translation default language" I meant I went into the translation tab, right clicked the english one and clicked "Make default language", which puts the translation into all the code.

Here is the same lines I posted before in the code (A dialogue)

Code: ags
fortbot: Alright, alright, relax. I'll help you
narrador: *Fortbot carga un puño eléctrico*
narrador: *Le pega una alta piña a la mina, tan cargada que hasta te electrocuta. Posta, deberías haberlo visto*
stop
@2
girl: *Rick pulls out his pistol and takes aim*
girl: Sorry, baby, nothing personal
girl: *CLICK*
narrador: *Rick realizes he forgot to load his gun*
narrador: *La mujer también*


[imgzoom]https://i.imgur.com/Y1cXZJA.png[/imgzoom]

As to you eri0o, I'm just using the default AGS font, which definitely has those characters, and has worked in the past. If you don't believe me here is the original game:

https://peronjames.itch.io/neosaires2070

Even if you don't understand it, you can clearly see that those characters should and did work

Crimson Wizard

#5
Quote from: doctorhibert on Sun 24/03/2019 15:42:27
By "Made translation default language" I meant I went into the translation tab,
right clicked the english one and clicked "Make default language", which puts the translation into all the code.

Aha, I see now, I did not remember about this command in the editor.

So, you had all text in script in Spanish and TRS file in English. Then you wanted to switch them around. And some of the lines were not replaced in script.
Then you find out that the missing lines are ones that contained special spanish characters (with accents).

Ok, now its clear to me. Sorry, I was too tired yesterday to understand what do you mean.



My question is: can you check what format the original English TRS file is in? Is it saved as ANSI or UTF8? Because AGS probably tries to read everything as ANSI and if its not, then it may corrupt some letters.
That could explain why it could not match some of the speech lines (because it could not match the letters in script and letters in text file). But this is only my guess so far.
Some text editor may tell you this, in case you don't know a good one, there is very good Notepad++ which I may recommend. It displays text format in the status line and has menu commands to save in different format if necessary.

As a side question, have you ever edited ash/asc script files in another text editor (outside of AGS)?

Secondly, what is your system's locale, is it English or Spanish? Here's how you may find it if you are on Windows 10 (other versions are similar):
https://superuser.com/questions/497857/how-to-change-language-for-non-unicode-programs-in-windows-8


eri0o

Sorry, I am myself from south america too (maybe assuming too much here from your linked game name) and have had a ton of problems with lacking accents on pixel fonts, so when you said the things were working erratically, my guess was it worked where the font had the accents and it didn't where it didn't have. Anyway, I haven't attempted translations yet, but the ANSI thing CW is pointing is probably what's killing your file. I couldn't verify because your game doesn't have it but I noticed the Leeme.txt is UTF-8, so maybe.

SMF spam blocked by CleanTalk