Author Topic: [Feature suggestion] Translation Editor (Standalone exe)  (Read 165 times)

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Okay, I'll start by saying that if I had the skills to do this, I would do it myself.
So I'm just putting the idea here, in case anyone with the skills, time and will, can do it.

Problem: As anyone who ever have dealt with translations knows, it's very easy to break the translation file. And fixing it again takes forever. So I thought that if we could eliminate the possibility of messing the original lines, then it would make both the translator and the dev really happy.  (nod)

Suggestion: Create an editor for trs files. External to AGS. Maybe call it AGSTRanslationEditor.exe (or AGSTRSEditor.exe). But it should be an exe that does not need AGSEditor or any AGS stuff. So in reallity it's just a program that can load and save text files with the extension trs.

Features:
- Load trs file
- Save trs file
- Spellcheck (optional if too complicated)
- Text display for original line - not editable!
- Text box to enter translated line.
- Button/Arrows for next and previous line.
- Eventually box to jump to line number. (like you have translated 200 out of 500 lines, just jump to line 200 and continue)
- Box/help displaying the trs warning about characters and such (optional)

That's about it. Basically just a text editor oriented specifically to handle a trs file.

Distribution: Packed with AGS Editor and as Standalone.
« Last Edit: 11 Jan 2020, 00:44 by Cassiebsg »
There are those who believe that life here began out there...

tzachs

  • Mittens Vassal
  • AGS Baker
  • Parking Goat- games that goats like!
    • I can help with translating
    • tzachs worked on one or more games that won an AGS Award!
    •  
    • tzachs worked on one or more games that was nominated for an AGS Award!
Re: [Feature suggestion] Translation Editor (Standalone exe)
« Reply #1 on: Yesterday at 05:15 »
I made a small web app that I think meets most of your requirements: https://tzachshabtay.github.io/ags-trs-editor/

I never worked with trs files myself, and I guessed at the format, so if it doesn't work for you, send me your file so I can fix it.

Quote
- Box/help displaying the trs warning about characters and such (optional)
I didn't know what that means so I didn't do it.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: [Feature suggestion] Translation Editor (Standalone exe)
« Reply #2 on: Yesterday at 11:24 »
A web app sounds like a good idea, unfortunately I don't know how to use it.  :-[
When I follow you link all I get is a blue top bar with the name of the app, a load icon and the link to the source.
Rest of the page is just blank.  ???

Clicking the Load opens windows explorer and asks me to upload a file? I tried choosing a trs file but all I got was an empty page.
As for the source I woudn't even know where to begin to use it.

The text warning is the first few lines of any trs file.
Quote
// AGS TRANSLATION SOURCE FILE
// Format is alternating lines with original game text and replacement
// text. If you don't want to translate a line, just leave the following
// line blank. Lines starting with '//' are comments - DO NOT translate
// them. Special characters such as [ and %%s symbolise things within the
// game, so should be left in an appropriate place in the message.
//
// ** Translation settings are below
// ** Leave them as "DEFAULT" to use the game settings
// The normal font to use - DEFAULT or font number
//#NormalFont=DEFAULT
// The speech font to use - DEFAULT or font number
//#SpeechFont=DEFAULT
// Text direction - DEFAULT, LEFT or RIGHT
//#TextDirection=DEFAULT
// 
// ** REMEMBER, WRITE YOUR TRANSLATION IN THE EMPTY LINES, DO
// ** NOT CHANGE THE EXISTING TEXT.

Uhm, after posting this I just noticed something which I always assumed wasn't changeable. So going to do a few tests on the trs file.

As for the format for trs file is just a text in UTF-8 encoding.

If you need some trs to test (these are for the Indiana Jones and the relic of the Viking demo):

Original trs: https://www.mediafire.com/file/3vg9hz9uhkm5kha/New.trs/file

Trs with Italian translation: https://www.mediafire.com/file/5q05tlso7y2ji3b/ITA.trs/file

« Last Edit: Yesterday at 11:26 by Cassiebsg »
There are those who believe that life here began out there...

tzachs

  • Mittens Vassal
  • AGS Baker
  • Parking Goat- games that goats like!
    • I can help with translating
    • tzachs worked on one or more games that won an AGS Award!
    •  
    • tzachs worked on one or more games that was nominated for an AGS Award!
Thanks for the sample files, it should work now if you want to try again.

(Yes, you should click the load icon and select a trs file).

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Thanks, I can nos see "Please Load trs file".
But when I do load it, all I get is still an empty page. And I have set all scripts on.  :-\

Maybe it just doesn't work with my browser? Firefox 59.0.3 (64 Bits)
There are those who believe that life here began out there...

Snarky

  • Global Moderator
  • Global Moderator
  • Mittens Lord
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Seems to work OK for me (Firefox 72.0.1). Click on the upload file cloud icon, select Cassie's trs, and it shows a list of all the original lines with the ability to enter translations.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
I decide to post it on the cog7 (Indiana Jones and the Seven Cities of Gold) forum to get feedback from those translating the demo.

Here's one comment (http://binarylegends.net/forum/index.php/topic,981.msg8509.html#msg8509)
Quote
The editor seems to work but I have one big feature request: I cannot search for strings in the whole file. I assume the web server streams the content, so searching is limited to the part which currently is transmitted. And line numbering would be great.
There are those who believe that life here began out there...