The International Simutrans Forum

Development => Translation and Help Texts => Topic started by: jamespetts on November 28, 2016, 01:27:47 AM

Title: Automatic uploading of translation texts to Simutranslator?
Post by: jamespetts 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.
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: prissi 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.
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: jamespetts 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?
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: Ters 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.
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: Frank 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.
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: jamespetts 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.
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: Frank 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 )
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: jamespetts 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?
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: prissi 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.
Title: Re: Automatic uploading of translation texts to Simutranslator?
Post by: jamespetts 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?