FS#5823 - Update baseset translations atomatically via WebTranslator daemon

Attached to Project: OpenTTD
Opened by adf88 (adf88) - Tuesday, 03 December 2013, 12:13 GMT
Type Feature Request
Category Core
Status New
Assigned To No-one
Operating System All
Severity High
Priority Normal
Reported Version Version?
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


When some translator alters baseset translations (STR_BASE... strings) ./bin/baseset/*.ob* files become obsolete until someone gracefully updates them manually. For example, r25799 (WebTranslator) alters Ukrainian strings and r25813 (frosch) fixes .ob* files. This "desynch" is a real pain in the ass for patch makers/maintainers (especially with patch queues). If you are working with such a revision, compilation introduces changes which you don't want in your patch. So you have to watch out and not use certain revisions or revert changes to .ob* files after every compilation or exclude .ob* files from repo and reinclude them later.

Why not update .ob* files automatically? WebTranslator daemon can run strgen while committing changes. Sounds quite simple.
This task depends upon

Comment by adf88 (adf88) - Tuesday, 03 December 2013, 12:17 GMT
Not 'strgen', I meant 'translations.awk'. WebTranslator could run it.

Alternatively, maybe .ob* files should be generated in the same way like language files (by strgen)? Seems better...
Comment by frosch (frosch) - Tuesday, 03 December 2013, 16:38 GMT
You can run "configure --without-grfcodec". Then it won't generate those files.

Btw. the samme issue occurs when using differen grfcodec versions, which result in different openttd.grf. So, there is no ultimate fix for this, unless you require a lot of tools for generating stuff.
Comment by adf88 (adf88) - Tuesday, 03 December 2013, 19:28 GMT
But I won't be able to add new sprites too...

I believe there is a fix - include *.ob* generators (md5sum + translations.awk) into the WebTranslator daemon and commit altered *.ob* files along with src/lang/*.txt files.
Comment by adf88 (adf88) - Thursday, 05 December 2013, 09:46 GMT
Currently bin/lang/*.lng files have "ignored" status. Why not bin/baseset/*.ob* files too then? Would it be OK to change their status to "ignored"?
Comment by frosch (frosch) - Thursday, 05 December 2013, 18:43 GMT
Files can only be ignored, if they are generated during compilation.
Currently this is only the case for linux and if grfcodec is installed.
Someone started on a script for windows, but I do not remember the result.