You can help development by contributing translated texts. The gettext system is not used in Tux Commander, though it would be certainly beneficent for translators if it was. Volunteers for porting are welcome, I myself would like to focus on other, more important areas. Porting to gettext won't be easy, not sure if it's possible to easily automate strings extraction from Pascal sources.
Strings are located in files with the naming scheme UTranslation_XX.pas
where XX stands for locale abbreviation. Each language has its own file, standard Pascal unit file, full of string constants. The main disadvantage is the requirement to compile the application if you want to test the translation. However this solution brings the benefit of independency on additional files or external libraries. Locale strings are updated in every stable version, development snapshots may contain English texts. These versions are under development and things may change before releasing stable version.
The best way to start is to grab latest translation file from the GIT repository (see below), either the English translation file (UTranslation_EN.pas)
when making new translation or an existing translation, if you plan to take over the maintainership (check the Description page
for list of translations and their statuses). Open the translation file and change all "EN" abbreviations to your new locale abbreviation (including all constants with LANGen
prefix). You need to use UTF-8 compliant text editor (gedit, katoob, ...) and save the file in UTF-8 encoding - this is mandatory! If you want to compile tuxcmd to test your translation, you need to add your unit name into a ULocale.pas
file - find the line starting with uses
and add your new unit. If you don't want to test the translation yourself, send me the file by e-mail, I will check it and will send you a compiled snapshot with your translation.
You may find strings containing underscore
characters, which represent keyboard shortcuts. There's no need to keep shortcuts on the same letter as English source, feel free to change them. Only beware of duplicates in the same submenu or a dialog.
Sometimes a particular translation can be longer than 255 characters (Pascal string constant limit) and sources won't compile. As a workaround, split the constant into several pieces, concatenated by a plus sign.
const x = 'First sentence.' + ' Second sentence.';
To prevent potential encoding issues caused by mail agents, I'd strongly advise to send packed translations (simply do
and you are fine).
If you are building Tux Commander yourself, use the enclosed Makefile. The only prerequisite is working FreePascal compiler. Further instructions can be found in the 'INSTALL' file.
Please always use latest version of FreePascal compiler, older versions than 2.2.2 contain various bugs, such as the annoying thread limit (0009016: Create Thread Limit
Similarly, to compile on PowerPC platforms, you need either patched fpc-2.2.4 or any later release. Releases up to fpc-2.2.4 pass wrong arguments on PPC platforms (0013123: Lazarus crash during startup
List of make targets:
tuxcmd - compile the application with optimizations [default]
debug - compile with debugging symbols
final_debug - compile with debugging symbols and optimizations, useful for package maintainers
modules - make all VFS modules
install - this will copy all files to the correct paths in the specified prefix
uninstall - safe uninstall
clean - clean all compiled files