From PostgreSQL wiki
PostgreSQL National Language Support
This page contains some information about the PostgreSQL National Language Support effort. Please read the information about NLS in the PostgreSQL Documentation for background and technical information. Some of the information on this page may eventually be migrated there as it stabilizes. There's also the GNU Gettext Manual, which is only partially relevant for us, but it might be good to look at anyway.
The status tables shows which areas of the PostgreSQL source are prepared for translation, and the progress of those translations. There you can also download freshly baked PO files that are merged up against the latest program sources. No PostgreSQL source tree is needed for translation work.
If you have any questions about the PostgreSQL translation project, including
- you want to start a new translation or continue an existing one and you want to avoid duplicating your work with someone else,
- you're looking for other people who want to work with you on translating,
- you're having technical questions about tools, the source tree, the meaning of terms, etc.,
You can peruse the archive of pgsql-translators.
Here is how to get set up for translation work. It is assumed here that you already know your way around gettext message catalogs. If you're new to this, read the chapter on NLS in the PostgreSQL Documentation.
- To continue an existing translation, download a new PO file by following the links in the status tables. Fill in the file as much as you want.
- To start a new translation, download a POT file by clicking on one of the catalog names in the left column of the status tables. First, fill in all the fields in the header and remove the fuzzy flag. Particularly, the character set information is very important and must not be left out! Then fill in the rest of the file as much as you want.
- When you are done editing, check the file for errors. If you're using the Emacs PO mode, press V. From the command line, run
msgfmt -o /dev/null -v -c yourfile.po. Or copy the file into the main PostgreSQL source tree and run
gmake maintainer-check-po. If you don't do this, your file might contain bugs that cause program crashes, which will quickly disenchant users from PostgreSQL and internationalized software in general.
- Submit the resulting file to the Patch Tracker. Please do not send patches; send the whole file. If you're concerned that the file is too big, run it through a compression program. If you are sending many files, put them into a tar archive. Please don't open a ticket per file, or create many attachments. Both of these rules make it easier for the person installing your files. One of the registered developers will install your file into the source code repository. Make sure you specify which branch your file is for (see below about branches). People who have contributed for a while will be registered as developers and are able to commit their files into the source code repository by themselves.
Please don't edit the PO files with a plain text editor. You're making your life unnecessarily hard. There are several tools that make editing PO files really easy.
- GNU Emacs and XEmacs have PO editing modes.
- KBabel is for those who like KDE-based tools.
- Poedit is yet another tool, which even works under Windows
If you are new, please check on the status tables whether your language is already being worked on. If so, look into the translation files near the top to find out where to contact the last translator or the translation team. Please contact them about contributing. If the last translator cannot be reached or if it has been a long time since the last update to the file, you can just take over. But remember that communicating first avoids duplicate work later.
Check out the home of the GNU Translation Project. There you can find out about mailing lists, web sites, and other resources for translation efforts to your language. Some of these resources are GNU-oriented, but others are not.
There is a git repository with the current status of the translations.
You can work in several branches. There is a current branch and several back branches.
The back branches belong to past releases of PostgreSQL. It is usually a good idea to finish translations for the recent back branches first, because those are the ones that people currently use. When a new back branch release is made (something like 8.0.5 or 8.1.1), updated translations will be included.
By contrast, the current branch is often under heavy development, meaning that error messages change, and translation work done today might become obsolete tomorrow. Therefore, translations in the current branch should normally only be done during the beta phase or after a release if no new branch for the development release has been made yet. (The status page informs about the status of the branches.)
A PO file must have at least 80% of its strings translated before it is considered for inclusion in a PostgreSQL major release. This is to prevent presenting users with a strange mix of English and non-English messages. This criterion will be regularly evaluated in the time before a major release, in particular during the beta phase. Files that do not meet this criterion will not be included or removed if they have previously been included.
If a file drops below the threshold after the major release during the maintenance period of a branch, it will not be removed because of that.
This is a new policy as of April 2009; we will see how it goes.