Author Topic: Basic basic questions about Simutranslator...  (Read 6134 times)

0 Members and 1 Guest are viewing this topic.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Basic basic questions about Simutranslator...
« on: December 06, 2011, 04:32:45 AM »
OK!  So I want to understand how this translation thing works from the programmer's side of things.  I'm mostly engaged in merging changes from standard simutrans into simutrans-experimental, and also from pak128.britain into pak128.britain.experimental.

It seems to me that what I need to do is -- after merging everything which isn't a translation -- upload the texts for the merged pak, or the texts for the merged game, to the Simutranslator (most likely there will be nothing new, since the texts will have been uploaded either by James Petts for experimental or by someone else for standard) -- and then extract a full set of translations to add to the merged version.

Except I don't know how to do any of that.  Especially the part about extracting a full set of translations from Simutranslator.  (Including things like city name generation, base texts, in-game help files, keystroke help, etc.)

So, can someone explain to me how this works?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8762
  • Total likes: 306
  • Helpful: 229
  • Languages: De,EN,JP
Re: Basic basic questions about Simutranslator...
« Reply #1 on: December 06, 2011, 10:55:45 AM »
On the download page there is a selection to download the entire pak for all languages (if you are logged in). This does the trick for whatever pak you like, base is for standard. I am not sure if experimental uses this at all, at least for pak.britain128 it was not the case until the 1.09 ...

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #2 on: December 06, 2011, 09:33:21 PM »
OK, got it.  I think I need an account, then.... going to request one now...

EDIT: the contact-the-Simutrans-admins page is freezing up on me.  :-P  Wonderful.
« Last Edit: December 06, 2011, 09:50:15 PM by neroden »

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Basic basic questions about Simutranslator...
« Reply #3 on: December 07, 2011, 03:02:27 AM »
Ask an account here at the forums, the contact in the simutranslator page is unavailable.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #4 on: December 07, 2011, 08:52:06 PM »
OK, I have an account and most things are going well.

My next steps are two things (as noted at http://forum.simutrans.com/index.php?topic=8719.msg81227#new ).  First, I must find out how to upload new objects for pak128.Britain -- TheHood has said he's happy to have me do this (here http://forum.simutrans.com/index.php?topic=7850.25;topicseen).  I'm just going to upload his objects, not change anything.  The problem is that currently a number of objects are missing from simutranslator.

Second, I must find out how to fix the problems with Large_Football_Ground and Small_Cricket_Ground, which show up in simutranslator but cannot be translated (try looking at the page for either one, it stops loading halfway through, leaving no box to type a translation into).  This might be fixed by uploading the objects again.  Or it might not.

Any assistance with these would be much appreciated.  If I can get this working, then I will see about pak128.britain.experimental.

EDIT: I also have to be able to upload (for pak128.britain) new texts which don't have objects associated (like %s factory %s %s).

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Basic basic questions about Simutranslator...
« Reply #5 on: December 07, 2011, 10:08:20 PM »
Quote
Second, I must find out how to fix the problems with Large_Football_Ground and Small_Cricket_Ground, which show up in simutranslator but cannot be translated (try looking at the page for either one, it stops loading halfway through, leaving no box to type a translation into).  This might be fixed by uploading the objects again.  Or it might not.

This might have something to do with these pictures being too big. There is a limit to the size of the picture to display it correctly. There might also be a limit for the size to be working properly. Maybe you can make them temporary smaller?
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8762
  • Total likes: 306
  • Helpful: 229
  • Languages: De,EN,JP
Re: Basic basic questions about Simutranslator...
« Reply #6 on: December 07, 2011, 10:10:16 PM »
The problem with those dats is that the accompaning images are too width and too high for simutranslator. The images needs serious cutting in size to show up in the translator. The max size for image file for import 1622016 px²
Quote
example
 1408px * 1152px
 1152px * 1408px

 height * width <= 1622016

Please leave the upload of texts by the webpage to the pak set administrators. This page is a weapon of mass destruction for normal translators. Rather edit those missing texts on their pages or give the relevant list to an administrator. I spent days on pak128.britain upload and translation fixing.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #7 on: December 07, 2011, 10:30:12 PM »
The problem with those dats is that the accompaning images are too width and too high for simutranslator. The images needs serious cutting in size to show up in the translator. The max size for image file for import 1622016 px²
I can't do much with images.  Can you upload them with no images or something?  EDIT: I can ask James Hood to recut the image files into pieces, I suppose.

Quote
Please leave the upload of texts by the webpage to the pak set administrators. This page is a weapon of mass destruction for normal translators. Rather edit those missing texts on their pages or give the relevant list to an administrator. I spent days on pak128.britain upload and translation fixing.

Right then.  Case one: you can make me a pak set administrator for pak128.britain (since James Hood doesn't want to do the work himself, and I don't think jamespetts does either; I haven't asked Susanna). I *am*, after all, spending my time debugging the pak; I am not a normal translator, I am a programmer first and foremost.

Case two: you have my list of missing objects (attached to http://forum.simutrans.com/index.php?topic=8719.msg81227#new)   Fix it, since I can't.  You also have my list of missing strings, in the same comment.  Fix it, since I can't.

Unfortunately, that's the way this sort of thing works: if you don't give me the ability to fix it, you're volunteering to spend more time on it yourself.  James Hood has said he'd be happy to have me work on it...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8762
  • Total likes: 306
  • Helpful: 229
  • Languages: De,EN,JP
Re: Basic basic questions about Simutranslator...
« Reply #8 on: December 07, 2011, 11:37:46 PM »
The pak128.britain had several malformed dat definition, like dats no starting or ending with \n--\n. Aparently those stems from that. I made you pakadmin.

The easiest way is to upload those missing names is to upload the files from the svn again and check that actually all of those are imported. If not, add the obj seperator "--" to the files and upload again. (That was what took a lot of my time.) Afterwards the dat files are then in a shape to allow for further automatic processing and even reuploads without loosing stuff again.

(On a personal note: I would rather not add my email to simutranslator (it only printed in the translation files.) than not give a real name. But it might just old-fashioned.)

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Basic basic questions about Simutranslator...
« Reply #9 on: December 08, 2011, 11:23:54 AM »
Script in svn pak128/tools/extract-objects-translator-reduced.py creates output suitable for upload, as in, max of four images, selected semi-intelligently from the file, and the files themselves have names of objects... You'll also need simutools.py which is next to it. And of course python + pygame. The time savings can be HUGE, unless you have to debug the dat files, that's where even this won't help you much.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #10 on: January 18, 2012, 10:06:59 PM »
Sorry it took me so long to get back to you -- holidays, house renovations, etc...

The pak128.britain had several malformed dat definition, like dats no starting or ending with \n--\n. Aparently those stems from that. I made you pakadmin.

The easiest way is to upload those missing names is to upload the files from the svn again and check that actually all of those are imported. If not, add the obj seperator "--" to the files and upload again. (That was what took a lot of my time.)
OK.  Thank you.  I'm going to start by double-checking those, as I should be able to fix those with patches.

Script in svn pak128/tools/extract-objects-translator-reduced.py creates output suitable for upload, as in, max of four images, selected semi-intelligently from the file, and the files themselves have names of objects... You'll also need simutools.py which is next to it. And of course python + pygame. The time savings can be HUGE, unless you have to debug the dat files, that's where even this won't help you much.
I hope this will help with the two with 'oversized images'.  I'll worry about those second....

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8762
  • Total likes: 306
  • Helpful: 229
  • Languages: De,EN,JP
Re: Basic basic questions about Simutranslator...
« Reply #11 on: January 19, 2012, 03:35:41 PM »
The only oversized images are attractions. IT is enough to run it there at the moment.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #12 on: January 19, 2012, 06:43:38 PM »
The pak128.britain had several malformed dat definition, like dats no starting or ending with \n--\n. Aparently those stems from that. I made you pakadmin.

The simutranslator web interface is confusing me and I want to make sure I do this right.

I appear to have access to "Object Import" (so I am a pakadmin), but I can't choose a particular set from the pulldown menu.  Perhaps something additional needs to be done to specifically make me a pakadmin for pak128.britain?  I don't want to upload into "no pak"!

I'm planning to start with a very small directory (air) and once I get that working I'll try fixing the others.

EDIT: I'm going to need to add a base text, and I wanted to see how the format for 'fake object files' worked, so I tried to download tab-obj.py from http://simutrans-germany.com/translator/help/object_import_bt.htm -- but tab-obj.py seems to have gone missing.
« Last Edit: January 19, 2012, 07:04:11 PM by neroden »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8762
  • Total likes: 306
  • Helpful: 229
  • Languages: De,EN,JP
Re: Basic basic questions about Simutranslator...
« Reply #13 on: January 19, 2012, 08:12:53 PM »
Sorry, I will not grant access to base.tab. Why do you need this anyway? If you want to override an base entry, you can add it to pak128.britain. Or report a missing sting, and we will add it to base.tab in the svn.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Basic basic questions about Simutranslator...
« Reply #14 on: January 19, 2012, 09:40:48 PM »
This sounds like a misunderstanding. I'm not sure Neroden knew what "base" means, and then, he didn't really ask for that kind of access, either?

Neroden: "Base" is sort-of term and reserved for program, since that is the name of the file (base.tab) holding all the strings (they are not extracted automatically). You could perhaps use that to refer to program texts in Translator, too. Anyway, as a not-standard-core-contributor person you have absolutely no need to touch this. You might have used the word as a word, not a term, though... Okay, this is confusing :::)

If you need base.tab, it is part of sources, so you already have it in a way - it's one level up from the code, next to trunk.

If you wanted just an example, you know where to find base.tab, and pak128 also contains a file at top level (pak128-program_texts.dat), which contains texts that overwrite these from base. Just same strings (names of fake objects), that's the whole magic. You import these as part of the pakset.

Uhm, looking back, this is somewhat unstructured information, but hopefully complete.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8762
  • Total likes: 306
  • Helpful: 229
  • Languages: De,EN,JP
Re: Basic basic questions about Simutranslator...
« Reply #15 on: January 19, 2012, 10:21:29 PM »
Maybe my answer was a little harsh. What I want to say: I think I misunderstood you. Please state again.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #16 on: January 19, 2012, 11:28:35 PM »
Sorry, I will not grant access to base.tab. Why do you need this anyway?
I don't need access to base.tab

EDIT: I believe "program text" is the phrase I was looking for
Quote
If you want to override an base entry, you can add it to pak128.britain.
That's what I plan to do.  I was trying to see what the "fake dat file" format should look like.

The program text I need to override is not present in the pak128.britain strings list, so I need to somehow get it in there.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #17 on: January 19, 2012, 11:31:40 PM »
pak128 also contains a file at top level (pak128-program_texts.dat), which contains texts that overwrite these from base.

That's what I'm looking for.  Thank you.  I'm trying to figure out exactly how the dat file should look for these overrides.

EDIT:
That problem is solved, I know what that file needs to look like now.  (First version attached, just so you can see it.)  pak128.britain has its own style of station names, and there are a few other little things like that.

So I still have the problem that I don't seem to be authorized to add or modify the objects of pak128.britain.  Since James Hood is pak maintainer, do I need to have him make me a co-maintainer?
« Last Edit: January 19, 2012, 11:55:52 PM by neroden »

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Basic basic questions about Simutranslator...
« Reply #18 on: January 20, 2012, 08:55:51 AM »
Going offtopic now, but...
Maybe my answer was a little harsh.
Certainly not :)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Total likes: 0
  • Helpful: 28
  • Nathanael Nerode
Re: Basic basic questions about Simutranslator...
« Reply #19 on: January 23, 2012, 12:41:43 AM »
OK, again, I seem to be a pakadmin... *but not for any specific pak*.  So I can add objects... *but I can't add objects to any specific pak*.  What do I do about this?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8762
  • Total likes: 306
  • Helpful: 229
  • Languages: De,EN,JP
Re: Basic basic questions about Simutranslator...
« Reply #20 on: January 23, 2012, 01:34:55 PM »
Honestly, I do not know. The translator has several bugs at the moment, like suggestions resting for eternity and not being able to delete some objects. I will look into this tonight, but no promises.

Offline Frank

Re: Basic basic questions about Simutranslator...
« Reply #21 on: January 24, 2012, 10:19:13 AM »
..., like suggestions resting for eternity ....

to delete go to the page 'Object Guide'

even selected all at once

selected set and 'text suggestions' click 'search' -> marked ( checkbox right ) and click 'suggestion delete'


which is expected to go even faster than every single entry to edit ;)

Quote from: changelog.txt
07-Nov-2009 Frank Penz :

...
    *CHG: add accept/delete suggestions in 'Object Guide'
...

 :o :) ;) ;D
« Last Edit: January 25, 2012, 12:55:10 AM by Frank »