Author Topic: Automatic uploading of translation texts to Simutranslator?  (Read 1148 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15685
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Automatic uploading of translation texts to Simutranslator?
« on: November 28, 2016, 01:27:47 AM »
May I ask whether there is any way of automatically uploading the latest set of translation texts both for pakset and code to Simutranslator? I am in the process of setting up nightly builds, and it would be helpful, I think, if there were a way of uploading any new strings that need to be translated automatically every day.

I know that there is a way of automating the download of such strings, but is there any way of automating their upload? This would make the translation part of the development of Simutrans-Experimental much easier.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8795
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Automatic uploading of translation texts to Simutranslator?
« Reply #1 on: November 28, 2016, 08:58:05 PM »
No there is not, at least not straight forward. But you can use of course wget/curl to log in and upload stuff.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15685
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Automatic uploading of translation texts to Simutranslator?
« Reply #2 on: November 29, 2016, 09:20:46 PM »
That is rather a shame. I suppose that it would be a non-trivial job for Frank to implement a command-line interface for Simutranslator?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4806
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: Automatic uploading of translation texts to Simutranslator?
« Reply #3 on: November 30, 2016, 06:58:58 AM »
I think that kind of job would be more suitable for Simutrans developers, than web site developers. Any script kiddie could possibly throw together a shell script that automates one particular operation with wget/curl, but I would consider that a bit too simplistic to be called a "command-line interface", although it could get the job done, if it is just one kind of job.

Offline Frank

Re: Automatic uploading of translation texts to Simutranslator?
« Reply #4 on: November 30, 2016, 03:01:23 PM »
Previously, there was a file upload for the translations.

But because of big problems in the recognition of the character sets I have removed this.

However, you can copy the contents of an xx.tab into a form ( Upload Texts ) and import it completely.
For this you need about 5 minutes and max 10 clicks for a language.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15685
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Automatic uploading of translation texts to Simutranslator?
« Reply #5 on: November 30, 2016, 08:20:41 PM »
Thank you for clarifying the position.

May I ask - does this apply only to base texts or also the pakset? In particular, does it mean that one needs to copy the contents of every single .dat file into a web form one by one? The trouble is that there are many hundreds of these, so it would be impossible to do this within any reasonable time. If it is still possible to upload .dat or .zip files, this should not be so much of an issue.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Frank

Re: Automatic uploading of translation texts to Simutranslator?
« Reply #6 on: November 30, 2016, 09:08:45 PM »
I think we misunderstand ourselves.

Is it now about the upload of objects (dat files) or the translations ([language] .tab)?

for objects upload zip files = yes

for translations, copy the content of the [language].tab into the form ( not for help files )

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15685
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Automatic uploading of translation texts to Simutranslator?
« Reply #7 on: November 30, 2016, 09:11:48 PM »
I see; my apologies for the confusion. I was referring indeed to objects. Is there any way of uploading objects by a command line interface, do you know?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8795
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Automatic uploading of translation texts to Simutranslator?
« Reply #8 on: November 30, 2016, 09:48:13 PM »
As said, it should be about two lines with curl. On the commandline, with a little more effort than get_lang_file.sh but comparable. (The only difference is that on has to make the logon beforehand).

On the other hand, making objects and dat files is so much more work than a weekly upload.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15685
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Automatic uploading of translation texts to Simutranslator?
« Reply #9 on: November 30, 2016, 10:06:06 PM »
Thank you - I will look into that. As to the amount of effort, what I am after is a way of minimising the number of things that I have to remember to do regularly, as that takes effort entirely disproportionate to the amount of effort actually required to do the upload (etc.).

Incidentally, are there any special techniques necessary to deal with the login?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.