News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Basic basic questions about Simutranslator...

Started by neroden, December 06, 2011, 04:32:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neroden

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?

prissi

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 ...

neroden

#2
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.

An_dz

Ask an account here at the forums, the contact in the simutranslator page is unavailable.

neroden

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).

Combuijs

QuoteSecond, 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



prissi

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.

neroden

Quote from: prissi 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²
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...

prissi

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.)

VS

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!

neroden

Sorry it took me so long to get back to you -- holidays, house renovations, etc...

Quote from: prissi 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.)
OK.  Thank you.  I'm going to start by double-checking those, as I should be able to fix those with patches.

Quote from: VS 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.
I hope this will help with the two with 'oversized images'.  I'll worry about those second....

prissi

The only oversized images are attractions. IT is enough to run it there at the moment.

neroden

#12
Quote from: prissi 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 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.

prissi

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.

VS

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!

prissi

Maybe my answer was a little harsh. What I want to say: I think I misunderstood you. Please state again.

neroden

Quote from: prissi on January 19, 2012, 08:12:53 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.

neroden

#17
Quote from: VS on January 19, 2012, 09:40:48 PMpak128 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?

VS


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!

neroden

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?

prissi

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.

Frank

#21
Quote from: prissi on January 23, 2012, 01:34:55 PM
..., 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