From bd9e6617827818fd043452c08c606f07b78014a0 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- doc/kbabel/Makefile.am | 3 + doc/kbabel/TODO | 4 + doc/kbabel/back.png | Bin 0 -> 1188 bytes doc/kbabel/bottom.png | Bin 0 -> 599 bytes doc/kbabel/catalogmanager.png | Bin 0 -> 1540 bytes doc/kbabel/catalogmanager_broken.png | Bin 0 -> 188 bytes doc/kbabel/catalogmanager_missing.png | Bin 0 -> 215 bytes doc/kbabel/catalogmanager_needwork.png | Bin 0 -> 189 bytes doc/kbabel/catalogmanager_nopot.png | Bin 0 -> 169 bytes doc/kbabel/catalogmanager_nopot_ok.png | Bin 0 -> 267 bytes doc/kbabel/catalogmanager_ok.png | Bin 0 -> 219 bytes doc/kbabel/catalogmanager_reload.png | Bin 0 -> 1203 bytes doc/kbabel/catman.docbook | 214 +++ doc/kbabel/dbcan.png | Bin 0 -> 17645 bytes doc/kbabel/dictionaries.docbook | 517 +++++++ doc/kbabel/editcopy.png | Bin 0 -> 799 bytes doc/kbabel/editcut.png | Bin 0 -> 833 bytes doc/kbabel/editpaste.png | Bin 0 -> 979 bytes doc/kbabel/faq.docbook | 66 + doc/kbabel/fileopen.png | Bin 0 -> 554 bytes doc/kbabel/filesave.png | Bin 0 -> 728 bytes doc/kbabel/find.png | Bin 0 -> 1174 bytes doc/kbabel/forward.png | Bin 0 -> 1173 bytes doc/kbabel/glossary.docbook | 211 +++ doc/kbabel/index.docbook | 174 +++ doc/kbabel/kbabeldict.docbook | 85 ++ doc/kbabel/man-catalogmanager.1.docbook | 77 + doc/kbabel/menu.docbook | 2320 ++++++++++++++++++++++++++++++ doc/kbabel/msgid2msgstr.png | Bin 0 -> 391 bytes doc/kbabel/next.png | Bin 0 -> 247 bytes doc/kbabel/nexterror.png | Bin 0 -> 375 bytes doc/kbabel/nextfuzzy.png | Bin 0 -> 343 bytes doc/kbabel/nextfuzzyuntrans.png | Bin 0 -> 351 bytes doc/kbabel/nextuntranslated.png | Bin 0 -> 309 bytes doc/kbabel/pref_diff.png | Bin 0 -> 9155 bytes doc/kbabel/pref_edit_appearance.png | Bin 0 -> 9383 bytes doc/kbabel/pref_edit_general.png | Bin 0 -> 12868 bytes doc/kbabel/pref_fonts.png | Bin 0 -> 12317 bytes doc/kbabel/pref_proj_catman.png | Bin 0 -> 10571 bytes doc/kbabel/pref_proj_diff.png | Bin 0 -> 10616 bytes doc/kbabel/pref_proj_file_commands.png | Bin 0 -> 13864 bytes doc/kbabel/pref_proj_folder_commands.png | Bin 0 -> 12319 bytes doc/kbabel/pref_proj_source.png | Bin 0 -> 14305 bytes doc/kbabel/pref_search.png | Bin 0 -> 7939 bytes doc/kbabel/pref_wizard_page1.png | Bin 0 -> 7117 bytes doc/kbabel/pref_wizard_page2.png | Bin 0 -> 6475 bytes doc/kbabel/preferences.docbook | 1418 ++++++++++++++++++ doc/kbabel/preverror.png | Bin 0 -> 384 bytes doc/kbabel/prevfuzzy.png | Bin 0 -> 341 bytes doc/kbabel/prevfuzzyuntrans.png | Bin 0 -> 352 bytes doc/kbabel/previous.png | Bin 0 -> 260 bytes doc/kbabel/prevuntranslated.png | Bin 0 -> 308 bytes doc/kbabel/redo.png | Bin 0 -> 632 bytes doc/kbabel/roughtranslation.png | Bin 0 -> 16106 bytes doc/kbabel/snap1.png | Bin 0 -> 37768 bytes doc/kbabel/snap_catalogmanager.png | Bin 0 -> 38898 bytes doc/kbabel/snap_kbabeldict.png | Bin 0 -> 19942 bytes doc/kbabel/snap_kbabeldict2.png | Bin 0 -> 26772 bytes doc/kbabel/stop.png | Bin 0 -> 821 bytes doc/kbabel/top.png | Bin 0 -> 657 bytes doc/kbabel/transsearch.png | Bin 0 -> 1357 bytes doc/kbabel/undo.png | Bin 0 -> 578 bytes doc/kbabel/using.docbook | 791 ++++++++++ 63 files changed, 5880 insertions(+) create mode 100644 doc/kbabel/Makefile.am create mode 100644 doc/kbabel/TODO create mode 100644 doc/kbabel/back.png create mode 100644 doc/kbabel/bottom.png create mode 100644 doc/kbabel/catalogmanager.png create mode 100644 doc/kbabel/catalogmanager_broken.png create mode 100644 doc/kbabel/catalogmanager_missing.png create mode 100644 doc/kbabel/catalogmanager_needwork.png create mode 100644 doc/kbabel/catalogmanager_nopot.png create mode 100644 doc/kbabel/catalogmanager_nopot_ok.png create mode 100644 doc/kbabel/catalogmanager_ok.png create mode 100644 doc/kbabel/catalogmanager_reload.png create mode 100644 doc/kbabel/catman.docbook create mode 100644 doc/kbabel/dbcan.png create mode 100644 doc/kbabel/dictionaries.docbook create mode 100644 doc/kbabel/editcopy.png create mode 100644 doc/kbabel/editcut.png create mode 100644 doc/kbabel/editpaste.png create mode 100644 doc/kbabel/faq.docbook create mode 100644 doc/kbabel/fileopen.png create mode 100644 doc/kbabel/filesave.png create mode 100644 doc/kbabel/find.png create mode 100644 doc/kbabel/forward.png create mode 100644 doc/kbabel/glossary.docbook create mode 100644 doc/kbabel/index.docbook create mode 100644 doc/kbabel/kbabeldict.docbook create mode 100644 doc/kbabel/man-catalogmanager.1.docbook create mode 100644 doc/kbabel/menu.docbook create mode 100644 doc/kbabel/msgid2msgstr.png create mode 100644 doc/kbabel/next.png create mode 100644 doc/kbabel/nexterror.png create mode 100644 doc/kbabel/nextfuzzy.png create mode 100644 doc/kbabel/nextfuzzyuntrans.png create mode 100644 doc/kbabel/nextuntranslated.png create mode 100644 doc/kbabel/pref_diff.png create mode 100644 doc/kbabel/pref_edit_appearance.png create mode 100644 doc/kbabel/pref_edit_general.png create mode 100644 doc/kbabel/pref_fonts.png create mode 100644 doc/kbabel/pref_proj_catman.png create mode 100644 doc/kbabel/pref_proj_diff.png create mode 100644 doc/kbabel/pref_proj_file_commands.png create mode 100644 doc/kbabel/pref_proj_folder_commands.png create mode 100644 doc/kbabel/pref_proj_source.png create mode 100644 doc/kbabel/pref_search.png create mode 100644 doc/kbabel/pref_wizard_page1.png create mode 100644 doc/kbabel/pref_wizard_page2.png create mode 100644 doc/kbabel/preferences.docbook create mode 100644 doc/kbabel/preverror.png create mode 100644 doc/kbabel/prevfuzzy.png create mode 100644 doc/kbabel/prevfuzzyuntrans.png create mode 100644 doc/kbabel/previous.png create mode 100644 doc/kbabel/prevuntranslated.png create mode 100644 doc/kbabel/redo.png create mode 100644 doc/kbabel/roughtranslation.png create mode 100644 doc/kbabel/snap1.png create mode 100644 doc/kbabel/snap_catalogmanager.png create mode 100644 doc/kbabel/snap_kbabeldict.png create mode 100644 doc/kbabel/snap_kbabeldict2.png create mode 100644 doc/kbabel/stop.png create mode 100644 doc/kbabel/top.png create mode 100644 doc/kbabel/transsearch.png create mode 100644 doc/kbabel/undo.png create mode 100644 doc/kbabel/using.docbook (limited to 'doc/kbabel') diff --git a/doc/kbabel/Makefile.am b/doc/kbabel/Makefile.am new file mode 100644 index 00000000..17a314c3 --- /dev/null +++ b/doc/kbabel/Makefile.am @@ -0,0 +1,3 @@ +KDE_LANG = en +KDE_DOCS = AUTO +KDE_MANS = AUTO diff --git a/doc/kbabel/TODO b/doc/kbabel/TODO new file mode 100644 index 00000000..916027bf --- /dev/null +++ b/doc/kbabel/TODO @@ -0,0 +1,4 @@ +KBabel documentation TODO: + +missing: +catman - find/replace dialogs diff --git a/doc/kbabel/back.png b/doc/kbabel/back.png new file mode 100644 index 00000000..2ffa9395 Binary files /dev/null and b/doc/kbabel/back.png differ diff --git a/doc/kbabel/bottom.png b/doc/kbabel/bottom.png new file mode 100644 index 00000000..caf4ea5a Binary files /dev/null and b/doc/kbabel/bottom.png differ diff --git a/doc/kbabel/catalogmanager.png b/doc/kbabel/catalogmanager.png new file mode 100644 index 00000000..48bbade3 Binary files /dev/null and b/doc/kbabel/catalogmanager.png differ diff --git a/doc/kbabel/catalogmanager_broken.png b/doc/kbabel/catalogmanager_broken.png new file mode 100644 index 00000000..d0948e92 Binary files /dev/null and b/doc/kbabel/catalogmanager_broken.png differ diff --git a/doc/kbabel/catalogmanager_missing.png b/doc/kbabel/catalogmanager_missing.png new file mode 100644 index 00000000..e0311068 Binary files /dev/null and b/doc/kbabel/catalogmanager_missing.png differ diff --git a/doc/kbabel/catalogmanager_needwork.png b/doc/kbabel/catalogmanager_needwork.png new file mode 100644 index 00000000..e31413d8 Binary files /dev/null and b/doc/kbabel/catalogmanager_needwork.png differ diff --git a/doc/kbabel/catalogmanager_nopot.png b/doc/kbabel/catalogmanager_nopot.png new file mode 100644 index 00000000..1e220bee Binary files /dev/null and b/doc/kbabel/catalogmanager_nopot.png differ diff --git a/doc/kbabel/catalogmanager_nopot_ok.png b/doc/kbabel/catalogmanager_nopot_ok.png new file mode 100644 index 00000000..50028c65 Binary files /dev/null and b/doc/kbabel/catalogmanager_nopot_ok.png differ diff --git a/doc/kbabel/catalogmanager_ok.png b/doc/kbabel/catalogmanager_ok.png new file mode 100644 index 00000000..f2b731a0 Binary files /dev/null and b/doc/kbabel/catalogmanager_ok.png differ diff --git a/doc/kbabel/catalogmanager_reload.png b/doc/kbabel/catalogmanager_reload.png new file mode 100644 index 00000000..e7aeaac5 Binary files /dev/null and b/doc/kbabel/catalogmanager_reload.png differ diff --git a/doc/kbabel/catman.docbook b/doc/kbabel/catman.docbook new file mode 100644 index 00000000..a55d46ec --- /dev/null +++ b/doc/kbabel/catman.docbook @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + +Using &catalogmanager; + + + +Screenshot of &catalogmanager; + + + + +Screenshot of &catalogmanager; + + + +The Catalog Manager merges two folders into one tree and displays +all the PO and POT files in +these folders. The display allows you to easily see if a new +template has been added or an old one has been removed. Some +information is shown along with each file name: total number of +entries, number of fuzzy entries, number of untranslated entries, the +date of the last revision and the last translator of the file. + + + +KBabel's Catalog Manager is meant for projects structured like KDE, +where the POT and PO files +share a same name, save the extensions. However this is not the +case of &GNU; projects and of many projects structured like &GNU; ones. +Typically in such projects, the PO file is named +following the language code and so is very different than the name +of the POT files. Also such projects have +one POT file sharing a directory with all its +translated PO files. Unfortunately, all these reasons +mean that the Catalog Manager is not suitable for +such projects. (See KDE bug #76495.) + + + +To make it easier for you to find files that need work or are +missing the status of each file is also displayed using an icon: + + + + + + + + + + All the messages in this file are translated. + + + + + + + + +Some of the messages in this file are fuzzy or untranslated + + + + + + + + + +This file does not exist in the folder of the PO files. + + + + + + + + + +This file contains syntax errors. + + + + + + + + + +Information about this file is being currently updated. When the update is +finished, it will get one of the icons listed above to reflect its state. + + + + + +If an icon is marked with this icon + + + + +, like + + + + +, +it indicates that this file or folder does not exist in the +folder 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 folder, +press the right mouse button over the folder and select +Toggle Markings or Remove +Markings. The markings are automatically saved when +leaving &kbabel;. + +To open a file either double-click on the file, select +Open from the +context menu or press either Return or &Ctrl;O . + +You can configure the &catalogmanager; by +Project +Configure.... +See section Project Settings for more +details. + + +&catalogmanager; Features + +Besides the main feature for opening the files in &kbabel; &catalogmanager; +supports number of other features for maintaining a tree of +PO-files. + + + +Find and replace in multiple files + +One of the most requested features for &kbabel; was a possibility to search and replace in +multiple files at once. &catalogmanager; supports this feature with +a tight integration with &kbabel; + + + + +Statistics + +&catalogmanager; can show you a number of statistics about a single file +or about the whole folders. The statistics contain number of files, +how many of the files have their templates, how many templates are missing. +It also counts number of messages in the files and shows statistics about +how large parts of the messages are translated, fuzzy-translated or +untranslated. + + + + +Checking the syntax + +This allows you to check the syntax of multiple PO-files +using msgfmt. If a file fails this check, it cannot +be used for generating a MO-file for binary distribution. +Such an incorrect file will typically result in failing compilation of the package +the PO-file belongs to. + + + + +User-defined commands + +Because &catalogmanager; cannot provide any functionality you would like +to use, you can extend it by defining your own commands. + + + +There are two sets of commands. One for folders and one for single files. +You can set them in configuration dialog and +access by pressing &RMB; on an entry in the file list. + + + + + diff --git a/doc/kbabel/dbcan.png b/doc/kbabel/dbcan.png new file mode 100644 index 00000000..a8cf3080 Binary files /dev/null and b/doc/kbabel/dbcan.png differ diff --git a/doc/kbabel/dictionaries.docbook b/doc/kbabel/dictionaries.docbook new file mode 100644 index 00000000..a9e5ed70 --- /dev/null +++ b/doc/kbabel/dictionaries.docbook @@ -0,0 +1,517 @@ + + + + + + + + + + + + + + + + + + +Dictionaries + +&kbabel; has 3 modes which can be used to search translated +PO message strings: + + + + Searching translation, using a translation database + + + + Rough translation + + + + &kbabeldict; + + + + + + +Translation database + + +Translation database allows you to store translations in a +database based on Berkeley Database IV, &ie; it is stored in a binary +file on your disk. The database guarantees fast searching in a large +number of translations. + +This mode is the one best integrated with &kbabel;. Besides +searching and rough translation it also supports the following +features: + + + +Every new translation typed in the &kbabel; editor can be +automatically stored in the database. + + +This database can be used for diff-ing +msgid. + + + +Of course, the more translations are stored in the database, the +more productive you can be. To fill the database, you can use the +Database tab in the preferences dialog or you can +turn on automatic addition of every translated messages on the same +tab. + + +Settings + +You can configure this searching mode and how it should be used by selecting + + Settings + Configure Dictionary + Translation Database + +in &kbabel; menu. + + +The Generic tab contains general settings for searching in the +database. + + + + Search in whole database (slow) + + + Do not use good keys, search in the whole database. + This is slow, but will return the most precise results. + + + + + Search in list of "good keys" (best) + + + Use good keys strategy. This option will give you the + best tradeoff between speed and exact matching. + + + + + Return the list of "good keys" (fast) + + + Just return good keys, 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. + + + + + Case sensitive + + + Distinguish case of letters when searching the text. + + + + + Normalize white space + + + Skip unnecessary white space in the texts, so the searching will ignore small + differences of white space, ⪚ number of spaces in the text. + + + + + Remove context comment + + + Do not include context comments in search. You will want this to be turned on. + + + + + Character to be ignored + + Here you can enter characters, which should be ignored while searching. + Typical example would be accelerator mark, &ie; & for &kde; texts. + + + + + +The Search 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 Word substitution. By substituting +one or two words the approximate text can be found as well. For example, assume you +are trying to find the text My name is Andrea. + + + + Equal + + + Text from database matches if it is the same as the searched string. In our example it can + be My name is &Andrea (if & is set as ignored character + in Characters to be ignored on Generic tab). + + + + + Query is contained + + + Text from database matches if the searched string is contained in it. For our example it can + be My name is Andrea, you know?. + + + + + Query contains + + + Text from database matches if the searched string contains it. For our example it can + be Andrea. You can use this for enumerating the possibilities to + be found. + + + + + Regular Expression + + + Consider searched text as a regular expression. This is mainly used for + &kbabeldict;. You can hardly expect regular expressions in PO files. + + + + + Use one word substitution + + + 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 Your name is Andrea as well. + + + + + Max number of words in the query + + + Maximal number of words in a query to enable one word substitution. + + + + + Local characters for regular expressions + + + Characters to be considered part of regular expressions. + + + + + + +Two-word substitution is not implemented yet. + + + + + +Filling the database + +The Database tab allows to define where is the database stored on +disk (Database folder) and if it should be used for automatic +storing of the new translations (Auto add entry to database). +In this case you should specify the author of the new translation in Auto added +entry author. + + +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 dialog box. The progress of the file load will be +shown by progress bars below the buttons. The Repeated strings +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. + + +Filling the database + + + + +Filling the database by existing PO-files + + + + +Defining good keys + +On the Good keys tab are the thresholds to specify how to fill +the list of good keys. +Minimum number of query words in the key (%) 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 Minimum number of words of the key also in the query (%). +The length of the words can be set by Max length spinbox. + +Searched text typically contains number of generic words, ⪚ articles. You can +eliminate the words based on the frequency. You can discard them by +Discard words more frequent than or consider as always present by +frequent words are considered as in every key. This way the +frequent words will be almost invisible for queries. + + + + + + +Auxiliary PO file + +This searching mode is based on matching the same original +English string (the msgid) translated in some other language in an +auxillary PO file. It is very common for Romance + +languages to have similar words, similarly for Anglo-Saxon and +Slavic ones. + + +For example, say I wanted to translate the word +on, from kdelibs.po, into Romanian +but have no clue. I look in the same file for French and find +actif, and in the Spanish one find +activado. So, I conclude that the best one in Romanian +will be active. +(Of course, in English instead of on the word could have been +active or activated, +which would have made the translation process easier.) +&kbabel; automates this task. Currently you can define only one auxiliary file to search. + + + +Settings + +You can configure this searching mode by selecting + + Settings + Configure Dictionary + PO Auxiliary + +from the &kbabel; menu. + +In the Configure Dictionary PO Auxiliary +dialog you can select the path to the auxiliary PO +file. To automate PO-file switching when you +change current edited file there are many variables delimited by +@ char that are replaced by appropriate +values: + + + + @PACKAGE@ + + The name of application or package currently being translated. + For example, it can expand to kbabel, kdelibs, konqueror + and so on. + + + + @LANG@ + + The language code. + For example can expand to: de, ro, fr etc. + + + + @DIRn@ + + where n is a positive integer. This expands to + the n-th folder counted from the filename (right to + left). + + + + +The edit line displays the actual path to the auxiliary +PO 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 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-l10n-fr.tar.bz2 from the &kde; &FTP; +site or to use the CVS system to put on my +hard-disk a French translation tree. I do this into +/home/clau/cvs-cvs.kde.org/kde-l10n/fr. + +My PO sources folder is in +/home/clau/cvs-cvs.kde.org/kde-l10n/ro. Do not +forget to select PO Auxiliary as the default +dictionary and check Automatically start search +on the Search tab from &kbabel;'s +Preferences dialog. + + + + + + +PO compendium + +A compendium is a file containing a collection of all +translation messages (pairs of msgid and +msgstr) in a project, ⪚ in &kde;. Typically, +compendium for a given language is created by concatenating all +PO files of the project for the +language. Compendium can contain translated, untranslated and fuzzy +messages. Untranslated ones are ignored by this module. + +Similarly to Auxiliary PO, this searching +mode is based on matching the same original string +(msgid) in a compendium. Currently you can define +only one compendium file to search. + +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. + + +Settings + + +You can configure this searching mode by selecting + + Settings + Configure Dictionary + PO Compendium + +in &kbabel;'s menu. + + +In Configure Dictionary PO Compendium +dialog 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 @ char which si +replaced by appropriate value: + + + + @LANG@ + + The language code. + For example can expand to: de, ro, fr etc. + + + + +In the edit line is displayed the actual path to compendium +PO file. While you had best use provided variables in +path, it's possible to choose an absolute, real path to an existing +PO file to be used as a compendium. + + +A very fresh compendium for &kde; translation into ⪚ French +you can download fr.messages.bz2 from the &kde; &FTP; +site. + +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. + + + + Case sensitive + + + If the matching of message in compendium should distinguish between uppercase and lowercase letters. + + + + + Ignore fuzzy string + + + 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 PO files of the project which can include fuzzy messages. Untranslated ones are ignored always (You can't search for translation in untranslated messages, right?) + + + + Only whole words + + + If the matching text should start and end at the boundaries of words. + + + + + A text matches if it is equal to search text + + + A text in compendium matches the search text only if it is exactly the same (of course using the options above). + + + + + A text matches if it is similar to search text + + + A text in compendium matches the search text only if it is similar. Both texts are compared by short chunks of letters (3-grams) and at least half of the chunks has to be same. + + + + + A text matches if it contains search text + + + A text in compendium matches the search text if it contains the search text. + + + + A text matches if it is contained in search text + + + A text in compendium matches the search text if it is contained the search text. + + + + + A text matches if it contains a word of search text + + + The texts are divided to words and a text in compendium matches the search text only if it contains some word from the search text. + + + + + + + + + diff --git a/doc/kbabel/editcopy.png b/doc/kbabel/editcopy.png new file mode 100644 index 00000000..c600e997 Binary files /dev/null and b/doc/kbabel/editcopy.png differ diff --git a/doc/kbabel/editcut.png b/doc/kbabel/editcut.png new file mode 100644 index 00000000..21c36739 Binary files /dev/null and b/doc/kbabel/editcut.png differ diff --git a/doc/kbabel/editpaste.png b/doc/kbabel/editpaste.png new file mode 100644 index 00000000..f6a1db8f Binary files /dev/null and b/doc/kbabel/editpaste.png differ diff --git a/doc/kbabel/faq.docbook b/doc/kbabel/faq.docbook new file mode 100644 index 00000000..ce8a6737 --- /dev/null +++ b/doc/kbabel/faq.docbook @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + +Questions and Answers + + + + + + 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 + &Ctrl;F 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. + + + + + + +How can I translate &kde;? + + + + +You can look for information about how to translate KDE in the +The KDE Translation HOWTO. + + + + + + \ No newline at end of file diff --git a/doc/kbabel/fileopen.png b/doc/kbabel/fileopen.png new file mode 100644 index 00000000..2d27efc8 Binary files /dev/null and b/doc/kbabel/fileopen.png differ diff --git a/doc/kbabel/filesave.png b/doc/kbabel/filesave.png new file mode 100644 index 00000000..14d339d8 Binary files /dev/null and b/doc/kbabel/filesave.png differ diff --git a/doc/kbabel/find.png b/doc/kbabel/find.png new file mode 100644 index 00000000..92ae8f30 Binary files /dev/null and b/doc/kbabel/find.png differ diff --git a/doc/kbabel/forward.png b/doc/kbabel/forward.png new file mode 100644 index 00000000..66315588 Binary files /dev/null and b/doc/kbabel/forward.png differ diff --git a/doc/kbabel/glossary.docbook b/doc/kbabel/glossary.docbook new file mode 100644 index 00000000..8138da5b --- /dev/null +++ b/doc/kbabel/glossary.docbook @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + +Glossary + +A + + Auxiliary file + + + is a &kbabel; specific issue. It is an option for the user to + set up one PO file to search through for original messages. For example, + if you're a member of French team and have some Spanish or Italian + knowledge you can grab and set-up an auxiliary Spanish PO file + associated with the file currently being translated. + + + + + + +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 a new yet untranslated + or partially translated PO file. + &kbabel; uses such a file in the PO Compendium + search engine. + + + + + +F + + Fuzzy + + + This is a flag generated, in general, + by msgmerge. It shows + that a msgstr string + might not be a correct translation. + The translator must see and make modifications + to the string if necessary and then remove + the fuzzy flag + from the message's comment. + + + + + +I + + Internationalization + i18n + + + is the operation by which an application + is made aware and able to support multiple + languages. The word internationalization + has 20 characters so, to shorten it, + people started to write only + the first and last characters and between them + write the number of intermediate characters (18) + forming the common abbreviation i18n. + + + + + + +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 word localization + has 12 characters so, to shorten it, + people started to write only + the first and last characters and between them + write the number of intermediate characters (10) + forming the common abbreviation l10n. + + + + + + +M + + MO file + MO + + + MO stands for Machine Object. A MO file + contains binary data suitable + for reading by computers. + The contents of a MO file are organized as a database + to minimize the lookup time + for translated strings. MO files + are obtained by compiling PO files + using msgfmt. + + + + + + + + Message ID + msgid + + + msgid is the keyword + which introduces the original string in a PO file. + It is followed by a C-like string that spans + one or more 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 stands for Portable Object. PO files + contain sets of strings which + associate each translatable string + with its translation in a particular + language. A single PO file relates + to only one language. A PO file is + derived from a POT file and is + edited either by hand or using &kbabel;. + + + + + + + POT file + POT + + + POT stands for Portable Object Template. A POT file is built by extracting all the + translatable strings from application + source files. A POT file does not + contain translations into any particular language— + it is used by the translators as a template. + + + + + + + + + diff --git a/doc/kbabel/index.docbook b/doc/kbabel/index.docbook new file mode 100644 index 00000000..51cb8661 --- /dev/null +++ b/doc/kbabel/index.docbook @@ -0,0 +1,174 @@ + + + + + + + + + + + + + +]> + + + + +The &kbabel; Handbook + + + +&Stanislav.Visnovsky; &Stanislav.Visnovsky.mail; + + +&Matthias.Kiefer; + + +Nicolas +Goutte +goutte@kde.org + + + + + +2005-12-29 +3.5.1.03 + + + +&kbabel; is a suite of of an advanced and easy to use +PO file editor comprising &kbabel;, a multi +functional &catalogmanager; and a dictionary for translators +&kbabeldict;. It supports many advanced features and it lets you +customize many options. + + + + +KDE +KBabel +catalogmanager +kdesdk +gettext +translation +i18n +internationalization +l10n +localization + + + + + +Introduction + + +In its current state, this KBabel documentation is partially outdated. +The basic documentation was meant for KDE 3.2, +the corrections are meant for KBabel 1.11.1 of KDE 3.5.1. + + + +&kbabel; is an advanced and easy to use PO file +(&GNU; gettext message catalogs) editor. It has many features, that +make it easy to edit and manage your PO files. +This includes full navigation capabilities, extensive editing +functionality, search functions, syntax checking and statistics +function. &catalogmanager; is a file manager view, which helps you +keep an overview over your PO files. &kbabeldict; +allows you to translate any text using &kbabel; capabilities for +automated translation. The &kbabel; suite will help you to translate +quickly and also to keep translations consistent. + + + +With the &kde; project growing continuously, the number of +PO messages is over 47000 at the time of writing +this documentation (plus another 20000 messages used for translating +application documentation). There is a need to stay organized and +consistent across all translations. + + + + +&using; +&catman; +&kbabeldictchapter; +&dictionaries; +&preferences; +&menu; +&kbabelfaq; + + + +Credits and License + + +&kbabel; + + +Program Copyright © 1999-2000 &Matthias.Kiefer; &Matthias.Kiefer.mail; + + +Contributors: + +&Thomas.Diehl; &Thomas.Diehl.mail; + +&Stephan.Kulow; &Stephan.Kulow.mail; + + + + +Documentation Copyright © 2000 &Claudiu.Costin; +&Claudiu.Costin.mail; and &Matthias.Kiefer; +&Matthias.Kiefer.mail; + +Update for &kde; 3.0 Copyright © 2002 &Stanislav.Visnovsky; +&Stanislav.Visnovsky.mail; + +Update for &kde; 3.5.1 Copyright © 2005 Nicolas Goutte +goutte@kde.org + + + +&underFDL; +&underGPL; + + + +&glossary; + + +Mailing List For KBabel + + +There is a mailing list for KBabel named kbabel. +It is a mixed list for developers and for users of KBabel. + + + +You can subscribe it at +the Mailman interface. + + + +The mailing list has +a public archive. + + + + +&documentation.index; + + + diff --git a/doc/kbabel/kbabeldict.docbook b/doc/kbabel/kbabeldict.docbook new file mode 100644 index 00000000..efe70b79 --- /dev/null +++ b/doc/kbabel/kbabeldict.docbook @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + +Using &kbabeldict; + + +&kbabeldict; is a simple interface for translation modules for +&kbabel;. It allows you to search for translations. + + +Screenshot of &kbabeldict; + + + + +Screenshot of &kbabeldict; + + + +The screenshot +above does not contain settings for selected module. You can show +them using Show Settings. Preferences +widget for selected module will be shown on the +right side of the window. The &kbabeldict; +window then looks like this: + + +Screenshot of &kbabeldict; + + + + +Screenshot of &kbabeldict; with shown settings + + + +The usage is very simple. You select a module to in the +Search in module combo-box. +Then you enter the phrase to lookup and press Start +Search. All found messages are shown in the list +below, which is the same as a tool in the &kbabel; main window. +Searching can be stopped by pressing Stop. +In case you want to search in translated text, not in original English message, +you should use Search in translations. + + +Buttons on the bottom of the window can be used for closing &kbabeldict;, +showing/hiding the module settings or displaying a dialog with credits for +&kbabeldict; and the modules themselves. + + + +For description of the standard modules and their settings see +. + + + + \ No newline at end of file diff --git a/doc/kbabel/man-catalogmanager.1.docbook b/doc/kbabel/man-catalogmanager.1.docbook new file mode 100644 index 00000000..00d500c0 --- /dev/null +++ b/doc/kbabel/man-catalogmanager.1.docbook @@ -0,0 +1,77 @@ + + +]> + + + +2003-03-07 + + + +catalogmanager +1 + + + +catalogmanager +Advanced catalog manager for &kbabel; + + + + +catalogmanager + config-file + + + + + + + +Description + +CatalogManager is part of a suite of programs for editing +gettext message files (PO-files). This suite is designed to help you +translate fast and consistently. + +This suite includes &kbabel;, +CatalogManager and &kbabeldict;. &kbabel; +is an advanced and easy to use PO-file editor with full navigational +and editing capabilities, syntax checking and +statistics. CatalogManager (this program) +is a multi functional catalog manager which allows you to keep track +of many PO-files at once. &kbabeldict; is a dictionary for +translators. +This utility is part of the &kde; Software Development Kit. + + + + +Options + + + + config-file + +Load the configuration from the given file. + + + + + + + +See Also + +kbabel(1) kbabeldict(1) + +More detailed user documentation is available from help:/kbabel (either enter this +URL into &konqueror;, or run +khelpcenter +help:/kbabel). + + + + diff --git a/doc/kbabel/menu.docbook b/doc/kbabel/menu.docbook new file mode 100644 index 00000000..14c474b5 --- /dev/null +++ b/doc/kbabel/menu.docbook @@ -0,0 +1,2320 @@ + + + + + + + + + + + + + + + + + + +Command Reference + + +The &kbabel; menu + + +The File Menu + + + + + + + &Ctrl;O + + + File + Open + + + + + + Opens a PO file. If the current file + is modified you will be prompted to save it first. + + + + + + + + File + Open Recent + + + + + + Opens a recently edited PO file from the recently-used documents menu + + + + + + + + + + &Ctrl;S + + + File + Save + + + + + + Saves the current PO file. If it is not modified no action is taken. + + + + + + + + File + Save As + + + + + + Saves the current PO file under a new name + + + + + + + + File + Save Special + + + + + + Displays the Save Settings dialog and then saves the current PO file under a new name + + + + + + + + File + Revert + + + + + + Loads the last saved version of the current PO file + + + + + + + + File + Mail + + + + + + Prompts for an archive filename in which to store the current PO file then opens an email composer + window with the archive as an attachment + + + + + + + + File + New View + + + + + + Opens a new window with the currently loaded file. + + Very useful if you have to translate large + files and need to refer back to some strings. + + + + + + + File + New Window + + + + + + Opens a new empty window + + + + + + + + + + &Ctrl;Q + + + File + Quit + + + + + + Quits &kbabel; editor + + + + + + + + +The Edit Menu + + + + + + + &Ctrl;Z + + + Edit + Undo + + + + + + Undoes the last edit action in the translation edit box + + + + + + + + + + &Ctrl;&Shift;Z + + + Edit + Redo + + + + + + Redoes the last undone edit action in the translation edit box + + + + + + + + + + &Ctrl;X + + + Edit + Cut + + + + + + Cuts the selected text and moves it to the clipboard + + + + + + + + + + &Ctrl;C + + + Edit + Copy + + + + + + Copies the selected text to the clipboard + + + + + + + + + + &Ctrl;V + + + Edit + Paste + + + + + + Pastes the contents of the clipboard at the current cursor + position in the translation edit box. + + + + + + + + Edit + Select All + + + + + + Selects all text in the translation edit box + + + + + + + + + + &Ctrl;F + + + Edit + Find... + + + + + + Opens a Find dialog for searching for strings in the current PO file + + + + + + + + + F3 + + Edit + Find Next + + + + + + Finds the next occurrence of a string from the previous search action + + + + + + + + + + &Ctrl;R + + + Edit + Replace... + + + + + + Opens the Replace dialog to search for and replace strings in the current PO file + + + + + + + + + + &Ctrl;Delete + + + Edit + Clear + + + + + + Clears the translation for the current msgid + + + + + + + + + + &Ctrl;Space + + + Edit + Copy msgid to msgstr + + + + + + Copies the original English string into the translation edit + box. This is useful when you do not need to make any changes + (or only minor changes) to the original English text (msgstr). + + + + + + + + + + &Ctrl;&Alt;Space + + + Edit + Copy search result to msgstr + + + + + + Copies a string found after a translation search + into the msgstr edit box. This is + very useful if you do not want to keep + re-translating the same message again and again. + + + + + + + + + + &Ctrl;U + + + Edit + Toggle Fuzzy Status + + + + + + Toggles the fuzzy status for the current entry. It can be useful to turn fuzzy on, + ⪚ to mark the translation for another review. + + + + + + + + + &Ctrl;&Alt;N + + + Edit + Insert Next Tag + + + + + + Inserts the next tag found in the msgid into the translation, if the original English string contains markup tags + + + + + + + + + &Ctrl;&Alt;N + + Edit + Insert Tag + + + + + + This submenu contains all markup tags found in the original English string. By selecting one of them you can insert at the current position of cursor in translated text. + translation. + + + + + + + + Edit + Edit Header... + + + + + + Edits the PO file header. + + Actually there are many header lines, which + keep the last translated date, translator name and email, language and + translated text encoding, &etc;. + + + + + + + + +The Go Menu + + + + + + Page Up + + Go + Previous + + + + + + Skips to the previous entry in the PO file. + + + + + + + + + Page Down + + Go + Next + + + + + + Skips to the next entry in the PO file. + + + + + + + + Go + Go to... + + + + + + Opens a dialog to jump to a specific entry number within the PO file. + + + + + + + + Go + First Entry + + + + + + Jumps to the first entry in the PO file. + + + + + + + + Go + Last Entry + + + + + + Jumps to the last entry in the PO file. + + + + + + + + + + &Ctrl;&Shift;Page Up + + + Go + Previous fuzzy or untranslated + + + + + + Jumps to the entry previous to the current one that is untranslated or + marked as fuzzy. + + + + + + + + + + &Ctrl;&Shift;Page Down + + + Go + Next fuzzy or untranslated + + + + + + Jumps to the next entry after the current one which is untranslated or + marked as fuzzy. + + + + + + + + + + &Ctrl;PgUp + + + Go + Previous fuzzy + + + + + + Jumps to the entry previous to the current one that is marked as fuzzy. + + + + + + + + + + &Ctrl;Page Down + + + Go + Next fuzzy + + + + + + Jumps to the next entry after the current one that is marked as fuzzy. + + + + + + + + + + &Alt;Page Up + + + Go + Previous untranslated + + + + + + Jumps to the entry previous to the current one that is untranslated. + + + + + + + + + + &Alt;Page Down + + + Go + Next untranslated + + + + + + Jumps to the next entry after the current one that is untranslated. + + + + + + + + + + &Shift;Page Up + + + Go + Previous error + + + + + + Jumps to the previous entry that has an error. This is usually when + double-quotes are not escaped or the original string ends with a + "newline" (\n) character and the translated string does not (and vice versa). + + + + + + + + + + &Shift;Page Down + + + Go + Next error + + + + + + Jumps to the next entry with an error. + + + + + + + + + + &Alt;Left Arrow + + + Go + Back + + + + + + Jump to last visited entry in PO file. + + + + + + + + + &Alt;Right Arrow + + + Go + Forward + + + + + + Jump to previous visited entry in PO file. + + + + + + + + +The Dictionaries Menu + +Note that this menu is dynamic: it depends on the installed dictionaries plugins. +By default are three of them. + + + + + + + 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. Useful + if you found errors in dictionary + and do not want errors to be reported + when searching and replacing + strings. + + (Not implemented yet) + + + + + + + + + +The Tools Menu + + + + + Tools + Spelling + Spell check... + + + + + + Display the spell-check configuration dialog. + After you have chosen the desired options, hit + OK and the normal spell-checking + dialog will appear. + + + + + + + Tools + Spelling + Check All... + + + + + + Start spell-checking all words + for an opened PO file. + + + + + + + Tools + Spelling + Check From Cursor 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. + + + + + + + + + + &Ctrl;T + + + Tools + Validation + Check Syntax + + + + + + Check syntax for current PO file. + Errors may appear from CVS merging + or users' mistakes when the translating + process is performed by hand. + + + + + + + + + &Ctrl;D + + + Tools + Validation + Check Arguments + + + + + + When this option is selected, C-format strings in the original message and + the translation are checked to ensure the number of + format sequences and the order are consistent. + + + + + + + + + + &Ctrl;H + + + Tools + Validation + Check Accelerators + + + + + When this option is selected, &kbabel; checks if the number +of accelerator + characters is identical in both the original and the translated + string. Note that accelerator marker is & in &kde; + (but not in every programming toolkit). See the + Miscellaneous section + below to find out how to change a keyboard accelerator. + + + + + + + + + &Ctrl;K + + + Tools + Validation + 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. + + + + + + + Tools + Validation + Check Plural Forms (KDE only) + + + + + Check if the PO file contains the correct number of translations for each &kde;-specific plural form message. + + + + + + + + + &Ctrl;J + + + Tools + Validation + Check Equations + + + + + + Check whether the left side of the translated string + is the same as the left side of the original string. + Sides are delimited by an equals-sign character. + + + + + + + + + + F5 + + + Tools + Diff + Show Diff + + + + + + Show difference found to the original translated message. + + + + + + + + + + F6 + + + Tools + Diff + Show Original Text + + + + + + Hide difference markings and show msgid only. + + + + + + + + Tools + Diff + Open File for Diff + + + + + + Open file to be used for difference lookup. + + + + + + + + Tools + Diff + Diffmode + + + + + + Toggle difference mode. + + + + + + + + Tools + Rough Translation... + + + + + + Invoke rough-translation dialog for automated translation. + + + + + + + + Tools + Catalog Manager... + + + + + Open &catalogmanager;. Read + &catalogmanager; section + for more details. + + + + + + + +The Settings Menu + + + + + Settings + Show Toolbar + + + + + + When checked, the standard toolbar is displayed. + + + + + + + + Settings + Show Statusbar + + + + + + When checked, the bottom statusbar is displayed. + + + + + + + + Settings + Show Navigation Bar + + + + + + When checked, the navigation bar is displayed. + + + + + + + + Settings + Show Comments + + + + + + When checked, the upper-right part of main window, + which contains current entry's comments, will be displayed. + + + + + + + + Settings + Show Tools + + + + + + When checked, the bottom-right part of main window, + which contain search results through the + dictionary, will be displayed. + + + + + + + + Settings + Configure Key Bindings... + + + + + + Opens a configure dialog for binding keys to + actions. This will let you to customize the default + key bindings to suite your needs. + + + + + + + + Settings + Configure Toolbars... + + + + + + Standard toolbar-configuration dialog will open. You can + choose which actions will go in which toolbars and what toolbar + to customize. + + + + + + + + Settings + Configure Kbabel... + + + + + All &kbabel;-specific settings go here. + Please read the &kbabel; Global Settings 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 is what + you are reading now. + + + + + + + + + &Shift;F1 + + + 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 the &kde; Help Center. + This package of tools helps the in process of handling + POT and PO files. + + + + + + + Help + Report Bug... + + + + + + This will open a standard error-reporting dialog + for &kde; + It is useful if + you experience abnormal behavior of &kbabel;. + &kbabel;'s developer will be glad to receive any comments, wishes, and + bug reports. + + + + + + + Help + About KBabel... + + + + + Open a message box which inform you about &kbabel;'s version, developer + name, and e-mail address. + + + + + + + Help + About KDE... + + + + + Open a message box which informs you about the &kde; project, + contact information, and how you can report bugs and + wishes. + + + + + + + Help + About Dictionary + KDE Database Search Engine + + + + + Display a message box with information + about the people who made the &kde; Database Search Engine. + + + + + + + Help + About Dictionary + PO Auxiliary + + + + + + Display a message box with information + about the people who made searching in auxiliary file possible. + + + + + + + + Help + About Dictionary + PO Compendium + + + + + + Display a message box with information + about people who made searching in compendium file possible. + + + + + + + + + +The &kbabel; toolbars + + +Standard Toolbar + + + + + + + + Open + + + Load PO file in &kbabel; for editing. + + + + + + + + + Save + + + Save current PO file if it is modified. + + + + + + + + + Undo + + + Undo last operation. + + + + + + + + + Redo + + + Redo last operation. + + + + + + + + + Cut + + + Cut selected text and move it to the clipboard. + + + + + + + + + Copy + + + Copy selected text to the clipboard. + + + + + + + + + Paste + + + Paste text from clipboard at the 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 other dictionary plugins if available. + + + + + + + + + Stop + + + Stop current search-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 a file is read-only you cannot modify entries + in editor. + + + + + Progress bar + + + Usually, this bar is hidden; it is displayed + only when saving is being done, or if you are searching for messages + in a PO-file, compendium, or elsewhere. + + + + + + + + + +The &catalogmanager; menu + + +The File Menu + + + + + + + &Ctrl;Q + + + File + Quit + + + + + Quits &catalogmanager; + + + + + + + +The Edit Menu + + + + + + + &Ctrl;F + + + Edit + Find in Files... + + + + + + Open Find dialog for searching for strings in a set of PO files. + + + + + + + + + + &Ctrl;R + + + Edit + Replace in Files... + + + + + + Open Replace dialog for searching for and replacing strings in a set of PO files. + + + + + + + + + + Escape + + + Edit + Stop Searching + + + + + + Stop currently running find/replace operation. + + + + + + + + + + &Ctrl;M + + + Edit + Toggle Marking + + + + + + Toggle mark for the selected file. + + + + + + + + Edit + Remove Marking + + + + + + Removes mark for the selected file or folder. + + + + + + + + Edit + Toggle All Markings + + + + + + Toggles marks for the selected file or folder (recursively). + + + + + + + + Edit + Remove All Markings + + + + + + Remove marks for the selected file or folder (recursively). + + + + + + + + +The Tools Menu + + + + + + + &Ctrl;S + + + Tools + Statistics + + + + + + Show statistics about number of translated/untranslated/fuzzy messages + for the selected file or subtree. + + + + + + + + + + &Ctrl;Y + + + Tools + Check Syntax + + + + + + Check syntax for the selected file or subtree using msgfmt. + + + + + + + + +The Settings Menu + + + + + Settings + Show Toolbar + + + + + + When checked, standard toolbar is displayed. + + + + + + + + Settings + Show Statusbar + + + + + + When checked, bottom statusbar is displayed. + + + + + + + + Settings + Configure Key Bindings... + + + + + + Opens a configure dialog for binding keys to + actions. This will let you to customize the default + key bindings to suite your needs. + + + + + + + + Settings + Configure Toolbars... + + + + + + Standard toolbar-configuration dialog will open. You can + choose which actions will go in which toolbars and what toolbar + to customize. + + + + + + + + +The Help Menu +&help.menu.documentation; + + + + + diff --git a/doc/kbabel/msgid2msgstr.png b/doc/kbabel/msgid2msgstr.png new file mode 100644 index 00000000..938ea3ce Binary files /dev/null and b/doc/kbabel/msgid2msgstr.png differ diff --git a/doc/kbabel/next.png b/doc/kbabel/next.png new file mode 100644 index 00000000..f0b977bf Binary files /dev/null and b/doc/kbabel/next.png differ diff --git a/doc/kbabel/nexterror.png b/doc/kbabel/nexterror.png new file mode 100644 index 00000000..1009eae0 Binary files /dev/null and b/doc/kbabel/nexterror.png differ diff --git a/doc/kbabel/nextfuzzy.png b/doc/kbabel/nextfuzzy.png new file mode 100644 index 00000000..5912e52d Binary files /dev/null and b/doc/kbabel/nextfuzzy.png differ diff --git a/doc/kbabel/nextfuzzyuntrans.png b/doc/kbabel/nextfuzzyuntrans.png new file mode 100644 index 00000000..fd373e2f Binary files /dev/null and b/doc/kbabel/nextfuzzyuntrans.png differ diff --git a/doc/kbabel/nextuntranslated.png b/doc/kbabel/nextuntranslated.png new file mode 100644 index 00000000..3b4f8202 Binary files /dev/null and b/doc/kbabel/nextuntranslated.png differ diff --git a/doc/kbabel/pref_diff.png b/doc/kbabel/pref_diff.png new file mode 100644 index 00000000..014ea5ef Binary files /dev/null and b/doc/kbabel/pref_diff.png differ diff --git a/doc/kbabel/pref_edit_appearance.png b/doc/kbabel/pref_edit_appearance.png new file mode 100644 index 00000000..1306704e Binary files /dev/null and b/doc/kbabel/pref_edit_appearance.png differ diff --git a/doc/kbabel/pref_edit_general.png b/doc/kbabel/pref_edit_general.png new file mode 100644 index 00000000..d1542289 Binary files /dev/null and b/doc/kbabel/pref_edit_general.png differ diff --git a/doc/kbabel/pref_fonts.png b/doc/kbabel/pref_fonts.png new file mode 100644 index 00000000..b92e1b7a Binary files /dev/null and b/doc/kbabel/pref_fonts.png differ diff --git a/doc/kbabel/pref_proj_catman.png b/doc/kbabel/pref_proj_catman.png new file mode 100644 index 00000000..1e30bb25 Binary files /dev/null and b/doc/kbabel/pref_proj_catman.png differ diff --git a/doc/kbabel/pref_proj_diff.png b/doc/kbabel/pref_proj_diff.png new file mode 100644 index 00000000..27cb370e Binary files /dev/null and b/doc/kbabel/pref_proj_diff.png differ diff --git a/doc/kbabel/pref_proj_file_commands.png b/doc/kbabel/pref_proj_file_commands.png new file mode 100644 index 00000000..fe83050f Binary files /dev/null and b/doc/kbabel/pref_proj_file_commands.png differ diff --git a/doc/kbabel/pref_proj_folder_commands.png b/doc/kbabel/pref_proj_folder_commands.png new file mode 100644 index 00000000..cf0f742f Binary files /dev/null and b/doc/kbabel/pref_proj_folder_commands.png differ diff --git a/doc/kbabel/pref_proj_source.png b/doc/kbabel/pref_proj_source.png new file mode 100644 index 00000000..278e2ebd Binary files /dev/null and b/doc/kbabel/pref_proj_source.png differ diff --git a/doc/kbabel/pref_search.png b/doc/kbabel/pref_search.png new file mode 100644 index 00000000..cdb5c6d1 Binary files /dev/null and b/doc/kbabel/pref_search.png differ diff --git a/doc/kbabel/pref_wizard_page1.png b/doc/kbabel/pref_wizard_page1.png new file mode 100644 index 00000000..b88b954d Binary files /dev/null and b/doc/kbabel/pref_wizard_page1.png differ diff --git a/doc/kbabel/pref_wizard_page2.png b/doc/kbabel/pref_wizard_page2.png new file mode 100644 index 00000000..e561cff2 Binary files /dev/null and b/doc/kbabel/pref_wizard_page2.png differ diff --git a/doc/kbabel/preferences.docbook b/doc/kbabel/preferences.docbook new file mode 100644 index 00000000..fbaeee10 --- /dev/null +++ b/doc/kbabel/preferences.docbook @@ -0,0 +1,1418 @@ + + + + + + + + + + + + + + + + + + +Preferences + + + +Global and project settings + + +From KBabel 1.10 (KDE 3.4) on, KBabel has the concept of projects and therefore +the settings have been split in two categories: +the global settings and the project settings (also called project configuration). + + + +&GNU; gettext uses a term called "project", which has nothing to do with +KBabel's projects. &GNU; gettext means by project an application which is +related to the PO file. For KBabel, a project is +much bigger. It can mean a set of applications, like &kde;. + + + +KBabel has always a current project, even if it is the +default project. KBabel has not mode without any project. A project is always +for KBabel's editor and KBabel's catalog manager. + + + + +Known limitations of the current implementation + + +Unfortunately the current implementation of projects has a few known problems. + + + +An example is that in the global settings, there is no setting for the default user, +his/her default language and other similar important global user data. It means that such +data must be entered again each time that a new project is created. + + + +Another problem is the new project wizard. It does not ask enough information, especially +it fails to ask for the team email address. So it is recommended to check the project +settings after having run the wizard. + + + +Currently you cannot copy projects from inside KBabel, so apparently you cannot easily share good settings. +However you are free to copy the project outside KBabel and to load the copied project into KBabel. + + + + + +Using KBabel for non-&kde; projects + + +While &kbabel;'s defaults are oriented toward working with and for &kde;, &kbabel; can be used +to translate PO files of other projects. However mostly you will have to tweak the +settings to the need of your project. This is especially true for &GNU; and +&GNU;-like projects, which need quite different defaults than for &kde;. + + + +One problem is that &kbabel; is relatively agressive when saving PO files and +replaces setting of the PO files by settings of the projects, if not told otherwise. +This might look very strange to somebody not used to &kde;. However &kde; has 900+ +POT files to translate for the GUI messages only. +So for such a task, much automatisation is wanted. Taking time to set a project +is little compared to the time gained thereafter. Of course, as non-&kde; user, you +might be less fortunate. You need to do more settings, as the defaults are not entirely suitable +and you will not gain much by doing many translations, as &GNU; projects have typically +only one POT file to translate. + + + + + + + +&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 + + + + +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 +EditUnset 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, ⪚ \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 + + + + +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 &kcontrolcenter;. + + + + 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 + + + + +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 (⪚ 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 + +DictionariesSearch Text +PO Compendium +or by keeping the search button on the toolbar pressed down for a while. + + + + + +Diff + + +Dialog 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 + + + + +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. + + + + + + +New Project Wizard + + +Page 1 + + +Project Wizard Page 1 + + + + +Project Wizard Page 1 + + + + +The first page of the wizard ask about the basic data of the project. + + + + +Project name + +Enter here the name of the project, as it will be displayed in &kbabel;'s menu. + + + +Configuration file name + +Select here a file for holding your project settings. + + + +Language + +Select or enter here the language name used by this project. + + + +Project type + +Select here the type of your project. + + + + + + + +Page 2 + + +Project Wizard Page 2 + + + + +Project Wizard Page 2 + + + + +The second page of the wizard asks about settings related to the +Catalog Manager. + + + + +Base folder for PO files + +Select the base folder where your PO files are. + + + +Base folder for POT files + +Select the base folder where your POT files are. + + + + + +Type in or select the folders that contains all your PO and respectively +POT files. The files and the folders in these folders will then be +merged into one tree in &catalogmanager; window. + + + + + + +Checking Project Stettings + + +As written earlier in this chapter, unfortunately the wizard is very simple and +therefore fails to ask for some important settings. + + + +Now that you have finished your new project, you should verify the main settings in +Project Configure.... +Especially select the Identity page and fix the team email address in +Language mailing list. +(The default one created by the wizard from the language setting is only useful if you are part of a &GNU; project.) + + + +If the project settings are not for KDE, it is recommended that you check the +Save page and checks the settings there. + + + + + + + +Project Settings + + To show the project setting dialog choose +Project Configure... +from &kbabel;'s or &catalogmanager;'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 time 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. + + +Pages for settings for &kbabel; (the editor) and for &catalogmanager; +are in the list. + + + +Identity + +These settings are for &kbabel;. + +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 (&ie; for +Romania). This information is used when updating file headers. You +can find the options that 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. + + + +Number of singular/plural forms + + 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 &GNU; gettext plural forms. + + + + + + + +Save + +These settings are for &kbabel;. + + +TODO This seems to document only the "General" tab but not the "Header" and "Copyright" ones + + + +This section allows you to edit the options for PO file saving. The first +group of checkboxes controls general behavior for actions +performed in PO file saving. + + + + + Update header when saving + +Check this button, to update the header information of the file +every time 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 occurred. You +should keep this validation enabled unless you know what you are doing. + + + + +If you do not want to touch some fields in a PO +file header or want to force updating of specific fields, there are five +checkboxes which control this: 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 EditEdit +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 of the +formats: Default, Local, Custom. + + +You should keep the default setting of Default. The two other settings +make that the generated PO file is not a standard &GNU; gettext PO file +anymore, so this should be avoided. + + + + + 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: + + Year + + + + FormatMeaningRange + + + + + %yyear00 to 99 + + + %Yyear0001 to 9999 + + + +
+ + Month + + + + FormatMeaningRange + + + + + %mmonth of year01 to 12 + + + %fmonth of year1 to 12 + + + %b,%hmonth abbreviationJan to Dec + + + +
+ + Day + + + + FormatMeaningRange + + + + + %jday of the year001 to 366 + + + %dday of month01 to 31 + + + %eday of month1 to 31 + + + %aweekday abbreviationSun to Sat + + + +
+ + Hour + + + + FormatMeaningRange + + + + + %Hhour00 to 23 + + + %khour0 to 23 + + + %ihour1 to 12 + + + %Ihour01 to 12 + + + %pAM or PM + + + +
+ + Minute, Second, Timezone + + + + FormatMeaningRange + + + + + %Mminute00 to 59 + + + %Ssecond00 to 59 + + + %Ztimezone(given in identity settings) + + + %ztimezone(numeric offset as specified by system settings) + + + +
+
+
+ + +The option to select the date format for the PO file is considered to be deprecated, +and will probably be removed in a future version of KBabel. + + +The lower group covers encoding options for PO +files when saving. If you work on the &kde; project you should be aware +that at least PO files must be UTF-8 encoded in &kde;. +Alternatively you can select the encoding corresponding to your locale. +If, for some reason, you do not want to accidentally change the current PO +file encoding, turn on Keep the encoding of the +file. + + +For reason of informtation interchange, &GNU; gettext limits the encodings allowed for a +PO file. &kbabel; does not know of this restriction, so the encoding +correspondig to your locale might not be suitable. (UTF-8 is always supported by &GNU; gettext.) + + +
+ + +Spell Check + +These settings are for &kbabel;. + +Here you can set your spell checking preferences. This is of +interest if you have a dictionary file for the language you are +translating to. Below are the items to consider setting: + + + + Create root/affix combinations not in dictionary + + For new words added to the personal dictionary, + the spell checker will create root/affix + combinations to match more than one word (variations). + + + + Consider run-together words as spelling errors + + If this is turned on, joined words will be treated + as errors. However, such words are very common in + the German language, which have a very large number of + compound words, so it should be left turned off in that case. + + + + Dictionary + + 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. + + + + Encoding + + + 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. + + +The encoding selected here is not linked to encodings of the +PO files. Depending on the spellchecker +(especially in the case of ispell), +you might not have much choice for the encoding. +(For example, a few Western European languages can only work +with ispell when using ISO-8859-1.) + + + + + + Client + + Backend program to use for spell checking. Currently either + ispell (International Ispell) or aspell. + + + + Remember ignored words + + 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. + + + + File to store ignored words + + 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 folder. + + + + + + +Source reference + +These settings are for &kbabel;. + + +Project Settings, source reference + + + + +Project Settings, source reference + + + + +This dialog is for setting how KBabel should construct the full path from each source references, +which are in the comments of each entry of a PO file. + + + +Dialog elements + + +In the edit line Base folder for source code, you can set a +base folder where the source code of your project is. This defines the value of the variable +@CODEROOT@, which is described below. + + + +In the group Path Patterns, you can define patterns or rules +to construct the paths with the help of a few variables: +@CODEROOT@, @PACKAGEDIR@, +@PACKAGE@, @COMMENTPATH@, +@POFILEDIR@, which are defined below. + + + +The variable @PODIRFILE@ was introduced in &kbabel; version 1.11.1 (for &kde; 3.5.1). + + + +With the button Add, you can add the line from the text box +to the list of used path patterns. With the button Remove, +you can remove the selected pattern from the list. With the buttons +Up and Down, you can change the priority of +the path patterns. + + + + + +The variables + + + +@CODEROOT@: The base folder of the source code. + + +@PACKAGEDIR@: The folder of the package (i.e. PO file). + + +@PACKAGE@: The package name (i.e. PO file name without extension). + + +@POFILEDIR@: The folder of the PO file. + + +@COMMENTPATH@: The relative path given as source reference in the comment of an entry of the PO file. + + + + +The variables @PACKAGEDIR@ and @POFILEDIR@ have similar +meaning but not the same result. The variable @POFILEDIR@ +will always hold the folder of PO file, +@PACKAGEDIR@ might not. If the PO file was loaded +by the help of the &catalogmanager; then @PACKAGEDIR@ has only the part of +the path, based on the PO base path defined for the &catalogmanager; +(see below). + + + +The variables @CODEROOT@ and @POFILEDIR@ can only be used at +the beginning of a pattern to be useful. The variable @COMMENTPATH@ can only be used at the +end of a pattern and is nearly mandatory. +The variables @PACKAGEDIR@ and @POFILEDIR@ +should not be used in the same pattern. The variables @CODEROOT@ and @POFILEDIR@ should not be used in the same pattern either. + + + + + +The default path patterns + + +From &kbabel; 1.11.1 (of &kde; 3.5.1) on, there are five default path patterns: + + + + +@PACKAGEDIR@/@PACKAGE@/@COMMENTPATH@ + + +@CODEROOT@/@PACKAGEDIR@/@PACKAGE@/@COMMENTPATH@ + + +@CODEROOT@/@PACKAGE@/@COMMENTPATH@ + + +@POFILEDIR@/@COMMENTPATH@ + + +@POFILEDIR@/../@COMMENTPATH@ + + + + +&kde; projects need typically the third pattern. +The last pattern is typical for &GNU; projects, where the source references are related to +the parent of the directory where the PO file is. + + + + + +Creating New Path Patterns + + +In most cases the default path patterns should be enough, whatever +the project is for KDE (assuming that you have set the correct base directory) +or if the project is a &GNU; one (or structured like a &GNU; project). + + + +For &kde;, some PO files do not contain enough information +(including the file path and name) for &kbabel; to find the right source file +that is supposed to be refered. To fix that you would need precise path patterns +for such files, which is nearly impossible to define by the numbers of such files +in &kde;. But if you work often with such a file, may be it is worth to set +a path pattern explicitely for supporting that PO file. + + + +For creating your own path patterns, you can use the variables defined above, +but apart @COMMENTPATH@ not any variable is mandatory to use. +(To be exact, @COMMENTPATH@ is not mandatory either, +but not using it will probably lead to no result.) + + + +An example of path pattern could be that you want to display the source reference +of &kde;'s file desktop_kdebase.po. In that case you will probably need a path pattern like: +@CODEROOT@/@PACKAGEDIR@/kdebase/@COMMENTPATH@ +(compared to one of the default path patterns, the sequence @PACKAGE@ has been +replaced by kdebase). + + + +In case of really complex problems you can, of course, define an absolute path +without any variables beside @COMMENTPATH@, like for example: +/home/usr/kde-source/kdebase/@COMMENTPATH@ assuming that +/home/usr/kde-source/kdebase is the path where the kdebase source module is. + + + + + + + +Miscellaneous + +These settings are for &kbabel;. + + +Miscellaneous section +holds &kbabel; settings that do not fit anywhere else. + + + + + Marker for keyboard accelerator + + Here you can select your own character to serve + as the keyboard accelerator indicator in a &GUI;. + By default it is & (ampersand), but in some + programming 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 inexperienced users "regular expression" may sound strange. + So you are advised to change the default value + only if you know what you are doing. Some &GUI; programming + toolkits provide their own context information description + methods. Consult an experienced developer if you + translate PO files other than standard &kde; files. + For the sake of completeness I will "translate" for you what the + default regular expression means: + "the text matches if it starts with _: and is followed + by one or more characters and ends with a newline". + + + + + + + + +Project folders + +These settings are for &catalogmanager;. + + +Here are two edit lines with folder buttons. +Type in or select the folders that contains all your PO and respectively +POT files. The files and the folders in these folders 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 the program closes by sending a kill signal to them. + + It's not guaranteed that the processes are killed. + + + + + Create index for file contents + + If you check this, &kbabel; will create an index of contents for every + file in the tree. This index is then used in find/replace operations. + There is a large speed trade-off. If you enable + Create index for file contents, the updating of + file information will be much slower. On the other hand, it speeds up + find/replace operations considerably. + + + + + + +Folder Commands + +These settings are for &catalogmanager;. + + +Project Settings,folder commands + + + + +Project Settings, folder commands + + + + +Here you can insert commands you want to execute in folders from the +Catalog Manager. The commands are then shown in the submenu +Commands +in the Catalog Manager's context menu. + + +Insert in the Command Label field the +label of the command. The label can be chosen freely and is only used to be displayed +in the menu. In the Command field insert the command you want to +have executed when selecting the corresponding menu item. Then press the Add +button to add the command to your available commands. +To edit a command, select it, press the +Edit button and press Add after you have +finished. To remove a command, select it from the list and press the +Remove button. If you want a different order in the contextual +submenu, you can use the 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 to. The commands are executed in the (PO file) folder you have +selected in the Catalog Manager. + + +The following strings will be replaced in a command: + + + + + @PACKAGE@: The name of the folder without path + + + @PODIR@: The name of the PO-folder with path + + + @POTDIR@: The name of the template folder with path + + + + +E.g.: If you want to execute make and then make +install you could insert in Make install in the +Name field, and make; make install +in the Command field. If you then select +Commands +Make install +from the context menu of a folder, the commands listed above will be +executed in that folder. + + + + +File Commands + +These settings are for &catalogmanager;. + + +Project Settings, file commands + + + + +Project Settings, 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 the Command Label field the label of the command. The label can be +chosen freely and is only used to be displayed in the menu. In the +Command field insert the command you want to have executed when +selecting the corresponding menu item. Then press the Add button +to add the command to your available commands. To edit a command, select it, press +the Edit button and press the Add button after you have +finished. To remove a command, select it from the list and press the +Remove button. If you want a different order in the contextual +submenu, you can use the 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) folder, 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 folder the PO file is in, with path + + + @POTDIR@: The name of the folder the template file is + in, with path + + + +For example, if you want to merge the template file into your PO file you could +insert Merge in the Name field and +msgmerge @POFILE@ @POTFILE@ > @PACKAGE@.new && mv @PACKAGE@.new +"@PACKAGE@.po in the Command field. +If you then select +CommandsMerge +from a file's context menu, the PO file will be merged with its template file. + + + + +Catalog Manager + +These settings are for &catalogmanager;. + + +Project Settings, &catalogmanager; + + + + +Project Settings, &catalogmanager; + + + +The checkboxes switches on or off the corresponding column of the &catalogmanager;'s view. + + + + +Diff + +These settings are for &catalogmanager;. + + +Project Settings, diff + + + + +Project Settings, diff + + + +TODO + + + +
+
+ diff --git a/doc/kbabel/preverror.png b/doc/kbabel/preverror.png new file mode 100644 index 00000000..d589b53b Binary files /dev/null and b/doc/kbabel/preverror.png differ diff --git a/doc/kbabel/prevfuzzy.png b/doc/kbabel/prevfuzzy.png new file mode 100644 index 00000000..2e4cedfa Binary files /dev/null and b/doc/kbabel/prevfuzzy.png differ diff --git a/doc/kbabel/prevfuzzyuntrans.png b/doc/kbabel/prevfuzzyuntrans.png new file mode 100644 index 00000000..cf6f43d4 Binary files /dev/null and b/doc/kbabel/prevfuzzyuntrans.png differ diff --git a/doc/kbabel/previous.png b/doc/kbabel/previous.png new file mode 100644 index 00000000..167e39e7 Binary files /dev/null and b/doc/kbabel/previous.png differ diff --git a/doc/kbabel/prevuntranslated.png b/doc/kbabel/prevuntranslated.png new file mode 100644 index 00000000..796a4e3d Binary files /dev/null and b/doc/kbabel/prevuntranslated.png differ diff --git a/doc/kbabel/redo.png b/doc/kbabel/redo.png new file mode 100644 index 00000000..d6b3e8f1 Binary files /dev/null and b/doc/kbabel/redo.png differ diff --git a/doc/kbabel/roughtranslation.png b/doc/kbabel/roughtranslation.png new file mode 100644 index 00000000..cd96526c Binary files /dev/null and b/doc/kbabel/roughtranslation.png differ diff --git a/doc/kbabel/snap1.png b/doc/kbabel/snap1.png new file mode 100644 index 00000000..55e3c9cd Binary files /dev/null and b/doc/kbabel/snap1.png differ diff --git a/doc/kbabel/snap_catalogmanager.png b/doc/kbabel/snap_catalogmanager.png new file mode 100644 index 00000000..20aff2ec Binary files /dev/null and b/doc/kbabel/snap_catalogmanager.png differ diff --git a/doc/kbabel/snap_kbabeldict.png b/doc/kbabel/snap_kbabeldict.png new file mode 100644 index 00000000..58d9db14 Binary files /dev/null and b/doc/kbabel/snap_kbabeldict.png differ diff --git a/doc/kbabel/snap_kbabeldict2.png b/doc/kbabel/snap_kbabeldict2.png new file mode 100644 index 00000000..562862e7 Binary files /dev/null and b/doc/kbabel/snap_kbabeldict2.png differ diff --git a/doc/kbabel/stop.png b/doc/kbabel/stop.png new file mode 100644 index 00000000..1cabc6e9 Binary files /dev/null and b/doc/kbabel/stop.png differ diff --git a/doc/kbabel/top.png b/doc/kbabel/top.png new file mode 100644 index 00000000..b626bf42 Binary files /dev/null and b/doc/kbabel/top.png differ diff --git a/doc/kbabel/transsearch.png b/doc/kbabel/transsearch.png new file mode 100644 index 00000000..06d5852c Binary files /dev/null and b/doc/kbabel/transsearch.png differ diff --git a/doc/kbabel/undo.png b/doc/kbabel/undo.png new file mode 100644 index 00000000..f5ad210d Binary files /dev/null and b/doc/kbabel/undo.png differ diff --git a/doc/kbabel/using.docbook b/doc/kbabel/using.docbook new file mode 100644 index 00000000..091361e6 --- /dev/null +++ b/doc/kbabel/using.docbook @@ -0,0 +1,791 @@ + + + + + + + + + + + + + + + + + + +Using &kbabel; + + +Introduction + +Usually program messages and documentation are written in +English. Using a framework made of a set of tools and libraries, it +is possible to have your favorite applications speak your native +non-English language. This process of adapting an application to a +specific language is known as localization. The localization process +includes translating the program's interfaces and documentation to the +various languages users need and, in some countries or regions, making +the inputs and outputs conform to particular conventions. &kbabel; is +a tool which will assist you in the localization process to +make an application's interface speak many languages. + + Every internationalization-aware program makes available for +translation one or more message-catalog files. The extension of these +files is .pot. +POT is an acronym for Portable Object +Template. + + +Each translator takes a copy of one of these POT templates and +begins to fill in the blanks: each message is translated into the +language desired. The file containing the translated text is referred +to as a PO (Portable Object) file. + + + +Once all the messages have been translated, the +PO file is compiled into a machine-readable binary +format, known as a MO (Machine Object) file. These +files, which will be stored with a .mo extension +(or a .gmo extension to show +that they were processed by &GNU; gettext), act as a database to +minimize the time taken by the applications to look up each translated +message. + + + This suggests a question: do I need to know what is +inside a PO file even though I have &kbabel;? The +answer is, undoubtedly, yes. There are situations when a message +catalog can become corrupted and needs to be manually fixed. Most of +these problems are the so-hated CVS or SVN conflicts which +occur when a translating process is coordinated by a version management +system, like CVS or Subversion (SVN). +&kbabel; cannot help you much if a problem like this arises so a +text editor and some knowledge of PO-files are +needed. Let's see how a PO file is made. + +PO files consist of pairs of messages—a +msgid and a msgstr. The +msgid is the text in English and the msgstr is the text translated +into the appropriate language. The text that accompanies each msgid +and msgstr is enclosed within C-like double quotes. An example, taken +from a PO file for &noatun;, is msgid +"Open a Playlist" + + + +Empty lines and those starting with # are +ignored. Lines starting with a # represent comments and are a useful +way of providing a note detailing which file this message is going +to be used in and, in the case of the application writers, to provide +additional comments to help translation. &kbabel; displays these +comment lines for every message. + +In many cases the first msgid-msgstr pair in +PO file is a fake entry (acting as +PO file header) that contains various information +about the translated PO file, such as the +application name, translating date, translator name and so on. + + +An useful feature is called plural forms. +English uses only singular and one plural form of nouns, ⪚ 1 file + and 10 files. This leads many developers +to an idea that the world is that simple and they can use messages like +Do you want to delete %1 file(s)?, where +%1 denotes a number of files to be deleted. +But this is fundamentally wrong and for many languages such a kind of translation +will not work. For Slovak translation you need 3 different +forms of the message. This number is different for different languages +and even when it is the same, ⪚ Czech uses 3 forms as well, the rule to decide which +form to use can be very different. Plural forms in PO files are here to help. + + + +&kde; developers have chosen a different implementation for the plural forms than +&GNU; gettext and they have introduced their own +format and handling for them. +It is planned to use &GNU; gettext's plural forms in &kde; version 4. + + + + + +Editor + +Here is a screenshot of &kbabel;. + + +Screenshot of &kbabel; + + + + +Screenshot of &kbabel; + + + + +For convenience &kbabel; has +toolbars to speed up many operations and, for busy users, there are +many keyboard shortcuts. The main window is divided into four +parts. + + +The upper-left edit box is read-only and +contains the current msgid field from the opened PO-file and its +English text. + +The bottom-left edit box contains the +msgstr field related to the msgid shown and here you can edit the +translated text. + +The top-right part of the window is a comments +panel where you can view the comments added for entry currently being +edited. + +It can be used: + + + +to find out how the current message is treated by the +application (c-formatted or simple) + + +in some cases, to read helpful comments added by the application's +developer to assist the translators in their work—for example, +there may be technical hints (used to great effect in the +LyX project) + + +when you need to know which file a message is from because you +want to report a spelling mistake in the original English string. + + + + +The editor window (in the bottom right) is the most sophisticated part +of &kbabel;'s main window. Its size can be +adjusted using the splitter line between it and the comment panel +(the panel in the top right). +The editor window has two tabbed panels—one storing search +information, the other context information. The context information +tab contain a scrolled view which shows the previous and next 4 entries +associated with the current entry—essentially it's a small +'snapshot' of the PO file. While translating, it is very common for +message strings to be related to subsequent and previous messages, +so the context panel is useful for looking at the nearby messages to +get a hint as to how the current message can best be +translated. Dialog interface translation is a good example, or widgets +with their associated text and "what's this" message. + + + +More &kbabel; Features + + +Each msgid entry can be in three states: + + + + + untranslated + + + there is no translated text currently associated with the msgstr + + + + + fuzzy + + + msgmerge has tried to match a translated + string by 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 + + + the msgid is the completed translated form of the msgstr + + + + + +The state of the current entry is indicated by two +LEDs. Depending on your configuration these can +either be in the status bar or above the translated +string edit box. Both have a customizable color (to +reflect your visual requirements or taste). Please read the Preferences section to see how you can +adjust these settings. + + + + + + +Advanced Translation + + +Now you have an idea how to translate a PO-file. In this section we will follow the standard way +of translating a new PO-file using the advanced features of &kbabel;. We assume you have already +opened a template POT-file and saved it as a PO file. + + + +Navigation in PO-file +&kbabel; allows you to easily navigate through the file according to the state of their +translation. The untranslated/fuzzy status was introduced already. A message can be marked as erroneous +as a result of validation checking or validation done by msgfmt. +And, of course, &kbabel; supports browsing the history of visited messages with +Forward/Back, like in &konqueror;. + +All commands for navigation are in Go menu. + + + + + + +Page Up +Move to the previous message + + +Page Down + Move to the next message + + +&Ctrl;Page Up +Move to the previous fuzzy message + + +&Ctrl;Page Down +Move to the next fuzzy message + + +&Alt;Page Up +Move to the previous untranslated message + + +&Alt;Page Down +Move to the next untranslated message + + +&Shift;Page Up +Move to the previous error message + + +&Shift;Page Down +Move to the next error message + + +&Ctrl;&Shift;Page Up +Move to the previous fuzzy or untranslated message + + +&Ctrl;&Shift;Page Down +Move to the next fuzzy or untranslated message + + + + + + + +Clever editing +Clever editing means that the editor will help you +easily edit the translation while taking into account specials of the PO format. +It will correctly escape as necessary. + +It also supports more than +one mode for inserting end of the line. This is very useful because of the way +gettext handles end of the lines. It simply ignores them. (You can imagine that +all the text in msgstr is a single line.) If you want insert a real end of the +line, you need to insert \n. But most of translators +do not realize, that a new line in msgstr does not +add any space between the lines. This can be easily solved by adding a space +at the end of every line. But you can easily forget, so clever editing does this automatically +for you. + +The table below summarizes clever editing features. + + + + + + +Tab +Insert \t + + +" +Insert \" + + +Enter +If the last character before cursor is not a space, insert one space. +Then start a new line. + +&Ctrl;Enter +Start a new line without any additional logic + + +&Shift;Enter +Insert \n and start a new line + + + + + + +If you want to see where spaces are, you can turn on Highlight background +and/or Mark whitespaces with points in preferences dialog +on tab Edit Appearance. + + + + + +Automatic translation +As the first step when starting a new translation, &kbabel; provides a function +for automatic filling of the messages translations by the older translations. Choose +ToolsRough Translation + +and &kbabel; will present the following dialog: + + + +Rough translation dialog + + + + + + + + +In the dialog, you should specify what to translate and choose the sources for +the old translations. + + +At the top of the What to translate frame are three +checkboxes (Untranslated entries, Fuzzy entries +, Translated entries) for specifying the kind of +messages you want to translate. Untranslated and fuzzy entries are natural +choices for automatic translation, but you can change already translated +messages as well. + + +The exact matching for msgids will always be used for +rough translation. However, you can add more strategies, &ie; +Allow fuzzy translation (slow) and +Allow single word translation. Both of these +additional strategies must be supported by the sources used (see below). +There is no specification, what does fuzzy translation mean, +but the purpose is quite obvious. Single word translation +is suitable for only some of the languages. &kbabel; will try to translate +each word in msgid separately and then +put the translated words (or phrases) in the same order in msgstr +. + + +As a source for rough translation, any dictionary module available can be +used. There is a list of Don't use modules and +Use modules. Modules are used in the order +in the Use list. First module is asked for +translation. If it is not found, next module in the list is asked and so on. +You can use the buttons with arrows for moving modules between the +lists. Don't forget to change the order to suit your needs by Move Up + and Move Down buttons. + + +Normally &kbabel; will mark every roughly translated message as +fuzzy, because it assumes that any automatic translation needs to +be reviewed by a translator. If you are 100% sure that the automatic +translation will be correct, or you will review all the translation anyway. +Mark changed entries as fuzzy allows you to +turn off this automatic fuzzy marking, but you will need to confirm this. + + +If you have set all the options to suit your needs, push Start + to automatically translate messages. You can follow the +progress bar and in case, there is always the Stop +button. + + + + +Validate your translation +Everyone makes mistakes. So &kbabel; supports a number +of checks for typical problems in translations. These checks (not +syntax check) can be basically performed in two ways. + +Checks can be done at each change of the translated text. These +are called automatic checks and they can +be turned on in the &kbabel; configuration dialog. +Automatic checking of syntax is possible at each saving of the file. + + +The automatic checks can slow down &kbabel;. If you have a slower +computer, you can turn off the automatic checks and use only the +second possibility. You can invoke every kind of check from the +Tools +Validation. Then the check is +performed for all messages in the file and faulty ones are marked as errors. + + + + Check Syntax + + + This invokes msgfmt to check validity of the PO file + as seen by &GNU; gettext package. It will show the result of the command + and mark error msgstrs. + + + + + Check Arguments + + + Incorrect translations can crash the application. The most dangerous + parts of translation are arguments, ⪚ for printf-like functions. This check + compares the number and types of the arguments in msgid + and msgstr. They must match. + + + + + Check Accelerators + + + &GUI; text commonly contain accelerators, &ie; letters which can be used + for fast access to &GUI; elements by keyboard. They are denoted by + special character, ⪚ & in &kde;. Typical requirement of the + translation is that translated text should contain accelerator as well. + This check will notice this problem for you. The accelerator character + can be specified in Preferences on Misc tab. + + + + + Look for Translated Context Info + + + You will probably need this only for &kde; translation. Some of the text are too common + and they need to be translated differently in different contexts. In &kde; the context + is described at the beginning of msgid after the special sequence + :_. But if some translators are not aware of this convention + and they try to translate context information as well. This check will try to find these. + If the check founds translated context information, you should remove it. + + + + + Check Plural Forms + + + If the msgid is specified as a plural form, + the translation has to contain the correct number of translations separated by + \n. The correct number depends on the language of + translation and is specified on Identity tab in + Preferences dialog. This is implemented only for &kde; at the moment. + + + + + Check Equations + + + Equations are special format of msgid typically + used in .desktop files. + And because your translations will be merged back to these files, msgstr + must use this special format as well. This means that the translation must start (up to the + first occurrence of = with the same text as the original message, ⪚ + Name=. + + + + + + + + +Spellchecking the translation +As always, it is very important to spell-check your translation before +using your result. This way you can find typos and other problems in your translation. +&kbabel; uses the standard &kde; library for spellchecking and its standard +settings can be found in the project setting dialog. Spell checking itself can be found in +ToolsSpelling + submenu. +You can use a number of modes for spell checking: + + + + Spell check... + + + This is a generic invocation of a dialog where you can choose + the spellchecking mode and set the default mode. This is + invoked by pressing &Ctrl;I + . + + + + + Check All... + + + Spellcheck all messages in the file. + + + + + Check from Cursor Position... + + + Start spellchecking at the position in the current message and + progress towards the end of the file. + + + + + Check Current... + + + Spellcheck the current message only. + + + + + Check Selected Text... + + + If there is a selected text in msgstr editor, + this option is available and will spellcheck this text only. + + + + + + + +Translating &XML;, <acronym>HTML</acronym>, ... + +Markup languages are used more and more in &GUI;. +&kde; project also uses PO-files for translating +DocBook documentation files (which is also a markup language). &kbabel; +contains quite a lot of functionality to support this trend. + + + +Here, we will describe only functions related to tags used for markup itself. The +other problem introduced by using markup languages is translation of +longer texts. This issue is addressed by the diff +feature described in the following section. + + + +The current version of &kbabel; is capable to find out which tags are +used in msgid and provide an easy access to +them using following actions from the Edit: + + + + + + Insert Next Tag + + + + + This inserts next tag found in msgid to the translation. &kbabel; finds + the tag to be inserted by counting the number of tags from the + beginning of the translation. + + + + + + + + Edit + Insert Tag + + + + + + This submenu contains all different markup tags found in original english string. + By selecting a tag you can insert it at the current position of cursor in translated text. + translation. + + + + + + + + +Showing the difference + +As explained already, current applications, trying to be user friendly, contain a lot of +longer descriptive texts, including markup. If a developer changes +a part of the text, the &GNU; gettext system will, in the best case, retain the old +translation and mark it as fuzzy. (In the worst case you will lose the translation +completely, depending on the size of the text changes). This works OK, if +a msgid is short, because then you can find +the changes quickly. But if the text is long enough, you will struggle to find out +what has been changed (For example, it can be only an article change by proof-reading team.) + + +To help, &kbabel; can be asked to lookup the original msgid +and to show the difference. The changes are graphically displayed in +the Original String window. The exact method can +be set in the &kbabel; +configuration dialog. Tools +Diff Show Diff + will show the differences found. To see the current text +without the mixture of original text and differences, use Tools +Diff Show Original Text +. + + +You can turn automatic lookup of difference on and off by choosing +Tools +Diff Diff Mode +. When the diff mode is on, difference searching starts when you +go to another message. + + +As always, you can use different sources for finding the old version of the +text, all being set in in &kbabel; configuration dialog: + + + + Translation Database + + + You can use Translation Database for difference lookup. + We strongly recommend to turn on the automatic storing of the newly translated messages + into Translation Database in + Translation Database configuration dialog. + This mode can be turned on by Use messages from Translation + Database. + + + + + Tree of the old files + + + This will be used only if searching in Translation Database is turned off. + By setting Base folder for diff files you can + navigate &kbabel;, which file to use for difference. + It takes the relative path of the opened file and uses this relative + path in the folder specified here. If there is a corresponding file, it will + be used. To use this mode, you should make a copy of + old files before each update. + + + + + Manually chosen file + + + If the previous possibility does not work, correctly, you can always + set the difference file manually by choosing + ToolsDiff + Open File for Diff. + + + + + + +The difference lookup is not always accurate, because the +PO-file does not contain any reference to the original +message. + + + + + + + +Plural Forms + +Because plural forms are quite a complicated issue, we devote a special section +for their support in &kbabel;. + + + +This section handles about &kde; plural forms (to be precise of &kde; version 3). +From &kbabel; version 1.11 (KDE 3.5) on, &kbabel; should be able to +read, edit and save the &GNU; gettext plural forms too. + + + +Every language to which &kde; is translated must have set a correct +number of plural forms. This is done by translating a specific entry in kdelibs.po. +The number is set by selecting the name of a language, which uses +the same number and rules for finding the +right plural form. The up-to-date list of possible values can be found in the +kdelibs source code, in the file kdecore/klocale.cpp. + + + +&GNU; gettext allows to define the number and type of plural forms by a formula and to set this +formula independently for each PO file. &kde; can only define the number and type of plural forms +one time in kdelibs. + + + +&kde; plural forms are denoted by comment _n: (including a trailing space) containing +the %n argument. This argument is then used in the message +itself and it controls which plural form of your language should be used +depending on the rules for your language. + + +The translation of a plural form message has to have a special format. +It must contain the correct number of translations (one for each plural form) +separated by an end of the line \n, +without any _n: sequence (without the space either). For example, +_n: Selected 1 file\nSelected %n files translated to Slovak would be: + + +Vybraný %n súbor\n +Vybrané %n súbory\n +Vybraných %n súborov + + +To check if your translation contains the correct number of +plural forms, use the Tools Validation + Check Plural Forms (KDE only) + menu. + + + + + -- cgit v1.2.1