Language
This is a small but really rather clever perl script (written by John Knottenbelt - our Linux guru) to allow us to translate Uplink into any language we chose. It's still quite an involved process, since Uplink was never designed with this in mind. Using this script will make life a lot easier for you. It's worth pointing you at paragraph 2.4 in the license agreement, which states "Without the express written permission of Introversion, you will not distribute in any format any non-English version of Uplink." What this means is that if you translated the game into (say) French, you wouldn't be able to distribute it without our written permission. We want you to go ahead and translate into other languages though - so please go ahead - just keep in mind you can't distribute them yourself. If you do manage to finish a language translation that you think Introversion would be interested in (pretty much any language other than English/Russian/German) then get in contact with us and we'll work out a deal. If you've done the translation work then we'll be happy to cut you in on the profits.
The basic process behind the script is this.
We've already provided a strings.txt file with every in-game string from version 1.31 of Uplink (the very latest). We recommend you start with this, as many strings are already marked as debug messages which don't need translating. Move the strings.txt file into your source directory next to translate.pl to use the existing strings. In strings.txt you will see entries like this: en*: "Finished saving %s\n" The 'en*' at the front indicates it's in English, and the '*' indicates it _doesn't_ need translating because it's a debug message. You'll also see entries like this: en: "Multiple
Uplink Agent murders reported" The first line starts with 'en' which indicates it's an English string that needs translation. The next line is a German translation of that line. We've left the German strings in the file as an example. You can actually have as many different translations in the strings.txt file as you wish, so long as each starts with a different 2 letter country code, such as 'en' or 'gr' or 'ru'. Each translation "block" consists of an English string, followed by any number of other-language translations, followed by a blank line. Whenever you add new strings to the game, or change existing ones, you can re-extract the strings using the command perl translate.pl --prune This will go through all the source files recursively and will add in any new strings needed, and remove any unused ones. It will put all the strings into a new file called strings-pruned.txt. The original strings.txt is unmodified. If you want to generate an entirely new strings.txt file, you should first create an empty strings.txt file. Then run the command "perl translate.pl --prune". This will put all the strings into the new file strings-pruned.txt. Keep in mind that you will have lost all of the 'en*' signs that signify a string doesn't need translating. Once you've translated all the strings marked as 'en' (there are many thousands unfortunately) you can re-integrate them like this: perl translate.pl --lang=gr This will take all the translations that start with 'gr' (insert your own country code here) and put them into the source files. The translated files will have the same filename, but with -trans on the end. For example uplink.cpp will be translated to uplink-trans.cpp. You can then build those trans files to get the new language.
|