Anyone can translate pgAdmin into his or her mother tongue - you do not need to be a programmer. We try to make sure that all strings could be translated, even into non-European and non-Asian languages. The required steps for translation are as follows:
- Subscribe to the pgadmin-hackers mailing list and declare yourself as a translator by sending an email to the list. Upon receipt of your email, we will add you to the translator list and make sure two translators do not work at the same time on the same language.
Usually, we prefer native speakers translate into their mother tongue. In the case of non-European and non-Asian languages, we have no special requirements.
- Download poEdit and install it under MS Windows or GNU/Linux.
poEdit is our recommended choice, as it makes it very easy to maintain your translation. A Windows installer is available on the poEdit web site. Alternatively, you may also run Kbabel which can be found in many popular Linux distributions.
- Send us the English and translated names of your language: 'French' and 'Français', 'German' and 'Deutsch', etc. This will allow us to modify pgAdmin's i18n/pgadmin3.lng file to display the language properly in the application. We will also create a directory according to your locale canonical name under /usr/share/pgadmin3/i18n (Linux and other Unixes) or C:\Program Files\pgAdmin III\X.Y\i18n (Windows). The list of language codes can be found on the Debian site. You may also want to check the more detailed ISO 639.2 Codes for the Representation of Names of Languages.
- When this is done, you will receive an email. Browse to the translation status page and download the *.po file corresponding to your language. The pgadmin3.pot file serves as empty template for a new language source file.
- Edit the *.po file. The steps described are related to poEdit only.
- As a first step, please edit the file properties (Catalog/Settings). Select correct language and country, and set the charset to utf-8. The project name is pgadmin3, team is The pgAdmin Development Team, and the email address should be email@example.com.
- Check the Automatically compile .mo file on save option in Properties.
- Enter your translation strings.
- Please refer to the translation guidelines below to translate variables (%s and %d) and keyboard shortcuts entries (&).
- Compile pgadmin3.po into a pgadmin3.mo binary file.
- Review your translation carefully:
You should be able to add the appropriate i18n/language_Country/pgadmin3.mo file under an existing binary installation of pgAdmin. Then, just select the language under the File -> Options menu. The review is an important step because some strings do not have a real context when viewed in the editor. You will only be able to correct entries by using pgAdmin yourself.
You can also use the translation debug mode of pgAdmin (command line option -t) to review your translation in all dialogues. You won't need a database connection in that mode, but all dialogue resource files (*.xrc) are required, copied to the ui directory. If you compiled in debug mode, this will be the case automatically.
- When the translation is finished and reviewed, send the pgadmin3.po and pgadmin3.mo files to Guillaume Lelarge after zipping/taring them. We will do our best to publish your files immediately.
- From time to time, new strings which need translation are added to the application. Download/update the new pgadmin3.pot and merge the new file with your language file using the poEdit Catalog/Update from POT file function. Alternatively, you can run the following command manually:
msgmerge --update pgadmin3.po pgadmin3.pot
- There are more texts that can be translated. In the docs directory, the file tips.txt contains tips that are displayed on pgAdmin startup. The HTML files used by the Guru to notify users of special issues are located in the docs/hints directory. Both tips.txt and the Guru Hint HTML files are translated without tools, just use your favourite text editor.
- The pgadmin3.pot template file contains many SQL keywords (like 'ACL', 'AFTER', 'ANALYSE', etc.) which should not be translated. Some translators pointed out this issue, which cannot be fixed at present. Here is a short explanation: The pgadmin3.pot template file is generated by the stringextract script, which extracts text from XRC dialogues using a wxWidgets utility called 'wxrc'. The problem stems from wxrc, which extracts all text entries in dialogues even SQL entries which should not be translated.
To make it easier, all SQL keywords are written in capital letters. Conversely, all capital letters entries are SQL keywords.
Therefore, never translate entries written in upper-case letters. In some cases you might even break pgAdmin if you do! To reach a 100% translation status, just copy these strings using the poEdit Alt+C Copy command. For example: translate ACL into ACL, AFTER into AFTER, etc.
- Stick as much as possible to words which are close to the original SQL syntax. For example, in French, you may use vue for view because both words start with the letter 'v'. Do not choose distant words like déclencheur for trigger, because some users may not be able to make a good use of the SQL syntax. Sometimes it is better to simply leave these keywords untranslated, instead of creating a fancy word nobody will recognise. Otherwise, users may switch to the English version.
- Some messages include %s or %d variables placeholders. During execution, %s will be replaced by a string and %d by a decimal number. Please take special care to include all %s and %d variable placeholders correctly, otherwise pgAdmin may crash. On some occasions, it might be necessary to reorder placeholders. In the following (ficticious) example, both parameter positions are exchanged: Server %s user %s is logged in could be translated as L'utilisateur s%2$s est connecté au serveur %1$s.
- Keyboard shortcuts are denoted by a leading '&'. For example '&Add', which is translated into French by '&Ajouter', can be triggered from keyboard using Alt + A. Be careful when changing letters, to avoid keyboard entry conflicts within one menu. If you deviate from the original shortcut keys, pgAdmin users might have problems remembering shortcuts in both English and translated pgAdmin versions. Therefore, be extra careful when creating new shortcuts if you cannot choose the same letter.
- Menu strings also contain hard coded shortcuts (Ctrl-X) or function keys (F5). These can be identified by a preceding \t (tab). If appropriate, the modifier key name may be translated (Ctrl-), but the key combination must remain the same in all cases because the behaviour is hardcoded in the pgAdmin source.
- Most forms are not designed with resizing capabilities, because not only is this quite hard work but most dialogue contents aren't sizeable in a meaningful way anyway. The only resizing property dialogues are the function, view and rule property windows. Therefore, you may need to shrink the translated text to the English size. In general, we tried to leave enough space for translation texts, but if you believe there are certain places we should spend more space please let us know.