# The KBabel Handbook

Matthias
Kiefer
2000-08-06
0.05.00

&kbabel; is an advanced and easy to use PO-file editor. It has a multi functional Catalog Manager, and many advanced features like searching in catalogs, text highlighting and it lets you customize many options.

KDE
KBabel
kbabel
kdesdk
gettext
translation
i18n
l10n

## Introduction

&kbabel; is an advanced and easy to use PO-file (gnu gettext message catalogs) editor. It has many features, that makes editing and managing your PO-files easy. This includes full navigation capabilities, extensive editing functionality, search functions, syntax checking and statistics function. Also included is a "Catalog Manager", a file manager view, which helps you to keep an overview over your PO-files. &kbabel; will help you to translate fast and also keep consistent translations.

With KDE project continous growing the number of PO messages is over 27000 at time writing this documentation. There is a need to stay organized and consistent along all translations. Consider using &kbabeldict; to help managing this huge number of messages and PO catalogs.

## Using KBabel

### Introduction

Usually, program messages and documentation is written in English. However since using a framework made from a set of tools and libraries it was posible to have favorite applications speaking your native non-English language. The adapting process to a specific language is named localization. This include translating program interface and documentation to various languages users need and make input and output conform to be correct with particular conventions in some countries or regions. &kbabel; is a tool which assist you in internationalization process which mean to make an application interface speak many languages.

Every internationalization aware program make available for translation one or more messages catalog files. Their extention is `.pot` and is an acronym: POT - Portable Object Template. Every translator take a POT file copy and begin translating messages. That, this file will became PO file - Portable Object and represent only one language. After translating process completing this text file (often it contain non-ASCII characters) is compiled into binary format, machine readable. It's like a database to minimize lookup for translated messages. This file have `.mo` extension and is named MO file - Machine Object.

There is a question in the air: Do I need to know how is inside a PO file? The answer is undoubtefully, yes. There are situations when a messages catalog became corrupt and must be manually fixed. Most of them are so hated CVS conflicts when translating process is coordinated by a concurent version system (see CVS documentation). &kbabel; can't help you very much on this but an text editor, CVS and PO-file knowledge. Let's see how a PO file is made. The principal concepts are msgid and msgstr markers which are continued by C-like strings (delimited by double quotes). Both groups begin with msgid and respectively msgstr. Msgid stand for English text in application user interface and msgstr stand for translated text. Empty lines and starting with number sign are ignored. Lines with number sign represent comments and are a good point to indicate from what file is the translatable English message or even aditional comments for translating made by application developers. &kbabel; display comment lines for every message. In many cases first msgid-msgstr pair in PO file is a fake entry (PO file header) which contain various informations about translated PO-file: application name, translating date, translator name and many more.

### The Editor

Here's a screenshot of &kbabel;. Main window is split in four panels. For convenience &kbabel; has toolbars to speed up many operations and for high working people there are many shortcuts. Upper left edit box is read-only and contains the current msgid field from the opened PO-file and it's english text. Bottom left edit box is msgstr field related and here you can edit the translated text. On top-right window part is comments panel where you can view comments added for current edited entry. It's covenient to find how entry is treated (c-formated or simple). In some cases you can read helpfull comments added by application developer who care about translators work and translating dificulties, for example where terms have different interpretation in application. Undoubtefully, translators need to have a very good general culture, but in some high tech programs comments seems to help very much. A good example is LyX Project which use TeX terminology. Another uses are when you need to know from what file current messages is because you want to report a spelling mistake in original English string. Screenshot of &kbabel;

Editor window Bottom-right part is the most sofisticated one. It's size can be adjusted with spliter line which border the space between it and comment panel. It is multifunctional and have two tabbed panels: search and context information. Contextual information tab contain a scrolled view which show the 4 precedent and 4 next entries according with current entry. It's as you may see a snapshot from edited PO file.What's this good? It's very common that when you translate many strings are related both in advance and back, so you may have a look if you have no clue how current entry can be best translated. Dialog interface translation is a good example or widgets have along with its asociated text and "what's this" quick help.

#### More KBabel features

Shortly, I would explain that a msgid entry can be in three states:

untranslated

  which obviously mean there's no translated text associated with msgstr

fuzzy

  `msgmerge` had tried to match better translated string looking in rest of PO-file entries. This does not work perfectly and you must edit the translated text to fit the current english text.

translated

  obvious this mean current msgid entry is translated.

The state of the current entry is indicated by two LEDs. Depending on your configuration, these can be in statusbar or above the translated string edit box. Both have customizable color to reflect your visual requirements or taste. Please read Preferences section to see how you can adjust these settings.

### The Catalog Manager

Screenshot of Catalog Manager

The Catalog Manager merges two directories into one tree and displays all PO- and POT-files in these directories. This way you can easily see if a new template has been added or removed. Also some informations of the files are displayed in the Catalog Manager: total number, number of fuzzy and number of untranslated entries, the last revision and the last translator of the file.

To make it easier for you to find files, that need work or that are missing, the status of the files is also displayed with an icon:

- The messages in this file are all translated.

- Some messages in this file are fuzzy or untranslated

- This file does not exists in the directory of the PO-files.

- This file contains syntax errors.

If an icon is marked with this icon , like , it indicates, that this file or directory does not exist in the directory of the POT-files.

You can mark or unmark a file by selecting Toggle Marking in the context menu of a file. If you want to toggle or remove all markings in a directory, press the right mouse button over this directory and select Toggle Markings or Remove Markings. The markings are automatically saved when leaving &kbabel;.

To open a file, double click on the file, or select it and press either Return or CtrlO , or select Open from the context menu.

You can configure the Catalog Manager either by clicking Configure... at the bottom or in section Catalog Manager of the preferences dialog. See section Preferences for more details.

## Dictionaries

&kbabel; come with 3 modes for searching translated PO strings: translation database, PO compendium an auxiliary PO file.

### Translation database

You can configure this searching mode by selecting Settings Configure Dictionary Translation Database in &kbabel; menu.

### Auxiliary PO file

This searching mode is based on matching the same original string (msgid) in an auxiliary PO file, translated in other language. It's very common that romanic languages have similar words. Same for anglosaxone and slavone ones. For example, I want to translate then word "on" in Romanian from `kdelibs.po`, but have no clue. I look in the same file for French and found "actif". In Spanish one I found "activado". So, I conclude that the best one in Romanian will be "activ". &kbabel; automate this task. Currently you can define only one auxiliary file to search.

You can configure this searching mode by selecting Settings Configure Dictionary PO Auxiliary in &kbabel; menu. In "Configure Dictionary PO Auxiliary" dialog you can select the path to auxiliary PO file. To automate PO file switching when you change current edited file, there are many variables delimited by "@" char which are replaced by appropriate values:

@PACKAGE@

  The name of currently translated application or package. For example can expand to: kbabel, kdelibs, konqueror etc.

@LANG@

  The language code. For example can expand to: de, ro, fr etc.

@DIRn@

  where "n" is a positive integer. This expand to the "n"-th directory counted from filename (right to left).

In editline is displayed the actual path to auxiliary PO file. While you best use provided variables in path, it's possible to choose an absolute, real path to an existing PO file. Let's take an example. I'm Romanian and I have some knowledge about French language and I work on KDE translation. First step is to download a very fresh `kde-i18n-fr.tar.bz2` from KDE FTP site or to use CVS system to put on my hard-disk a French translation tree. I do this on `/home/clau/cvs-cvs.kde.org/kde-i18n/fr`. My PO sources directory is in `/home/clau/cvs-cvs.kde.org/kde-i18n/ro`. Don't forget to select "PO Auxiliary" as default dictionary and check Automatically start search in Search tab from &kbabel; "Preferences" dialog.

### PO compendium searching

You can configure this searching mode by selecting Settings Configure Dictionary PO Compedium in &kbabel; menu.

## Preferences Dialog

You could show Preferences dialog by choosing Settings Configure KBabel... from &kbabel; menu. It uses a structured configuration dialog which makes it very easy to find every option without extensive search. The left side of the preferences dialog lists categories for customizable items and the right side shows the corresponding tab for the selected category. &kbabel; keeps changes if you move between categories, so, finally, when you're happy click the OK button. At any moment you can use quick help. Just click on the question mark on the title bar and, after the cursor changed like an arrow with a question mark, click on buttons, labels, entries to obtain more info on the specified item.

### Identity

This section allows you to set standard fields for every translated PO file. These are your name, email address, full language name, email address for your translation team mailing list. Also, there is even timezone to track last modified time for PO file. You can specify it as character sequence like EEST or offset from GMT time like +0200 (i.e. for Romania). This information is used when updating file header. You can find the options if and what fields in the header should be updated on section Save in Preferences dialog.

### Editor

The editor preferences category is divided in 3 subwindows: General, Appearance, Spell Check, and Fonts. All these settings customize how the editor behaves and looks.

#### General

Here is a set of checkboxes. First checkbox in upper side sets if fuzzy status is reseted automatically at first character input in MsgStr editor. When this option is disabled you have to manually choose Edit Unset Fuzzy Status or press the CtrlU shortcut. This means the string "`, fuzzy`" is removed from the entry's comment.

The downside checkboxes group are very usefull in assisting not for translation corectness, but for logical. Many messages represent menu items with keyboard accelerator and C-like formated strings.

Check Arguments

  When is checked C-format strings in original and translation are checked to find if number of format sequences is identical and also order.

Check Accelerator

  Check to find if number of accelerator characters is identical in both original and translated string. Please note that accelerator marker is &, but not in every programming toolkit. See Miscellaneous section below to find how to change keyboard accelerator.

Check Equation

  This is a feature for KDE project development. `.desktop` files are simply text files which store various parameters in `value=key` format. Some of these `key` are translatable. The only restriction is to maintain the left side of equality unchanged. Equation check allow you to spot many errors determined by fuzzy `msgmerge` algorithm. Note that are situations where this function generate false errors on some PO-files.

Look for Translated Context Info

  Some original messages are marked with context information to make them unique even they represent same word. This is because in the simple "Save" word is translated in many kinds in other languages. Context info is marked with `_:`. Many unexperienced translators do even context info translation and fill their PO-files with garbage. Check this box to make sure you will be warned about these errors in file.

Beep on error

  Your system bell will beep when you switch on entries with errors like those described above.

Change text color on error

  This is another type of warning about errors in current message. For persons deaf impaired or are bored by bell noise, here is a good solution. Check this. See also Appearance tab to know how to change text color on errors.

#### Appearance

These options let you configure the appearance for the message editor. In upper part there are 4 checkboxes:

Highlight syntax

  Setting this option will enable syntax highlighting for special characters, accelerators and text background in msgid viewer and msgstr editor. If don't have a monochrome display or have a visual impairment, you should enable this option.

Highlight background

  Background will be highlighted only for existing characters in msgid and msgstr. This includes spaces. That is useful, if you don't want to see surrounding quotes (see below) for the PO entry, you will still be able to observe starting and ending spaces in a text line.

Mark whitespaces with points

  When you feel the need to count spaces right from an eye or background highlighting is not your taste, then you can check this option to view whitespaces filled with points. Note that point is a point sign in the center of a character box, and not a decimal point.

Show surrounding quotes

  If you think that viewing terminal char in msgstr or msgids text line is better for you then check this option to view surrounding quotes for every text line. Same thing if your experience editing PO files with ordinary text editors make you feel safe if you can track starting and ending double quotes in PO entry lines.

For different items in edited text there are different color choices to make editing easy. Colors can be changed by clicking on color-picker buttons. From select color dialogs you can choose from standard colors, custom colors or just pick color from any part of your screen.

Background color

  This sets the background color for characters in MsgID view and MsgStr editor. For general background color of edit box you must use KDE Control Center.

Color for quoted characters

  Here you can adjust the color for escaped characters like (\") double quotes or (\n) newline.

Color for syntax errors

  This is the color for the entire text entry if errors are detected when you try to save PO file. Errors are triggered by not terminating identically both msgid and msgstr, or escaping characters incorrectly.

Color for c-format characters

  This sets the color for a characters sequence like in C language printf or scanf functions. In general these start with (%) percent char and are continued by one char.

Color for keyboard accelerators

  Keyboard accelerators start with (&) ampersand character in KDE but if you are translating for other projects there might be an different character marking the accelerator key. See Miscellaneous section below to find how to change keyboard accelerator.

The status for the current edited entry is marked by three LEDs. For your convenience you can choose where to put these LEDs: in statusbar or in editor (between msgid and msgstr entry). If have difficulties to view some colors or you want to make sure you can track LED status changes easily without moving your eye, you can select the prefered color using the color button chooser.

#### Spell Check

Here you can set your spell checking preferences. These is for interest if you have dictionary file for your translating language. Bellow are items to consider setting:

Create root/affix combinations not in dictionary

  For new words added to personal dictionary, spell check engine will create root/affix combinations to match more than one word (variations).

Consider run-together words as spelling errors

  If this is turned on, then joined words will be treated as errors. However, this situations is very usual in German language which have a very large number of compound words.

Dictionary

  From the popup list you can choose which dictionary to use. Note that you must install apropiate dictionary for your language. Check your ispell or aspell distribution to figure out if you have one.

Encoding

  Here you choose encoding for your text. This options is passed to spellchecker. It is encoding for your words dictionary. See kspell documentation for more details.

Client

  Backend program for spell checking. Currently are to: ispell (International Ispell) and aspell.

Remember ignored words

  Keep track of user ignored words when spell check PO-files. It's very convenient to ignore abbreviations or strange letter combinations you meet in GUI interfaces.

File to store ignored words

  Here you can set location of file for ignored words. Clicking on folder icon from editline right side you can choose path and name for ignored words file. Default is `$(HOME)/.kde/share/apps/kbabel/spellignores`, where `$(HOME)` is your home directory.

#### Fonts

This is a classic font chooser dialog with a little addition. You can select to view only fixed fonts by checking the Show only fixed fonts option. This is highly recomended for easy translating. The font dialog let you set font family, style, size and encoding. The bottom box shows a preview of the current for user convenience.

### Search

The search section allows you to customize various settings for searching in previous translated strings.

#### General

General settings are common for all search types. If you check Automatically start search option then search is automatically started whenever you switch to another entry in the editor. At the moment there are at three posibilies you can choose from. But since &kbabel; can use dictionary plugins the available dictionaries depends what is actually installed. With Settings Configure Dictionary ... you can configure every search engine plugin. The default installed dictionarys plugins are:

- KDE Database Search Engine: This new method is still in alpha stage of development and base it task on &kbabeldict; which acompany &kbabel;. See &kbabeldict; documentation for further info on configuring search engine.

- PO Compendium: The compendium is a normal PO file, which should contain a list of standard translation from your translation team. If you don't have one, you can also use a file that contains all used translations of your team (e.g. the `$lang.messages` file in the KDE Project, that can be found at i18n.kde.org).

- PO Auxiliary: The auxiliary should help you finding the context of a translation by looking up the same message in a message catalog of the same package but translated to another language. This way you can have a look how this message is translated in another language.

You can also start searching manually by choosing an entry in the popup menu that appears either when clicking at Dictionaries Search Text PO Compendium or keeping the search button in the toolbar pressed for a while.

### Save

This section allows you to edit the options for PO file saving. The first checkboxes group control general hehaviour for actions performed at PO-file saving command.

Update header when saving

  Check this button, to update the header information of the file everytime when it is saved. The header normally keeps information about the date and time the file was last updated,the last translator etc. You can choose which information you want to update from the Fields to update checkboxes area below. Fields that do not exist are added to the header. If you want to add additional fields to the header you can edit the header manually by choosing Edit Edit Header in the editor window.

Check syntax of file when saving

  Check this to automatically check syntax of file with `msgfmt --statistics` when saving a file. You will only get a message, if an error occured. You should keep this options enabled unless know what you're doing.

If you don't want to touch some fields in PO-file header or want to force updating specific fields, there are five checkboxes which control: revision date, PO-file language, text encoding, last translator name, charset. If a field does not exist, it is appended to the header. If you want to add other information to the header, you have to edit the header manually by choosing Edit Edit Header in the editor window. Deactivate Update header when saving above if you don't want to have the header updated.

For date and time of the header field PO-Revision-Date you can choose one from bellow formats:

- Default is the format normally used in PO-files.

- Local is the format specific to your country.

- Custom let you define your own format, where you can use the following C-like format strings:

  #### Year

  Format | Meaning | Range
  --- | --- | ---
  %y | year | 00 to 99
  %Y | year | 0001 to 9999

  #### Month

  Format | Meaning | Range
  --- | --- | ---
  %m | month of year | 01 to 12
  %f | month of year | 1 to 12
  %b,%h | month abbreviation | Jan to Dec

  #### Day

  Format | Meaning | Range
  --- | --- | ---
  %j | day of the year | 001 to 366
  %d | day of month | 01 to 31
  %e | day of month | 1 to 31
  %a | weekday abbreviation | Sun to Sat

  #### Hour

  Format | Meaning | Range
  --- | --- | ---
  %H | hour | 00 to 23
  %k | hour | 0 to 23
  %i | hour | 1 to 12
  %I | hour | 01 to 12
  %p |  | AM or PM

  #### Minute, Second, Timezone

  Format | Meaning | Range
  --- | --- | ---
  %M | minute | 00 to 59
  %S | second | 00 to 59
  %Z | timezone | (given in identity settings)

Downside part group encoding options for PO-file when saving. If you work on KDE project you should be aware that at least `desktop.po` file must be UTF-8 encoded. Popup list let you select messages encoding. At least your language setting and UTF-8 must be. If, for some reasons, you don't want accidentaly change current PO-file encoding, turn on Keep the encoding of the file.

### Catalog Manager

This section allows you to edit the options for the Catalog Manager.

#### General

Here are two editlines with Browse... buttons. Type in the directories which contains all your PO- and respectively POT-files. The files and the directories in these directories will then be merged into one tree in Catalog Manager window.

Below you can turn on and off if:

Open files in new window

  If this is activated all files that are opened from the Catalog Manager are opened in a new window.

Kill processes on exit

  If you check this &kbabel; tries to kill the processes, that are not exited already when program close by sending a kill signal to them.

  It's not guaranteed, that the processes are killed.

#### Directory Commands

Here you can insert commands you want to execute in directories from the Catalog Manager. The commands are then shown in the submenu Commands in the Catalog Manager's context menu.

Insert in field Name the name of the command. The name can be chosen freely and is only used to be displayed in the menu. In field Command insert the command, you want to have executed when selecting the corresponding menu item. Then press Add button to add the command to your available commands. To edit a command, select it, press Edit button and press Add after you have finished. To remove a command, select one from list and press Remove button. If you want different order in contexual submenu, you can use up and down buttons.

The command is executed through your default shell, so you can execute multiple commands at once by separating them with a semicolon, and you can set environment variables, if you need. The commands are executed in the (PO-file) directory, you have selected in the Catalog Manager.

The following strings will be replaced in a command:

- `@PACKAGE@`: The name of the directory without path

- `@PODIR@`: The name of the PO-directory with path

- `@POTDIR@`: The name of the template directory with path

E.g.: If you want to execute `make` and then `make install` you could insert in field Name `Make install` and in field Command `make; make install`. If you then select Commands Make install from the context menu of a directory, the commands listed above will be executed in this directory.

#### File Commands

Here you can insert the commands you want to execute on files from the Catalog Manager. The commands are then shown in the submenu Commands in the Catalog Manager's context menu.

Insert in field Name the name of the command. The name can be chosen freely and is only used to be displayed in the menu. In field Command insert the command, you want to have executed when selecting the corresponding menu item. Then press Add button to add the command to your available commands. To edit a command, select it, press Edit and press Add after you have finished. To remove a command, select one from list and press Remove button. If you want different order in contexual submenu, you can use up and down buttons.

The command is executed through your default shell, so you can execute multiple commands at once by separating them with a semicolon, and you can set environment variables, if you need. The commands are executed in the (PO-file) directory, in which the file, you have selected in the Catalog Manager, is.

The following strings will be replaced in a command:

- `@PACKAGE@`: The name of the file without path and extension

- `@POFILE@`: The name of the PO-file with path and extension

- `@POTFILE@`: The name of the corresponding template file with path and extension

- `@PODIR@`: The name of the directory, the PO-file is in, with path

- `@POTDIR@`: The name of the directory, the template file is in, with path

E.g.: If you want to merge the template file into your PO-file you could insert in field Name `Merge` and in field Command `msgmerge @POFILE@ @POTFILE@ > @PACKAGE@.new && mv @PACKAGE@.new "@PACKAGE@.po`. If you then select CommandsMerge from a file's context menu, the PO-file will be merged with its template file.

### Miscellaneous

Miscellaneous section hold settings which don't feet anywhere. Currently are two:

Marker for keyboard accelerator

  Here you can put your own character which serve as marker for keyboard accelerator indicator in GUI. By default it is & (ampersand), but in some programing toolkits it may vary. For example in Gnome/GTK translations the underscore character _ is the marker for the keyboard accelerator.

Regular expression for context information

  For unexperienced user "regular expression" sound strange. However, you're advised to change default value only you know what you are doing. Some GUI programming toolkits provide own context information description methods. Consult an experienced developer if you translate PO files other than KDE specifics. For the sake of completness I "translate" for you what default regular expression mean: "the text match if it start with _: and is followed by one or more characters and end with a newline".

## Command Reference

### The KBabel menu

#### The File Menu

CtrlO File Open

  Open PO-file. If current file is modified you will be prompted to save it first.

File Open Recent

  More used documents list menu is displayed, allowing you to open recently edited PO-files.

CtrlS File Save

  Saves current PO-file. If it's not modified no action is taken.

File Save As

  Save current PO-file under new name.

File New View

  Open a new window with current file loaded. Very useful if you have to translate large files and you need to keep an eye back to some strings.

File New Window

  Open a new empty window.

CtrlQ File Quit

  Quits KBabel

#### The Edit Menu

CtrlZ Edit Undo

  Undo last edit action in translation edit box.

CtrlShiftZ Edit Redo

  Redo last undoed edit action in translation edit box.

CtrlX Edit Cut

  Cut selected text and move it in clipboard.

CtrlC Edit Copy

  Copy selected in clipboard.

CtrlV Edit Paste

  Paste clipboard content at current cursor position in translation edit box.

Edit Select All

  Select all text from translation edit box.

CtrlF Edit Find...

  Open Find dialog for searching strings in current PO-file.

F3 Edit Find Next

  Find next occurrence of string from previous search action.

CtrlR Edit Replace...

  Open Replace dialog for searching and replacing strings in current PO-file.

CtrlSpace Edit Copy msgid to msgstr

  Original english string is copied below in translation edit box. This useful when you need to make from no adjustment to minor changes in original english text (msgstr).

CtrlAltSpace Edit Copy search result to msgstr

  String found after translation searching is copied in MsgStr edit box. This very useful if you don't want to work on retranslating same message again and again.

CtrlU Edit Unset Fuzzy Status

  Reset fuzzy status for all entries in current PO-file. You should not do this unless you know what you are doing. Probably this will let many strings bad translated.

Edit Edit Header...

  Edit PO-file header. Actually there are many header lines, which keep last translated date, translator name and email, language and translated text encoding etc.

#### The Go Menu

PgUp Go Previous

  Skip to previous entry in PO-file.

PgDown Go Next

  Skip to next entry in PO-file.

Go Go to...

  Open dialog to jump to specified entry number from PO-file.

Go First Entry

  Jump to first entry in PO-file.

Go Last Entry

  Jump to last entry in PO-file.

CtrlAltPgUp Go Previous fuzzy or untranslated

  Jump to first previous entry which is untranslated or marked as fuzzy.

CtrlAltPgDown Go Next fuzzy or untranslated

  Jump to first next entry which is untranslated or marked as fuzzy.

CtrlPgUp Go Previous fuzzy

  Jump to first previous fuzzy entry.

CtrlPgDown Go Next fuzzy

  Jump to first next fuzzy entry.

AltPgUp Go Previous untranslated

  Jump to first previous untranslated entry.

AltPgDown Go Next untranslated

  Jump to first next untranslated entry.

ShiftPgUp Go Previous error

  Jump to previous entry with error. It's likely to happen when you forget to escape doublequotes or original string end in "return" (\n) char and translated string don't (and vice versa).

ShiftPgDown Go Next error

  Jump to next entry with error. It's likely to happen when you forget to escape doublequotes or original string end in "return" (\n) char and translated string don't (and vice versa).

AltLeft Go Back

  Jump to last visited entry in PO-file.

AltRight Go Forward

  Jump to previous visited entry in PO-file.

#### The Dictionaries Menu

Note that this menu is dynamic. It depend on installed dictionaries plugins. By default are three.

Dictionaries Search Text KDE Database Search Engine

  Start searching translation for current original english message using KDE Database Search Engine.

Dictionaries Search Text PO Auxiliary

  Start searching translation for current original english message in PO file defined by user.

Dictionaries Search Text PO Compendium

  Start searching translation for current original english message in compendium file (made by merging all translated messages for one language).

Dictionaries Search Selected Text KDE Database Search Engine

  Start searching selected text using KDE Database Search Engine.

Dictionaries Search Selected Text PO Auxiliary

  Start searching selected text using file defined by user.

Dictionaries Search Selected Text PO Compendium

  Start searching selected text using compendium file with all language translated messages.

Dictionaries Edit Dictionary

  Allow you to edit content of current dictionary. Usefull if you found errors in dictionary and want to not be bored by errors when searching and replacing strings. (Not implemented yet)

#### The Tools Menu

Tools Spelling Spell check...

  Bring up spell check configuration dialog. After you select desired options hit OK and the normal spell checking dialog will appear.

Tools Spelling Check All...

  Start spell checking all words for opened PO file.

Tools Spelling Check From Curson Position...

  Start spell checking from current cursor position.

Tools Spelling Check Current...

  Spell check only current entry from PO-file.

Tools Spelling Check Marked Text...

  Spell check only selected text in MsgStr editbox.

CtrlT Tools Validation Check Syntax

  Check syntax for current PO-file. Errors may appear from CVS merging or users mistakes when translating process is made by hand.

CtrlD Tools Validation Check Arguments

  Check if number of arguments, types ans order is same in strings C-format like.

CtrlH Tools Validation Check Accelerators

  Check if number of accelerator characters is same both in original and translated text.

CtrlK Tools Validation Look for Translated Context Info

  Check if PO file contain context information translated by mistake.

CtrlJ Tools Validation Check Equations

  Check if left side from translated string is same with left side from original string. Sides are delimited by equal sign character.

Tools Catalog Manager...

  Open Catalog Manager window. Read Catalog Manager section for more details.

#### The Settings Menu

Settings Show Toolbar

  When checked, standard toolbar is displayed.

Settings Show Statusbar

  When checked, bottom statusbar is displayed.

Settings Show Navigationbar

  When checked, navigationbar is displayed.

Settings Show Comments

  When checked, upper right part of main window which contain current entry comments will be displayed.

Settings Show Tools

  When checked, bottom right part of main window which contain search results through dictionary will be displayed.

Settings Configure Key Bindings...

  Open configure dialog for keys bindings to actions. This will let you to customize default key bindings to suite your needs.

Settings Configure Toolbars...

  Standard toolbars configuration dialog will open. You can choose which actions will go in toolbars and what toolbar you customize.

Settings Configure Kbabel...

  All KBabel specific settings go here. Please read Preferences section for specific topics.

Settings Configure Dictionary KDE Database Search Engine

  Open dialog for KDE Database Search Engine configuration.

Settings Configure Dictionary PO Auxiliary

  Open dialog for PO auxiliary file configuration.

Settings Configure Dictionary PO Compendium

  Open dialog for PO compendium file configuration.

#### The Help Menu

F1 Help Contents

  Open the KBabel handbook. It's what you read now.

ShiftF1 Help What's This?

  Cursor change to arrow with question mark and you can click with it on various elements on main window. A quick help window will open.

Help Gettext Info

  Open the gettext manual page in KDE Help Center. This package of tools help in process of POT and PO files handling.

Help Report Bug...

  This will open KDE standard error reporting dialog. It's useful if you experience abnormal behavior of &kbabel;. &kbabel; developer will be glad to receive any comments, wishes and bug reports.

Help About KBabel...

  Open message box which inform you about KBabel's version, developer name and e-mail address.

Help About KDE...

  Open message box which inform you about KDE project, contact information and how you can report bugs and whishes.

Help About Dictionary KDE Database Search Engine

  Show up an message box with information about people who made KDE Database Search Engine.

Help About Dictionary PO Auxiliary

  Show up an message box with information about people who made searching in auxiliary file.

Help About Dictionary PO Compendium

  Show up an message box with information about people who made searching in compendium file.

### The KBabel toolbars

#### Standard Toolbar

Open

  Load PO-file in &kbabel; for editing.

Save

  Save current PO-file if it's modified.

Undo

  Undo last operation.

Redo

  Redo last operation.

Cut

  Cut selected text and move it in clipboard.

Copy

  Copy selected text in clipboard.

Paste

  Paste text from clipboard at current cursor position.

Find

  Find specified string in current PO-file.

Previous

  Skip to previous entry in PO-file.

Next

  Skip to next entry in PO-file.

Copy msgid to msgstr

  Copy original string to translated string edit box.

Search Translations

  Drop down toolbar for searching selected text using: KDE Database Search Engine, PO auxiliary file, PO compendium file and others dictionary plugins if available.

Stop

  Stop current searching in progress.

Catalog Manager

  Open Catalog Manager window.

#### Navigation Toolbar

Previous

  Skip to previous entry in PO-file.

Next

  Skip to next entry in PO-file.

First Entry

  Jump to first entry in PO-file.

Last Entry

  Jump to last entry in PO-file.

Previous fuzzy or untranslated

  Jump to previous fuzzy or untranslated entry in PO-file.

Next fuzzy or untranslated

  Jump to next fuzzy or untranslated entry in PO-file.

Previous fuzzy

  Jump to previous fuzzy entry in PO-file.

Next fuzzy

  Jump to next fuzzy entry in PO-file.

Previous untranslated

  Jump to previous untranslated entry in PO-file.

Next untranslated

  Jump to next untranslated entry in PO-file.

Previous error

  Jump to previous error in PO-file.

Next error

  Jump to next error in PO-file.

Back

  Jump to last visited entry in PO-file.

Forward

  Jump to previous visited entry in PO-file.

#### Status Bar

Current

  Current message in edited PO-file.

Total

  Total number of messages in PO-file.

Fuzzy

  Number of messages marked as fuzzy. They should be revised and translated if needed.

Untranslated

  Number of yet untranslated messages.

Editor status

  INS - insert, and OVR - overwrite. Same meaning like in every ordinary text editor.

PO-file status

  RO - read-only file, RW - read-write access on file. When file is read-only you cannot modify entries in editor.

Progress bar

  Usualy, this bar is hidden. It is displayed only when saving is done or you search messages in PO-file, compendium or else.

## Questions and Answers

Why does &kbabel; show question marks when entering language specific characters?

This is a problem with your locale settings. The following might help: Exit &kbabel;, in a shell set the environment variable "LANG" to a locale, valid for your language. If you use `bash` do `export LANG=<change this>`. For example, when you use german characters, do `export LANG=de_DE.88591`. Then start &kbabel; from this shell. If the problem is gone, insert this command in your `~/.profile`.

Why does &kbabel; show question marks instead of language specific characters after loading a po-file?

The text contains characters, which can not be displayed with your system font. If you are sure, that the text contains no such characters, the file might have been corrupted somehow. In this case, mark such a question mark and press CtrlF to find all the corrupted characters and replace them.

Do not search for real question marks, because these characters are only displayed as question marks, but internally they are different characters.

Otherwise you might want to install an unicode font, which contains all necessary characters.

## Glossary

### A

Auxiliary file

  is a &kbabel; specific issue. It is an option for user to setup one PO-file where searching is for original messages. That, if you're a member of French team and have some Spanish or Italian knowledge, you can grab and setup an auxiliary Spanish PO-file associated with your in-translation file. That, you can find yet unthinked synonimes.

### C

Compendium file

  is a collection of all translations for one language. This big PO-file is made by unique messages from all applications PO-files. It can be used to fill in all already translated strings into new yet untranslated or partially translated PO-file. &kbabel; use such file in PO Compendium search engine.

### F

Fuzzy

  This is a flag generated in general by `msgmerge`. It show that msgstr string might not be a correct translation. Translator must see and make modifications if string requires. After that fuzzy flag must be removed from message comment.

### I

Internationalization
i18n

  is the operation by which an application is made aware and able to support multiple languages. The internationalization word have 20 characters and is quite a long word. To short it, people started to write only the first and last characters and between them write the number of intermediate characters (18).

### L

Localization
l10n

  is the operation by which an application already internationalized is made to process input and output in a fashion desired by some cultural and language habits. The localization word have 12 characters and is a long word. For convenience, people started to write only the first and last characters and between them write the number of intermediate characters (10).

### M

MO file
MO

  MO means Machine Object and this file contain binary data suitable for reading by computers. MO-file content is organized as a database to minimize lookup time for translated strings. MO-files are obtained by compiling PO-files with `msgfmt`.

Message ID
msgid

  msgid is the keyword which introduce the original string in PO file. It is followed by C-like string that span on one or multiple lines.

Message String
msgstr

  msgstr is the keyword which introduce the translated string in PO file. It is followed by C-like string that span on one or multiple lines.

### P

PO file
PO

  PO means Portable Object and PO files contain sets of strings which associate each translatable string with its translation in a particular language. A single PO-file relate only to one language. PO-file is derived from an POT-file and is meant to be edited by humans.

POT file
POT

  POT means Portable Object Template. This file is build by extracting translatable strings from application source files. POT-file does not contain translations and is used by each translator as template.

## Credits and License

&kbabel;

Program copyright 1999-2000 Matthias Kiefer matthias.kiefer@gmx.de

Contributors:

- Thomas Diehl thd@kde.org

- Stephan Kulow coolo@kde.org

Documentation copyright 2000 Claudiu Costin claudiuc@geocities.com and Matthias Kiefer matthias.kiefer@gmx.de

This program is licensed under the terms of the GNU GPL.

## Installation

### How to obtain KBabel

&kbabel; is part of the KDE project http://www.kde.org. &kbabel; can be found in the `kdesdk` package on ftp://ftp.kde.org/pub/kde/, the main ftp site of the KDE project.

### Requirements

In order to successfully use &kbabel;, you need a current snapshot of KDE 2.x series.

All required libraries as well as &kbabel; itself can be found on ftp://ftp.kde.org/pub/kde/.

### Compilation and Installation

In order to compile and install &kbabel; on your system, type the following in the base directory of the `kdesdk` distribution:

    % ./configure
    % make
    % make install

Since &kbabel; uses autoconf and automake you should have not trouble compiling it. Along with &kbabel; you will have installed rest of tools from `kdesdk` package. Should you run into problems please report them to the author Matthias Kiefer matthias.kiefer@gmx.de