[Feature suggestion] (DONE) Translation Editor (Browser tool)

Started by Cassiebsg, Sat 11/01/2020 00:39:32

Previous topic - Next topic

Snarky

Quote from: Cassiebsg on Mon 17/02/2020 12:51:01
Should be part of AGS pack IMHO.

I think SpeechCenter really should be, as it's an invaluable tool/improvement of AGS. Though I take it that would require it to be open source.

Cassiebsg

Just reporting.

Spellchecker is working perfectly now.  (nod)
Search works better too.
The very very very long label is still a bit overlapping on the last line (the 5th line ... yes it's a very long label), but stretching the browser window a bit more solves the problem.  ;)

As an online editor it's perfect, or very close to it anyway.  (nod)
There are those who believe that life here began out there...

Cassiebsg

Uhm... okay, seems like my info about using UTF-8 was wrong, and it's ANSI instead.  :-[

https://github.com/adventuregamestudio/ags-manual/wiki/Translations

Quote
make sure you save and encode the .trs file to ANSI and NOT in unicode or UTF-8 encoding.

(Sorry for double posting, just wanted to make sure this post is "registered" as new and shows up on the "show unread posts since last visit", as opposed to editing my previous post.)
There are those who believe that life here began out there...

Baguettator

Hi there !

That online tool is nice, but I encounter a problem : I'm french, and the texts in my game use àéèê letters, and they don't display normally in the app. Is it possible to have them displayed as intended ?

Cassiebsg

They should display correctly. I have portuguese (ºçáèéíóá), danish (øåæ) and english keyboard setup and can see all the special characters correctly. So make sure you are using the correct page code.

Are you saying you saying that they don't show up correctly when you're typing the translation, when you save the translation and check it or when you place it in the game?

Otherwise, send me a txt sample of the text showing up wrong, and I'll see if I can figure out how you can fix it.  :)

There are those who believe that life here began out there...

Baguettator

Sorry, maybe I didn't explain clearly. In the online translator, the texts in french (native language of the game) display badly. There are ? symbols (black square with ? inside) in place of éàèê etc...

I think it is not a problem for the translation, but it is a little ugly for the translator, and it could make ununderstanding.

Creamy

Hi Baguettator,
Did you import a font with special characters in your game? See the fonts with "à" on Dafont for instance. The default font doesn't include them. Dans mes jeux ça marche  ;)
 

Baguettator

Hi ! Yes I use a font that works with these characters. (Helvetica, Impact and Crackhouse). In the game it displays normally. It is in the online tool that ? appear.... :)

Cassiebsg

are you using the trs that AGS provides, or some other file? It kind of sounds like you har using the wrong page code to me.

Is it only the displayed text that shows wrong? Can you type regular special characters in the text box? or do these also show wrong?
post your trs file so w can take a look.
There are those who believe that life here began out there...

Creamy

I can see the problem when I open a .trs file with tzachs' online editor.

Speech center translation editor works just fine.
 

Baguettator

It is the letters âéè etc... displayed by the online tool that are displayed with ? in a black square.

I open a trs file from my game in AGS (using ags editor of course)

In the text box, âéè etc... display correctly !

The SpeechCenter tool is good, but it has a bug : when you add a line in the translated text (using ctrl + enter or alt + enter), you save and reload the file, a \[\ is added in place of the line. So instead of :

Code: ags
Mon nom est Andy.

Et vous ?

My name is Andy.

And you ?


It is displayed :

Code: ags
Mon est Andy.

Et vous ?

My name is Andy.\[\And you ?


And after several saves/reloads, it could be (no joke !) :

Code: ags
Mon est Andy.

Et vous ?

My name is Andy.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\And you ?


I have mentionned it on the related topic, and someone indicated me your online tool. So I wish to find the best :)

I also find 2 others tool for translation, but the same problem : ? in black square...

https://forum.xentax.com/viewtopic.php3316

https://github.com/Taktloss/AGS_TranslationEditor/releases/tag/v1.1.0.2


Cassiebsg

Uhm, you are not suppose to add any lines to the translated files! One line only per translation.
There are those who believe that life here began out there...

Baguettator

But, how do you translate texts that are written on several lines ? With [ symbols ? In the translator ?

Could you show me an example please ?

Cassiebsg

Here's an example line:

Code: ags

&19 I came as soon as I got the message from Master Jarl [that a bad batch of mushies had been dispatched to your room, sir.
&19 Vim assim que recebi a mensagem do mestre Jarl [que uns mushies estragados fora enviado para o seu quarto, senhor.


The [ represents a break in the text. There's no \ anywhere. I loaded my english trs, added the new translated line and saved it on my hd. I then copy pasted it from notepad to here. (note: I know nothing about SpeechCenter tool, as I've never used it. I'm refering to Tzachs's web app)

EDIT: Also I just tested the trs with foreign characters and they're displaying just fine for me. So again, this is most likely a problem with your computer/OS/browser code page setup.

here's my trs if you want to try it out: http://www.mediafire.com/file/7jkljy9oezj2tmp/ags%25289%2529.trs
There are those who believe that life here began out there...

SpeechCenter

I just checked and indeed when the file is reloaded, the new line is loaded as '[', so later when saved it's '\['.
I'll check how to address it, shouldn't be complex.

@Baguettator I made sure to monitor these forums for anything that comes up with tools I released here, but if I seem to be unresponsive, just give me a nudge.

tzachs

Hi @Baguettator, sorry, just saw this now.
I can't reproduce this error, if you still need help, then I have some questions:
- What OS (and version) are you running on?
- What browser (and version) are you running on?
- Can you supply a sample trs file that shows the problem?
- Do other websites with those characters appear normal in your browser?
- Is it both the text field and label which has this problem, or just one of them?

Sorry for the delay (like SpeechCenter, if I'm unresponsive send me a PM).

Baguettator

Hi @tzachs !

- I am using Windows 10.
- I am using Mozilla Firefox 84.0.2 (64-bit) version
- I don't know how to send you a trs file, but it seems the problem happenned to other people than me (see messages above).
- Yes, with websites these characters are appearing normally
- it is just the non-editable texts that are appearing with ? in black squares, the translation I write with these symbols is normally displayed

tzachs

Thanks @Baguettator, I tried to reproduce on Windows 10 with Firefox 84.0.2 (64-bit) but it still worked fine for me.

The fact that the editable text field works for you but the readonly label doesn't is a heavy hint that the issue is related to how those letters are encoded in your file, so I can't proceed unless you send me your file to debug (or @Creamy or somebody else that can reproduce it sends their file). One way to send the file is to upload it somewhere (like dropbox) and then send me the link. If you're worried about sharing your game text, you can cut out all but 1-2 lines (but check that the problem still persists with the new file).

Thanks.


tzachs

Thanks @Baguettator, I was able to reproduce the problem with that file.

The problem is that the translator assumes the file is encoded in UTF-8, but your file is encoded in Windows-1252.
It seems that AGS uses whatever encoding is set in your machine, which is actually not great, as it means that if you export translation on one computer and import it on another you might have these types of issues as well (or even on the same computer if you switched the encoding). The best thing would probably to always use the same encoding (i.e UTF-8) but doing that now will break current exported translations for people.

Anyway, I tried auto-detecting the encoding of the file but the scripts I found for that were unreliable, so I'm going to add a drop-down for selecting the encoding which should then fix it. I'll update when it's ready.

SMF spam blocked by CleanTalk