<othercredit role="translator"><firstname>Malcolm</firstname><surname>Hunter</surname><affiliation><address><email>malcolm.hunter@gmx.co.uk</email></address></affiliation><contrib>Conversion to British English</contrib></othercredit>
<para>Translation database allows you to store translations in a database based on Berkeley Database II, &ie; it is stored in a binary file on your disk. The database guarantees fast searching in a large number of translations.</para>
<para>Of course, the more translations are stored in the database, the more productive you can be. To fill the database, you can use the <guilabel>Database</guilabel> tab in the preferences dialogue or you can turn on automatic addition of every translated messages on the same tab.</para>
<para>You can configure this searching mode and how it should be used by selecting <menuchoice> <guisubmenu>Settings</guisubmenu> <guisubmenu>Configure Dictionary</guisubmenu> <guimenuitem>Translation Database</guimenuitem> </menuchoice> in &kbabel; menu. </para>
<para>The <guilabel>Generic</guilabel> tab contains general settings for searching in the database. </para>
<para>Just return <quote>good keys</quote>, do not try to eliminate any more texts. This is the fastest provided method, but can lead to a quite large number of imprecise matches. </para>
<para>Skip unnecessary white space in the texts, so the searching will ignore small differences of white space, ⪚ number of spaces in the text. </para>
<para>Here you can enter characters, which should be ignored while searching. Typical example would be accelerator mark, &ie; & for &kde; texts. </para>
<para>The <guilabel>Search</guilabel> tab contains finer specification for searching the text. You can define how to search and also allows to use another special way of searching called <emphasis><guilabel>Word substitution</guilabel></emphasis>. By substituting one or two words the approximate text can be found as well. For example, assume you are trying to find the text <userinput>My name is Andrea</userinput>. </para>
<para>Text from database matches if it is the same as the searched string. In our example it can be <emphasis>My name is &Andrea</emphasis> (if & is set as ignored character in <guilabel>Characters to be ignored</guilabel> on <guilabel>Generic</guilabel> tab). </para>
<para>Text from database matches if the searched string is contained in it. For our example it can be <emphasis>My name is Andrea, you know?</emphasis>. </para>
<para>Text from database matches if the searched string contains it. For our example it can be <emphasis>Andrea</emphasis>. You can use this for enumerating the possibilities to be found. </para>
<para>Consider searched text as a regular expression. This is mainly used for &kbabeldict;. You can hardly expect regular expressions in PO files. </para>
<para>If the query text contains less words than specified below, it also tries to replace one of the words in the query. In our example it will find <emphasis>Your name is Andrea</emphasis> as well. </para>
<para>The <guilabel>Database</guilabel> tab allows to define where is the database stored on disk (<guilabel>Database folder</guilabel>) and if it should be used for automatic storing of the new translations (<guibutton>Auto add entry to database</guibutton>). In this case you should specify the author of the new translation in <guilabel>Auto added entry author</guilabel>. </para>
<para>The rest of the tab allows you to fill the database from PO files that already exist. Use one of the buttons in the middle of the dialogue box. The progress of the file load will be shown by progress bars below the buttons. The <guilabel>Repeated strings</guilabel> button should be used in the special case where one translated string is repeated many times, to prevent storing unnecessary copies. Here you can limit the stored strings. </para>
<para>On the <guilabel>Good keys</guilabel> tab are the thresholds to specify how to fill the list of good keys. <guilabel>Minimum number of query words in the key (%)</guilabel> specifies exactly that. Text will need to contain only this per cent of the words to qualify as good key. Opposite can be specified via <guilabel>Minimum number of words of the key also in the query (%)</guilabel>. The length of the words can be set by <guilabel>Max length</guilabel> spinbox. </para>
<para>Searched text typically contains number of generic words, ⪚ articles. You can eliminate the words based on the frequency. You can discard them by <guilabel>Discard words more frequent than</guilabel> or consider as always present by <guilabel>frequent words are considered as in every key</guilabel>. This way the frequent words will be almost invisible for queries. </para>
<para>This searching mode is based on matching the same original English string (the msgid) translated in some other language in an auxillary <acronym>PO</acronym> file. It is very common for romanic languages to have similar words, similarly for anglosaxon and slavonic ones.</para>
<para>For example, say I wanted to translate the word <quote>on</quote>, from <filename>tdelibs.po</filename>, into Romanian but have no idea. I look in the same file for French and find <quote>actif</quote>, and in the Spanish one find <quote>activado</quote>. So, I conclude that the best one in Romanian will be <quote>active</quote>. &kbabel; automates this task. Currently you can define only one auxiliary file to search.</para>
<para>You can configure this searching mode by selecting <menuchoice> <guisubmenu>Settings</guisubmenu> <guisubmenu>Configure Dictionary</guisubmenu> <guimenuitem>PO Auxiliary</guimenuitem> </menuchoice> from the &kbabel; menu.</para>
<para>In the <guilabel>Configure Dictionary PO Auxiliary</guilabel> dialogue you can select the path to the auxiliary <acronym>PO</acronym> file. To automate <acronym>PO</acronym>-file switching when you change current edited file there are many variables delimited by <literal>@</literal> char that are replaced by appropriate values:</para>
<listitem><para>The name of application or package currently being translated. For example, it can expand to kbabel, tdelibs, konqueror and so on. </para></listitem>
<listitem><para>where <quote>n</quote> is a positive integer. This expands to the <quote>n</quote>-th folder counted from the filename (right to left). </para></listitem>
<para>The edit line displays the actual path to the auxiliary <acronym>PO</acronym> file. While it is best to use the provided variables in a path it is possible to choose an absolute, real path to an existing <acronym>PO</acronym> file. Let's take an example.</para>
<para>I'm Romanian and I have some knowledge about French language and I work on &kde; translation.</para>
<para>First step is to download a very fresh <filename>tde-i18n-fr.tar.bz2</filename> from the <ulink url="ftp://ftp.kde.org/pub/kde/snapshots/tde-i18n">&kde; &FTP; site</ulink> or to use the <acronym>CVS</acronym> system to put on my hard-disk a French translation tree. I do this into <filename>/home/clau/cvs-cvs.kde.org/tde-i18n/fr</filename>.</para>
<para>My <acronym>PO</acronym> sources folder is in <filename>/home/clau/cvs-cvs.kde.org/tde-i18n/ro</filename>. Don't forget to select <guilabel>PO Auxiliary</guilabel> as the default dictionary and check <guilabel>Automatically start search</guilabel> on the <guilabel>Search</guilabel> tab from &kbabel;'s <guilabel>Preferences</guilabel> dialogue.</para>
<para>A compendium is a file containing a collection of all translation messages (pairs of <acronym>msgid</acronym> and <acronym>msgstr</acronym>) in a project, ⪚ in &kde;. Typically, compendium for a given language is created by concatenating all <acronym>PO</acronym> files of the project for the language. Compendium can contain translated, untranslated and fuzzy messages. Untranslated ones are ignored by this module. </para>
<para>Similarly to Auxiliary <acronym>PO</acronym>, this searching mode is based on matching the <quote>same</quote> original string (<acronym>msgid</acronym>) in a compendium. Currently you can define only one compendium file to search. </para>
<para>This mode is very useful if you are not using the translation database and you want to achieve consistent translation with other translations. By the way, compendium files are much easier to share with other translators and even other translation projects because they can be generated for them as well. </para>
<para>You can configure this searching mode by selecting <menuchoice> <guisubmenu>Settings</guisubmenu> <guisubmenu>Configure Dictionary</guisubmenu> <guimenuitem>PO Compendium</guimenuitem> </menuchoice> in &kbabel;'s menu. </para>
<para>In <guilabel>Configure Dictionary PO Compendium</guilabel> dialogue you can select the path to a compendium file. To automate compendium file switching when you change the translation language, there is a variable delimited by <literal>@</literal> char which si replaced by appropriate value:</para>
<para>In the edit line is displayed the actual path to compendium <acronym>PO</acronym> file. While you had best use provided variables in path, it's possible to choose an absolute, real path to an existing <acronym>PO</acronym> file to be used as a compendium.</para>
<para>A very fresh compendium for &kde; translation into ⪚ French you can download <filename>fr.messages.bz2</filename> from the <ulink url="ftp://ftp.kde.org/pub/kde/snapshots/tde-i18n">&kde; &FTP; site</ulink>. </para>
<para>You can define how to search in the compendium using options below the path. They are divided into two groups: text-matching options, where you can specify how the text is compared and whether to ignore fuzzy translations, and message-matching options, which determine if the translation from compendium should be a substring of searching message or vice versa.</para>
<para>If the fuzzy messages in the compendium should be ignored for searching. The compendium can contain fuzzy messages, since it is typically created by concatenating the <acronym>PO</acronym> files of the project which can include fuzzy messages. Untranslated ones are ignored always (You can't search for translation in untranslated messages, right?)</para>
<para>A text in compendium matches the search text only if it is <quote>similar</quote>. Both texts are compared by short chunks of letters (<quote>3-grams</quote>) and at least half of the chunks has to be same. </para>