The International Simutrans Forum

 

Author Topic: Simutranslator for TileCutter  (Read 10586 times)

0 Members and 1 Guest are viewing this topic.

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Simutranslator for TileCutter
« on: January 18, 2009, 12:43:07 AM »
Is it possible to use Simutranslator to translate another project? I seem to remember years ago talking about using it for translating TileCutter, I've been working on a new version and it'd be cool to get some languages other than english for it. The translation files it uses are as far as I know the same format as those used for Simutrans.
« Last Edit: January 29, 2010, 11:38:36 AM by Timothy »

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Simutranslator for other projects?
« Reply #1 on: January 18, 2009, 01:00:18 AM »
The in-game help files are included in simutranslator and they're very long texts, therefore I guess it would be possible.

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Simutranslator for other projects?
« Reply #2 on: January 18, 2009, 11:06:38 AM »
There is a dummy object type for translator, program_text, so that you can import it.

---
obj=program_text
name=Build monorail depot
---

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Simutranslator for other projects?
« Reply #3 on: January 18, 2009, 01:22:06 PM »
There is a dummy object type for translator, program_text, so that you can import it.
...

This is not posible.

It depends on the character encoding for export.

@Timothy
Please send me the language file and I look at what works.

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for other projects?
« Reply #4 on: January 18, 2009, 04:01:22 PM »
I've attached the current base translation file, there's a short config section at the head followed by key\ntranslation\n pairs, same as the Simutrans language files. I can do something about the config section if that's a problem also.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Simutranslator for other projects?
« Reply #5 on: January 20, 2009, 08:02:56 PM »
@Timothy
Have you an translator acount?

Export empty translation objects?

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for other projects?
« Reply #6 on: January 20, 2009, 09:14:44 PM »
I don't have a translator account, no.

I don't quite understand what you mean by export empty translation objects?

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Simutranslator for other projects?
« Reply #7 on: January 20, 2009, 09:27:29 PM »
...I don't quite understand what you mean by export empty translation objects?

Always export all the objects, with or without translation. Yes or no?

Or empty translation = english text?

I don't have a translator account, no.
...

see pm

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for other projects?
« Reply #8 on: January 20, 2009, 09:59:45 PM »
Ah, I see what you mean, by default TileCutter will use the translation key (which is plain english for the most part) if there isn't a translation string available. However the english translation would probably be better. So empty translation should = english text.

Is there a way to customise the additional text it outputs (the comments with authors etc. in?), so I could include the extra bits TileCutter needs for the translation automatically?

Thanks for setting that up though :) Will be very helpful.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Simutranslator for other projects?
« Reply #9 on: January 20, 2009, 10:14:47 PM »
...
Is there a way to customise the additional text it outputs (the comments with authors etc. in?), so I could include the extra bits TileCutter needs for the translation automatically?
...

I must first write a basic export.

If that works, we see more.


for english

Code: [Select]
[setup]
name = English - language in english
name_translated = English - language in language
language_code = en
created_by = SimuTranslator
created_date = date
icon = tc_en.png
[/setup]


Is this corect?

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for other projects?
« Reply #10 on: January 20, 2009, 11:13:52 PM »
That looks perfect, yes. The [setup] section needs to be at the start of the file, any amount of comments can be added into the file at any point after that using "#" to indicate the start of a commented line.

Thanks!

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for other projects?
« Reply #11 on: January 29, 2010, 11:36:13 AM »
Bumping this old topic - I'm not sure if I already have a login for Simutranslator? If so I've forgotten my password, can I get it reset please?

I'd like to get TileCutter translation up and running. Not sure how far we got on this before.

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Simutranslator for TileCutter
« Reply #12 on: January 30, 2010, 05:29:10 PM »
One doubt about the strings available for translating. Why some of them have an ampersan in the middle of the word? for example E&xit

Another thing. Some of the strings are available but when you click on the link, Simutranslator says they don't exist. Some examples:
« Last Edit: January 30, 2010, 05:35:32 PM by vilvoh »

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for TileCutter
« Reply #13 on: January 30, 2010, 05:57:50 PM »
The ones with ampersands are for menu item keyboard shortcuts. The character after the Ampersand is the letter you click on to navigate to that item. E.g. when you press "Alt+F", to open the file menu, then x to exit.

Which items did you click on to get those errors? I deleted all the translation strings from the old import of the TileCutter objects, and the 26XXX IDs seem to be a lot older than the 39XXX ones for the working items. So it might just be that you're finding the old ones...

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Simutranslator for TileCutter
« Reply #14 on: January 30, 2010, 06:05:29 PM »
ttbrowseinputfile, ttinputpath, ttreloadinputfile and ttsamefileforall for example.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: Simutranslator for TileCutter
« Reply #15 on: January 30, 2010, 06:18:35 PM »
errors by new object import, an old problem in string comparison
or bugs by delete objects

not remove old objects befor new import

EDIT fixed
« Last Edit: January 30, 2010, 06:32:04 PM by Frank »

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for TileCutter
« Reply #16 on: January 30, 2010, 06:34:45 PM »
Ah, I thought it might've been something like that. I did try to delete the old objects before importing the new set but I guess I did something wrong.

Still, glad it's fixed :)

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Simutranslator for TileCutter
« Reply #17 on: January 30, 2010, 07:29:19 PM »
That's right. It's fixed and the ES translation is completed. (100%).. :::)

Offline phantom25

  • *
  • Posts: 36
Re: Simutranslator for TileCutter
« Reply #18 on: May 03, 2010, 09:00:59 PM »
I translated the GUI of TileCutter to Croatian (100%).

Tried downloading the translation, and modifying the header (only one line of comment is allowed, else some error appears at startup) and the translation seems to fit so far and it works.

It might eventually be reviewed by other Croatian translator (Simutranslator states that there are only 4 so far...) and eventually included in TileCutter.

Offline Ashley

  • Coder/Patcher
  • Devotees (Inactive)
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Simutranslator for TileCutter
« Reply #19 on: May 03, 2010, 09:01:47 PM »
Thanks phantom25, your translation will be included in the next release!