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.
The left side of the preferences dialog lists the categories of customizable items and the right side shows the corresponding tab for the selected category. KBabel keeps changes if you move between categories, so when you're finally 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 has changed to an arrow with a question mark, click on a button, label, or preference entry to find out more about it.
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. There is also a timezone field to track your “last modified” time for PO files. 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 headers. You can find the options control what fields in the header should be updated in the Save section of the Preferences dialog.
Character sequences for timezones are not standardized. So you should not use the string set here in time specification for saving in Save tab. You should use %z instead.
Use this for setting number of plural forms for your language. For example, it is 2 for German (one for the singular and one for the plural form).
This feature is currently implemented only for plural forms format used in KDE. It does not work with gettext plural forms.
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.
This section contains a set of checkboxes.
The first checkbox in the upper side sets if the fuzzy status is resetted 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, e.g. \t after pressing Tab and it allows special handling of Enter.
The lower checkboxes are very useful in assisting not the correctness of the translation corectness but if the translated string is a suitable replacement for the first within the sofware. For example, many messages represent menu items with keyboard accelerator and C-like formated strings whose structure must remain intact once translated.
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.
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.
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 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.
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.
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.
Your system bell will beep when you switch on entries with errors like those described above.
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.
These options let you configure the appearance for the message editor. In upper part there are 4 checkboxes:
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.
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.
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.
If you think that viewing the terminal characters a 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 color from any part of your screen.
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 KDE Control Center.
Here you can adjust the color for escaped characters like (\") double quotes or (\n) newline.
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.
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.
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 prefered color using the color button chooser.
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 let you set font family, style, size and encoding. The bottom box shows a preview of the current for user convenience.
This section allows you to edit the options for PO file saving. The first checkboxes group control general behavior for actions performed at PO file saving command.
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 this to automatically check syntax of file with msgfmt --statistics when saving a file. You will only get a message if an error occurred. 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 lets you define your own format, where you can use the following C-like format strings:
Table 6.1. Year
Format | Meaning | Range |
---|---|---|
%y | year | 00 to 99 |
%Y | year | 0001 to 9999 |
Table 6.2. 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 |
Table 6.3. 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 |
Table 6.4. 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 |
Table 6.5. Minute, Second, Timezone
Format | Meaning | Range |
---|---|---|
%M | minute | 00 to 59 |
%S | second | 00 to 59 |
%Z | timezone | (given in identity settings) |
%z | timezone | (numeric offset as specified by system settings) |
The lower group cover 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 accidentally change current PO file encoding, turn on Keep the encoding of the file.
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:
For new words added to the personal dictionary, spell check engine will create root/affix combinations to match more than one word (variations).
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, so should be left turned off in that case.
From the popup list you can choose which dictionary to use. Note that you must install an appropriate dictionary for your language. Check your ispell or aspell distribution to find out if you have one.
Here you choose the encoding for your text. This option is passed to the spellchecker, and is used as the encoding for your words dictionary. See the kspell documentation for more details.
Backend program to use for spell checking. Currently either ispell (International Ispell) or aspell.
Keep track of user-ignored words when spell-checking PO files. It is very convenient to ignore the abbreviations or strange letter combinations you meet in GUI interfaces.
Here you can set location of the file for ignored words. Click on the folder icon to the right of the edit box. The default is $(HOME)/.kde/share/apps/kbabel/spellignores, where $(HOME) is your home directory.
The search section allows you to customize various settings for searching in previous 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 at three posibilies 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 default installed dictionary plugins are:
This new method is still in alpha stage of development and base it task on KBabelDict which accompanies KBabel. See KBabelDict documentation for further info on configuring search engine.
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 translations of your team (e.g. the $lang.messages file in the KDE Project, that can be found at i18n.kde.org).
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 by clicking Dictionaries->Search Text->PO Compendium or by keeping the search button on the toolbar pressed for a while.
The Diff section hold settings how to display differences in msgids.
Every difference can be displayed by two added parts and by removed characters of the text. For both you can specify the method of displaying and the color, which will be used. Highlighted means that the background of the corresponding characters will be shown in the selected color, while Underlined(for added characters) or Striked Out (for removed characters) will denote the changed parts by colored lines.
Diff mode needs to find the original msgid to compare to. For this purpose, KBabel can use translation database if you turn in on by Use messages from Translation Database. Second possibility is to use a tree of original PO files. Then you need to specify the root of the tree in Base directory for diff files.
Miscellaneous section hold settings which don't feet anywhere. Currently are two:
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.
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".