Patchman wrote:In principle, the best solution would probably be separate translation grfs. These would have to be loaded before the grf they're translating, and contain string definitions like "instead of the text for ID D402, use this", or possibly somehow set a flag that all strings defined by the file will override those from the given GRF file.
I'm open to suggestions for the specifications how this should work. One way would be an action D variable that's set to the GRFID of the grf we're overriding.
These translation files could also be automatically created by some program. I had something like this which still works for vehicle names, but that doesn't extend well to the newer features where text definitions are local to the grf file.
I just had a little chat with MiHaMiX about this and it should be possible to extend the web translator to also handle strings from grf files. The benefit for using it would be that it's easy to manage and we already got access to a lot of translators for a whole lot of languages.
Using one file for the grfset and another one for the translations will make the grf file work as a standalone (like now), while we make it easy to add new languages without actually touching the set itself (no reencoding needed).
The ideal solution would be if we make the web translator to encode the translation grf when it's done (or when a new language is done or something) and then upload it to a place where the grfset itself is available for download. That way people can download updated translations from the same location without having to download the set itself.
Now the question is how to get this to work. We need a code, that works on both TTDpatch and OpenTTD, with UTF-8 in mind (OpenTTD will eventually support this) and in a way so we can hopefully add it to all the grf sets out there, hopefully without too much work. We also need a way to tell the web translator what strings to translate. Either this can be done with extracting them from the grf file or somebody needs to write them in a text file and upload it. Also when it is right time to start translating a grf? Is it when it's done (might be a bit late) or when it's almost done or when it's new (with the risk that it will never be done and the translators waste time).
Clearly we got a lot to work out here, but I think we can get a good result from this. With good planning we should be able to get this to work
