KBabel global settings
Prev
Next

KBabel global settings

To show the Preferences dialog choose Settings->Configure KBabel... from KBabel's menu. It uses a structured configuration dialog which makes it very easy to find an option without having to perform an extensive search for it.

Edit

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


Dialog Edit General

This section contains a set of checkboxes.

The first checkbox in the upper side sets if the fuzzy status is reset automatically when a character is inputted into the MsgStr editor. When this option is disabled you have to manually choose Edit->Unset Fuzzy Status or use the Ctrl+U shortcut. Note that this means the string , fuzzy is removed from the entry's comment.

Next option allows you to enable “clever” editing, where editor automatically inserts special characters escaped correctly, for example, \t after pressing Tab and it allows special handling of Enter.

The lower checkboxes are very useful in assisting, not for the correctness of the translation, but if the translated string is a suitable replacement for the original. For example, many messages represent menu items with keyboard accelerator and C-like formatted strings whose structure must remain intact once translated.

Check Arguments

When this option is selected, C-format strings in the original and the translation are checked to ensure the number of format sequences and the order are consistent.

Check Accelerator

When this option is selected, KBabel checks if the number accelerator characters is identical in both the original and the translated string. Note that accelerator marker is & (but not in every programming toolkit). See the Miscellaneous section below to find how to change a keyboard accelerator.

Check Equation

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

Look for Translated Context Info

Some original messages are marked with context information to mark them as being unique even if they represent same word. This is because many simple words, such as “Save”, are translated into many languages. Context information is marked with _:. Many unexperienced translators translate the context information and fill their PO files with garbage. Check this box to make sure you will be warned about these errors in a file.

Check Plural Forms

If you are translating KDE project, it uses a special kind of syntax for specifying plural forms of messages. This check automatically counts the number of forms in msgstr and compares it with the number specified in Identity tab. Incorrect number of plural forms can result in crash of an application.

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. It is a good solution for those who are hearing impaired or dislike bell noise. See also the Appearance tab to find out how to change the text color on errors.

Appearance


Dialog Edit 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 the msgid viewer and msgstr editor. If don't have a monochrome display or have a visual impairment, you should enable this option.

Highlight background

The background will be highlighted only for existing characters in the msgid and msgstr. This includes spaces. This is useful if you don't want to see the surrounding quotes (see below) for the PO entry, and 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 and background highlighting is not your taste then you can check this option to have a point sign drawn in the middle of whitespace characters. Note that the point is a point sign in the center of a character box and is not a decimal point.

Show surrounding quotes

If you think that viewing the terminal characters in msgstr or msgid's text line is better for you then check this option to view the surrounding quotes for every text line.

If you are experienced editing PO files with ordinary text editors you may feel safer if you can track starting and ending double quotes in PO entry lines.

For the 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 the 'select color' dialogs you can choose from standard colors, custom colors or just pick a color from any part of your screen.

Background color

This sets the background color for characters in the MsgID view and the MsgStr editor. To change the general background color of edit boxes you must use the TDE 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—either on the statusbar or in the editor section (between the msgid and msgstr entry). If have difficulties viewing some colors or you want to be able to track LED status changes easily without moving your eye you can select the preferred color using the color button chooser.

Search


Dialog Search

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

General settings are common for all search types. If you check the Automatically start search option then the search is automatically started whenever you switch to another entry in the editor. Currently, there are three possibilities you can choose from, but since KBabel can use dictionary plugins the available dictionaries depend on those installed. Using Settings->Configure Dictionary->... you can configure every search plugin.

The dictionary plugins installed by default are:

KDE Database Search Engine

This new method is still in alpha stage of development and is based on KBabelDict which accompanies KBabel. See KBabelDict documentation for further info on configuring the search engine.

PO Compendium

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

PO Auxiliary

The auxiliary should help you find 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 by clicking Dictionaries->Search Text->PO Compendium or by keeping the search button on the toolbar pressed down for a while.

Diff


Dialog Diff

The Diff section holds settings how to display differences in msgids.

Every difference can be displayed by two added parts and by characters removed from the text. For both you can specify the method of display and the color to be used. Highlighted means that the background of the corresponding characters will be shown in the selected color, while Underlined(for added characters) or Stroked Out (for removed characters) will denote the changed parts by colored lines.

Diff mode needs to find the original msgid to compare with. For this purpose, KBabel can use the translation database if you turn in on by enabling Use messages from Translation Database. A second possibility is to use a tree of original PO files and specifying the root of the tree in Base folder for diff files.

Fonts


Dialog Fonts

This is a standard KDE 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 recommended for easy translating. The font dialog lets you set font family, style, size and encoding. The bottom box shows a preview of the current font for user convenience.

Prev
Next
Home


Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team