How to translate Gestinux
This page explains how to translate Gestinux without knowing much about Pascal or other programming languages or the Lazarus IDE.
We ask that you translate only into your native language. Ideally, you should understand French because Gestinux was originally written in French.
- 1 Where do you start translating, and what should you then move on to translate thereafter?
- 2 Translating the software
- 3 Providing translation data
- 4 Translating the documentation
Where do you start translating, and what should you then move on to translate thereafter?
You should start to translate the software itself, before starting to translate any documentation.
The translated software will be used to create a set of test data and make fresh screenshots showing the newly translated language.
Then you can gradually translate the documentation.
Translating the software
The following paragraphs cover the various steps involved in completing your translation task.
You can consult the internal translation mechanism for more information.
The code for your language
Before starting a new translation, you must discover what code applies to the language you are translating.
Languages are identified in accordance with standard POSIX codes, which all have the double xx_YY format.
The lowercase xx part of the code identifies the primary language, according to the ISO-639-1 standard. The uppercase YY part identifies any possible language variant (usually with a country code), according to the ISO-3166-1 standard.
You should use the referenced ISO codes. If you invent a new code, the risk is that they may be formalized differently later.
Language code examples:
- Fr_FR: French "from France"
- Fr_CA: Quebec
- En_US: English (United States of America)
- Sv_SE: Swedish "from Sweden"
If you are in any doubt, ask for confirmation on the forum.
The source file to translate
Gestinux read translations in two "text file" : xx_YY.ini and xx_YY_util.ini
In general, these files are installed in folders named languages and util/languages at the same level as the executable Gestinux. However, to comply with Debian Linux rules (including Ubuntu), the files for these distributions are in /usr/share/gestinux/languages
These files are installed there read-only. Do not attempt to modify or set them read-write at this location. If you want to improve an existing (perhaps partial) translation, you should copy that file to your personal documents or else, if you can use svn, get all the sources (svn checkout) and open the files in the local copy.
For a new language, create a new file within your personal documents. The first three lines must read:
[General] LanguageCode =xx_YY LanguageName =name of language (in this language)
If you are using svn, save the translation files in the folders trunk/languages and trunk/util/languages and add them (svn add and svn commit). Always lock them (svn lock) to prevent anyone else editing the same file simultaneously.
The file encoding must be UTF-8.
Otherwise explain what you are doing on the forum and attach the file to your message translation. Other developers will use svn for you. In either case, use the forum to communicate with the other developers.
From the Gestinux menu choose Settings Languages tab and Add a translation:
- The language reference is necessarily one of the languages installed with gestinux. It will be your source. If possible, choose French, since the English pages are currently not complete.
- Find your translation file (created as described in the previous section) by clicking the selection button.
- Check the box "Use translation" for translations of this file to be used. Otherwise the reference language will be used.
in version 1.2 there are 2 language files, one for the main application, and another for utilities common to several applications, so the windows is slightly different.
Entering a new translation
You can translate globally by clicking the Translate button. In this case, you will have a list (to the left) of the various application windows, as well as some sections unrelated to a window. Global translation is required for sections that do not correspond to a window, and to check you have not overlooked any section. You can use the Next Missing button to find the first missing translation.
It is also possible to press CTRL+F4 from any application window to view and translate the section corresponding to that window. In this case, you will see only that window listed at the left. This method has the advantage that once the translation you can use the F4 key to toggle between viewing the base language and your language translation (and vice versa).
Anyway, for the selected section, a list of key translation is displayed. The reference translation (which cannot be changed) is displayed below, and you can enter or edit the translation in your language. Registration is automatic when you change key.
The symbol <CR> skips a line, and should be used for messages.
Installing new translations
If possible, get another native speaker to read and check your work. Once the translation is complete, commit the file with svn or ask via the forum for another developer to do this for you.
If you contribute a commonly used language, your translation will be added to the next version of Gestinux.
If you contribute a rare language translation, or you don't want to wait for the next Gestinux version, it is possible to make a package that includes an additional language for various target systems (Windows, Debian, ...). You can figure out how to do this yourself or ask a developer.
When you run it for the first time on a workstation, Gestinux tries to activate the correct translation automatically, depending on the computer's language. Unfortunately, Windows does not know the POSIX language codes, and there are cases where this is not automatic. A slight software modification is required that can be obtained from the developers. This problem does not exist on Linux systems.
Providing translation data
A country list has to be created for each language available in Gestinux. This is contained in the xx_YY_countries.txt file that Gestinux loads automatically when its database is created (or audited) provided that you have earlier selected the appropriate language.
It is also helpful if you can create test cases in the language translated for the country (or countries) that use that language. You can export the database so that it can be hosted on gestinux.net and so become accessible to anyone worldwide.
If your country has state-specific reports these can also be integrated into the software. If you do not know how make a Customized report, ask a developer on the forum, sending examples.
Translating the documentation
Having translated the program software (or possibly before) it will also be helpful if you can translate the documentation (which is in the form of a wiki).
Currently there are about 100 pages to translate, but some are more important than others.
See how to create or edit pages of this wiki.
There is a way to list the remaining untranslated pages (or those whose original has been modified after translation). For now, this method is not available online, so if you would value this facility, ask on the forum.