News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Automatic uploading of translation texts to Simutranslator?

Started by jamespetts, November 28, 2016, 01:27:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

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.

prissi

No there is not, at least not straight forward. But you can use of course wget/curl to log in and upload stuff.

jamespetts

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.

Ters

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.

Frank

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.

jamespetts

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.

Frank

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 )

jamespetts

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.

prissi

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.

jamespetts

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.