The K Desktop Environment

3.3. Step by Step: The Translation of POTs and POs

General material on the subject can be found in the Info pages for the gettext package. In KDE practice, the handling of POTs and POs looks like this:

So, for example starting with:

   #: kedit.cpp:90 kedit.cpp:1071
   msgid "Show &Status Bar" 
   msgstr ""

you would translate it to the following (assuming you were translating it to German):

   #: kedit.cpp:90 kedit.cpp:1071
   msgid "Show &Status Bar" 
   msgstr "&Statusleiste anzeigen"

And from the incorrect:

   #: ReniceDlg.cpp:31 
   #, fuzzy 
   msgid "Renice Process" 
   msgstr "Laufende Prozesse"

...you would go to the correct translation:

   #: ReniceDlg.cpp:31 
   msgid "Renice Process" 
   msgstr "Neue Prozesspriorität"

Then there's a subtle error which occurs especially often in the transition from KDE 1.x to KDE "next generation":

   #: kpackage.cpp:613
   #, fuzzy, c-format
   msgid "Unknown package type: %1"
   msgstr "Unbekannter Pakettyp: %s"

(The translation is correct but the string of the variable has an obsolete format.)

   has to be changed to:
   #: kpackage.cpp:613
   c-format
   msgid "Unknown package type: %1"
   msgstr "Unbekannter Pakettyp: %1" 

After the corrections have been done you need to delete the "fuzzy" tag. Otherwise, the corrected string will just be ignored during compilation.

Finally there might be lines at the end of the file beginning with "#~" like this:

       #~ msgid "Where do you want to go tomorrow?" 
       #~ msgstr "Where do you want to go tomorrow?" 
       #~ msgid "No comment available" 
       #~ msgstr "Keine Erklärung verfügbar" 

These lines have been commented out, usually because they are no longer used by the program and should be deleted from time to time in the interest of disk space, bandwidth, and your and future translators' sanity :-)

For any other questions on this topic you are once more advised to look at the Info pages for the GNU gettext package (see the KDE online help).