summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@digia.com>2013-03-25 11:02:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-12 09:34:11 +0200
commit027b8f89a401ec17745bc73a290bc64c605a9072 (patch)
tree930fb1daf68621e7061a99a2ea39dcc2a3e62af9
parent615b6d673d928af3b0dddb7d645179e333fcc2e4 (diff)
downloadqttools-027b8f89a401ec17745bc73a290bc64c605a9072.tar.gz
Doc: rewrite Translators topic in Qt Linguist Manual
Make the topic task-oriented. Move information around and remove redundancy. Check the paths to commands and availability of commands. Make docs reflect some changes in functionality. Remove images of toobar buttons that are no longer referred to in text. Change-Id: I7f9743d35ceebfc0f7097a1af2e12eeb344c8e58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--src/linguist/linguist/doc/images/linguist-batchtranslation.pngbin17116 -> 28270 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-doneandnext.pngbin1849 -> 1320 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-editcopy.pngbin1614 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-editcut.pngbin1896 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-editfind.pngbin1944 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-editpaste.pngbin1989 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-editredo.pngbin1787 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-editundo.pngbin1768 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-fileopen.pngbin2309 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-fileprint.pngbin1732 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-filesave.pngbin1894 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-linguist.pngbin201717 -> 226700 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-linguist_2.pngbin260946 -> 228482 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-menubar.pngbin1492 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-next.pngbin908 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-nextunfinished.pngbin1928 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-phrasebookdialog.pngbin36034 -> 38112 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-phrasebookopen.pngbin1571 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-prev.pngbin911 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-previewtool.pngbin74735 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-prevunfinished.pngbin1883 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-toolbar.pngbin19941 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-translationfilesettings.pngbin49604 -> 17953 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-validateaccelerators.pngbin2159 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-validatephrases.pngbin2251 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-validateplacemarkers.pngbin1994 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-validatepunctuation.pngbin1851 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/images/linguist-whatsthis.pngbin1948 -> 0 bytes
-rw-r--r--src/linguist/linguist/doc/src/linguist-manual.qdoc1084
29 files changed, 351 insertions, 733 deletions
diff --git a/src/linguist/linguist/doc/images/linguist-batchtranslation.png b/src/linguist/linguist/doc/images/linguist-batchtranslation.png
index 2423e9e22..436f6dde1 100644
--- a/src/linguist/linguist/doc/images/linguist-batchtranslation.png
+++ b/src/linguist/linguist/doc/images/linguist-batchtranslation.png
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-doneandnext.png b/src/linguist/linguist/doc/images/linguist-doneandnext.png
index 18f2fb653..258b0d220 100644
--- a/src/linguist/linguist/doc/images/linguist-doneandnext.png
+++ b/src/linguist/linguist/doc/images/linguist-doneandnext.png
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-editcopy.png b/src/linguist/linguist/doc/images/linguist-editcopy.png
deleted file mode 100644
index d542c3b21..000000000
--- a/src/linguist/linguist/doc/images/linguist-editcopy.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-editcut.png b/src/linguist/linguist/doc/images/linguist-editcut.png
deleted file mode 100644
index 38e55f742..000000000
--- a/src/linguist/linguist/doc/images/linguist-editcut.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-editfind.png b/src/linguist/linguist/doc/images/linguist-editfind.png
deleted file mode 100644
index 6ea35e930..000000000
--- a/src/linguist/linguist/doc/images/linguist-editfind.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-editpaste.png b/src/linguist/linguist/doc/images/linguist-editpaste.png
deleted file mode 100644
index 717dd8675..000000000
--- a/src/linguist/linguist/doc/images/linguist-editpaste.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-editredo.png b/src/linguist/linguist/doc/images/linguist-editredo.png
deleted file mode 100644
index 9d679fe6f..000000000
--- a/src/linguist/linguist/doc/images/linguist-editredo.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-editundo.png b/src/linguist/linguist/doc/images/linguist-editundo.png
deleted file mode 100644
index eee23d24a..000000000
--- a/src/linguist/linguist/doc/images/linguist-editundo.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-fileopen.png b/src/linguist/linguist/doc/images/linguist-fileopen.png
deleted file mode 100644
index 1b3e69f6a..000000000
--- a/src/linguist/linguist/doc/images/linguist-fileopen.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-fileprint.png b/src/linguist/linguist/doc/images/linguist-fileprint.png
deleted file mode 100644
index 2afb769ee..000000000
--- a/src/linguist/linguist/doc/images/linguist-fileprint.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-filesave.png b/src/linguist/linguist/doc/images/linguist-filesave.png
deleted file mode 100644
index 46eac82ad..000000000
--- a/src/linguist/linguist/doc/images/linguist-filesave.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-linguist.png b/src/linguist/linguist/doc/images/linguist-linguist.png
index 303d20b7e..db9dee685 100644
--- a/src/linguist/linguist/doc/images/linguist-linguist.png
+++ b/src/linguist/linguist/doc/images/linguist-linguist.png
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-linguist_2.png b/src/linguist/linguist/doc/images/linguist-linguist_2.png
index 9ef1c2c68..d0520ed36 100644
--- a/src/linguist/linguist/doc/images/linguist-linguist_2.png
+++ b/src/linguist/linguist/doc/images/linguist-linguist_2.png
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-menubar.png b/src/linguist/linguist/doc/images/linguist-menubar.png
deleted file mode 100644
index bc510be52..000000000
--- a/src/linguist/linguist/doc/images/linguist-menubar.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-next.png b/src/linguist/linguist/doc/images/linguist-next.png
deleted file mode 100644
index 7700d6fce..000000000
--- a/src/linguist/linguist/doc/images/linguist-next.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-nextunfinished.png b/src/linguist/linguist/doc/images/linguist-nextunfinished.png
deleted file mode 100644
index 05c92bdf8..000000000
--- a/src/linguist/linguist/doc/images/linguist-nextunfinished.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-phrasebookdialog.png b/src/linguist/linguist/doc/images/linguist-phrasebookdialog.png
index eb5da708d..54ab836c1 100644
--- a/src/linguist/linguist/doc/images/linguist-phrasebookdialog.png
+++ b/src/linguist/linguist/doc/images/linguist-phrasebookdialog.png
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-phrasebookopen.png b/src/linguist/linguist/doc/images/linguist-phrasebookopen.png
deleted file mode 100644
index 1b354555e..000000000
--- a/src/linguist/linguist/doc/images/linguist-phrasebookopen.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-prev.png b/src/linguist/linguist/doc/images/linguist-prev.png
deleted file mode 100644
index 99dc8733c..000000000
--- a/src/linguist/linguist/doc/images/linguist-prev.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-previewtool.png b/src/linguist/linguist/doc/images/linguist-previewtool.png
deleted file mode 100644
index c4fca3cf5..000000000
--- a/src/linguist/linguist/doc/images/linguist-previewtool.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-prevunfinished.png b/src/linguist/linguist/doc/images/linguist-prevunfinished.png
deleted file mode 100644
index 15c13eaf4..000000000
--- a/src/linguist/linguist/doc/images/linguist-prevunfinished.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-toolbar.png b/src/linguist/linguist/doc/images/linguist-toolbar.png
deleted file mode 100644
index b45c31b0f..000000000
--- a/src/linguist/linguist/doc/images/linguist-toolbar.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-translationfilesettings.png b/src/linguist/linguist/doc/images/linguist-translationfilesettings.png
index e524c05a9..f93cc4187 100644
--- a/src/linguist/linguist/doc/images/linguist-translationfilesettings.png
+++ b/src/linguist/linguist/doc/images/linguist-translationfilesettings.png
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-validateaccelerators.png b/src/linguist/linguist/doc/images/linguist-validateaccelerators.png
deleted file mode 100644
index 4f726487f..000000000
--- a/src/linguist/linguist/doc/images/linguist-validateaccelerators.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-validatephrases.png b/src/linguist/linguist/doc/images/linguist-validatephrases.png
deleted file mode 100644
index 30c3ee61b..000000000
--- a/src/linguist/linguist/doc/images/linguist-validatephrases.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-validateplacemarkers.png b/src/linguist/linguist/doc/images/linguist-validateplacemarkers.png
deleted file mode 100644
index cc127fde9..000000000
--- a/src/linguist/linguist/doc/images/linguist-validateplacemarkers.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-validatepunctuation.png b/src/linguist/linguist/doc/images/linguist-validatepunctuation.png
deleted file mode 100644
index 3492f95eb..000000000
--- a/src/linguist/linguist/doc/images/linguist-validatepunctuation.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/images/linguist-whatsthis.png b/src/linguist/linguist/doc/images/linguist-whatsthis.png
deleted file mode 100644
index 0b5d46aad..000000000
--- a/src/linguist/linguist/doc/images/linguist-whatsthis.png
+++ /dev/null
Binary files differ
diff --git a/src/linguist/linguist/doc/src/linguist-manual.qdoc b/src/linguist/linguist/doc/src/linguist-manual.qdoc
index 78e87ccbb..975f56f5e 100644
--- a/src/linguist/linguist/doc/src/linguist-manual.qdoc
+++ b/src/linguist/linguist/doc/src/linguist-manual.qdoc
@@ -307,410 +307,143 @@
\previouspage Qt Linguist Manual: Release Manager
\nextpage Qt Linguist Manual: Developers
- \QL is a tool for adding translations to Qt applications. Run \QL
- from the taskbar menu, or by double clicking the desktop icon, or
- by entering the command \c {linguist} at the command line. Once
- \QL has started, choose \menu{File|Open} from the \l{menubar}
- {menu bar} and select a translation source (TS file) to
- load. If you do not have a TS file, see \l {Qt Linguist
- Manual: Release Manager}{Release Manager} to learn how to
- generate one.
-
- The \QL main window is divided into several, dockable subwindows
- arranged around a central \l{The Translation Area} {translation
- area}. The \l{Context Window} {context list} is normally shown
- on the left, and the \l{Sources and Forms Window} {source code},
- \l{Strings Window} {string list}, and either the \l{Phrases and
- Guesses Window} {phrases and guesses}, or the \l{Warnings Window}
- {warnings} are shown above and below the \l{The Translation Area}
- {translations area}.
-
- With a translation file loaded, select a context from the
- \l{Context Window} {context list} on the left. Selecting a context
- loads the translatable strings found in that context into the
- \l{Strings Window} {string list}. Selecting one of the strings
- copies that string as the \key{Source text} in the \l{The
- Translation Area} {translation area}. Click in the text entry
- widget below the copied string and type your translation for that
- string. To accept the translation, either press the green
- \key{tick mark} button on the toolbar, or click the icon to the
- left of the selected source string in the string list. Repeat this
- process until all strings in the string list are marked with
- \inlineimage linguist-check-on.png
- or
- \inlineimage linguist-check-warning.png
- . Then select the next context and continue.
-
- Translation options are shown in the \l{Phrases and Guesses
- Window} {phrases and guesses window}. If the phrases and guesses
- window is not visible, click the \key{Phrases and guesses} tab at
- the bottom of the main window. The phrases and guesses window
- shows possible translations for the current string. These
- translation "guesses" have been read from phrase books
- (\menu{Phrases|Open Phrase Book...}). The current strings
- translation is also shown here. To select a guess, double
- click it in the phrases and guesses window or use the keyboard
- shortcut shown to the right of the guess.
-
- \QL can automatically check whether your translation strings pass
- a list of \l{Validation Tests} {validation tests}. Validation test
- failures are shown in the \l{Warnings Window} {warnings window}.
- If the warnings window is not visible, click the \key{Warnings}
- tab at the bottom of the main window.
-
- Finally, if the source code for the contexts is accessible, the
- \l{Sources and Forms Window} {source code window} shows the
- context where the current string is used. If the source code
- window is not visible, click the \key{Sources and Forms} tab at
- the bottom of the main window.
-
- At the end of the session choose \menu{File|Save} from the menu
- bar and then \menu{File|Exit} to quit.
-
- \section1 The Qt Linguist Window
-
- \image linguist-linguist.png "Linguist UI Snapshot"
-
- This \QL main window is divided into dockable subwindows arranged
- around a central \l{The Translation Area} {translation area}. The
- subwindows are: \l{Context Window} {Context}, \l{Sources and Forms
- Window} {Sources and Forms}, \l{Strings Window} {Strings},
- \l{Phrases and Guesses Window} {Phrases and guesses}, and
- \l{Warnings Window} {Warnings} (hidden in the UI snapshot). The
- translation area is always visible, but the dockable subwindows
- can be activated or deactivated in the \menu{View|Views} menu, and
- dragged around by their title bars and dropped in the translation
- area or even outside the main window.
-
- \section2 Context Window
-
- The context window normally appears on the left side of the main
- window. It lists the contexts in which strings to be translated
- appear. The column labeled \e{Context} lists the context names in
- alphabetical order. Each context is the name of a subclass of
- QObject. There can also be a context for QObject itself, which
- contains strings passed to the static function QObject::tr().
- There can also be an \e{<unnamed context>}, which contains strings
- that aren't in a subclass of QObject.
+ \QL is a tool for adding translations to Qt applications. Once you have
+ installed Qt, you can start \QL in the same way as any other application on
+ the development host.
- To the left of the \e{Context} column is a column labeled
- \inlineimage linguist-check-obsolete.png
- . This column uses the following list of icons to summarize the
- current translation state for each context:
+ The \QL main window contains a menu bar and the following views:
\list
- \li \inlineimage linguist-check-on.png
- All strings in the context have been translated, and all the
- translations passed the \l{Validation Tests} {validation tests}.
+ \li \gui Context (\key F6) for selecting from a list of contexts in
+ which strings to be translated appear.
- \li \inlineimage linguist-check-warning.png
- All strings in the context have been translated or marked as
- translated, but at least one translation failed the \l{Validation
- Tests} {validation tests}.
+ \li \gui Strings (\key F7) for viewing translatable strings found in a
+ context.
- \li \inlineimage linguist-check-off.png
- At least one string in the context has not been translated or is
- not marked as translated.
+ \li \gui {Sources and Forms} (\key F9) for viewing the context where the
+ current string is used if the source code for the context is
+ accessible.
- \li \inlineimage linguist-check-obsolete.png
- None of the translated strings still appears in the context. This
- usually means the context itself no longer exists in the
- application.
+ \li Translation area for translating strings.
- \endlist
+ \li \gui {Phrases and Guesses} (\key F10) for viewing possible
+ translations for the current string.
- To the right of the \e{Context} column is the \e{Items} column.
- Each entry in the \e{Items} column is a pair of numbers separated
- by a slash ("/"). The number to the right of the slash is the
- number of translatable strings in the context. The number to the
- left of the slash is the number of those strings that currently
- have translations. i.e., if the numbers are equal, all the
- translatable strings in the context have translations.
-
- In the UI snapshot above, the \b{MessageEditor} context is
- selected. Its \e{Items} entry shows \b{18/18}, which means it
- has 18 translatable strings and all 18 strings currently have
- translations. However, the context has been marked with the
- \inlineimage linguist-check-warning.png
- icon, which means that at least one of the current translations
- failed a \l{Validation Tests} {validation test}. In the
- \l{Strings Window} {strings window} to the right, we see that one
- of the strings is indeed marked with the
- \inlineimage linguist-check-warning.png
- icon.
-
- The context window is a dockable window. It can be dragged to
- another position in the main window, or dragged out of the main
- window to be a separate window. If you move the context window,
- \QL remembers the new position and puts the context window there
- whenever you start the program. If the context window has been
- closed, it can be restored by pressing \key{F6}.
-
- \section2 Strings Window
-
- The strings window normally appears on the right in the main
- window, above the \l{The Translation Area} {translation area}. Its
- \e{Source text} column lists all the translatable strings found in
- the current context. Selecting a string makes that string the
- current string in the \l{The Translation Area} {translation area}.
-
- To the left of the \e{Source text} column is a column labeled
- \inlineimage linguist-check-obsolete.png
- . This column is similar to the one in the \l{Context Window}
- {context window}, but here you can click on the icon to change the
- translation acceptance state for each string in the list. A tick
- mark, green or yellow, means the string has been translated and
- the user has accepted the translation. A question mark means
- either that the user has not accepted the string's translation or
- that the string doesn't have a translation. The table below
- explains the acceptance states and their icons:
+ \li \gui Warnings (\key F8) for viewing translated strings that fail
+ validation tests.
- \target String Translation States
+ \endlist
- \table
- \header
- \li State
- \li Icon
- \li Description
+ \image linguist-linguist.png "Qt Linguist UI"
- \row
- \li Accepted/Correct
- \li \inlineimage linguist-check-on.png
- \li The source string has a translation (possibly empty); the user
- has accepted the translation, and the translation passes all the
- \l{Validation Tests} {validation tests}. If the translation is
- empty, the user has chosen to leave it empty. Click the icon to
- revoke acceptance of the translation and decrement the number of
- accepted translations in the \e{Items} column of the \l{Context
- Window} {context list} by 1. The state is reset to
- \inlineimage linguist-check-off.png
- if the string has a translation, or to
- \inlineimage linguist-check-empty.png
- if the string's translation is empty. If \c{lupdate} changes the
- contents of a string, its acceptance state is automatically reset
- to \inlineimage linguist-check-off.png
- .
+ The translation area (1) is always visible. To show or hide the other views,
+ select \gui View > \gui Views, or use the keyboard shortcuts listed above.
+ You can drag the views by their title bars and arrange them around the
+ translation area or even outside the main window.
- \row
- \li Accepted/Warnings
- \li \inlineimage linguist-check-warning.png
- \li The user has accepted the translation, but the translation does
- not pass all the \l{Validation Tests} {validation tests}. The
- validation test failures are shown in the \l{Warnings Window}
- {warnings window}. Click the icon to revoke acceptance of the
- translation. The state is reset to \inlineimage linguist-danger.png
- , and the number of accepted translations in the \e{Items} column
- of the \l{Context Window} {context list} is decremented by 1.
+ \section1 Translating Strings
- \row
- \li Not Accepted
- \li \inlineimage linguist-check-off.png
- \li The string has a non-empty translation that passes all the
- \l{Validation Tests} {validation tests}, but the user has not yet
- accepted the translation. Click the icon or press \key{Ctrl+Enter}
- to accept the translation. The state is reset to
- \inlineimage linguist-check-on.png
- , and the number of accepted translations in the \e{Items} column
- of the \l{Context Window} {context list} is incremented by 1.
+ You open translation source (TS) files in \QL for translation. TS files are
+ human-readable XML files containing source phrases and their translations.
+ TS files are usually created and updated by lupdate. If you do not have a TS
+ file, see \l {Qt Linguist Manual: Release Manager} {Release Manager} to
+ learn how to generate one.
- \row
- \li No Translation
- \li \inlineimage linguist-check-empty.png
- \li The string does not have a translation. Click the icon to
- accept the empty translation anyway. The state is reset to
- \inlineimage linguist-check-on.png
- , and the number of accepted translations in the \e{Items} column
- of the \l{Context Window} {context list} is incremented by 1.
+ You can use \QL also to translate files in the international XML
+ Localization Interchange File Format (XLIFF) that are generated by other
+ programs. However, for standard Qt projects, only the TS file format is
+ used. The minimum supported version for XLIFF format files is 1.1.
- \row
- \li Validation Failures
- \li \inlineimage linguist-danger.png
- \li The string has a translation, but the translation does not
- pass all the \l{Validation Tests} {validation tests}. Validation
- test failures are shown in the \l{Warnings Window} {warnings}
- window. Click on the icon or press \key{Ctrl+Return} to accept
- the translation even with validation failures. The state is
- reset to \inlineimage linguist-check-warning.png
- . We recommended editing the translation to fix the causes of
- the validation failures. The state will reset automatically to
- \inlineimage linguist-check-off.png
- , when all the failures have been fixed.
+ \QL displays the target language in the translation area, and adapts the
+ number of input fields for plural forms accordingly. When you open several
+ TS files to translate simultaneously, the \gui Translator and
+ \gui {Translator comment} fields are displayed for each language.
+ For more information about setting the location information, see
+ \l{Changing the Target Locale}.
- \row
- \li Obsolete
- \li \inlineimage linguist-check-obsolete.png
- \li The string is obsolete. It is no longer used in the context.
- See the \l{Qt Linguist Manual: Release Manager} {Release Manager}
- for instructions on how to remove obsolete messages from the file.
-
- \endtable
-
- The string list is a dockable subwindow. If it has been closed,
- restored it by pressing \key{F7}.
-
- \section2 The Translation Area
+ If the developer provides a \l{QObject::tr()} {disambiguating
+ comment}, it is displayed in the \gui {Developer comments} field.
- The translation area is in the middle of the main window, to the
- right of the \l{Context Window} {context list}. It doesn't have a
- title bar, so you can't drag it around. Instead, you drag and drop
- the other subwindows to arrange them around the translation area.
- The string currently selected in the \l{Strings Window} {string
- list} appears at the top of the translation area, under the label
- \menu{Source text}. Note that all blanks in the source text have
- been replaced by "." so the translator can see the spacing
- required within the text.
+ To translate strings:
- If the developer provides a \l{QObject::tr()} {disambiguating
- comment}, it will appear below the source text area, under the
- label \menu{Developer comments}.
-
- Below the source text and optional developer comments are two text
- entry widgets for the translator, one for entering the translation
- of the current string, and one for the translator to enter an
- optional comment to be read by other translators.
-
- When \l{Translating Multiple Languages Simultaneously} {multiple
- languages} are being translated, this sequence of fields is
- repeated for each language. See also \l {Changing the Target
- Locale}.
-
- \section2 Phrases and Guesses Window
-
- If the current string in the \l{Strings Window} {string list}
- appears in one or more of the \l{Phrase Books} {phrase books}
- that have been loaded, the current string and its phrase book
- translation(s) will be listed in this window. If the current
- string is the same as, or similar to, another string that has
- already been translated, that other string and its translation
- will also be listed in this window.
+ \list 1
- To use a translation from the Phrases and Guesses Window, you can
- double click the translation, and it will be copied into the
- translation area, or you can use the translation's \e{Guess}
- hotkey on the right. You can also press \key{F10} to move the
- focus to the Phrases and Guesses Window, then use the up and down
- arrow keys to find the desired translation, and then press
- \key{Enter} to copy it to the translation area. If you decide
- that you don't want to copy a phrase after all, press \key{Esc} to
- return the focus to the translation area.
+ \li Select \gui File > \gui Open to load a TS file.
- The Phrases and Guesses Window is a dockable window. If it has
- been closed, it can be made visible by pressing the \e{Phrases and
- guesses} tab at the bottom of the window, or by pressing
- \key{F10}.
+ \li Select a context in the \gui Context view to load the translatable
+ strings found in that context into the \gui Strings view.
- \section2 Sources and Forms Window
+ \li Select a string to copy it as the \gui {Source text} in the
+ translation area. The whitespace within the source text is
+ visualized so that you can see the spacing required within the text.
- If the source files containing the translatable strings are
- available to \QL, this window shows the source context of the
- current string in the \l{Strings Window} {string list}. The source
- code line containing the current string should be shown and
- highlighted. If the file containing the source string is not
- found, the expected absolute file path is shown.
+ \li Enter the translation of the current string in the \gui Translation
+ field.
- If the source context shows the wrong source line, it probably
- means the translation file is out of sync with the source files.
- To re-sync the translation file with the source files, see
- \l{Using lupdate}.
+ You can also select an existing translation from the
+ \gui {Phrases and Guesses} view by double-clicking it. The phrases
+ are read from phrase books and the guesses are existing translations
+ of similar phrases in the TS file.
- The Sources and Forms window is a dockable window. If it has been
- closed, it can be made visible again by pressing the \e{Sources
- and Forms} tab at the bottom of the window, or by pressing
- \key{F9}.
+ \li Optionally, enter a comment to be read by other translators in the
+ \gui {Translator comment} field.
- \section2 Warnings Window
+ \li To accept the translation, press \key {Ctrl+Enter}, select
+ \inlineimage linguist-doneandnext.png
+ , or click the icon to the left of the selected source string in the
+ string list.
- If the translation you enter for the current string fails any of
- the active \l{Validation Tests} {validation tests}, the failures
- are listed in the warnings window. The first of these failure
- messages is also shown in the status bar at the bottom of the main
- window. Note that only \e{active} validation tests are
- reported. To see which validation tests are currently active, or
- to activate or deactivate tests, use the \menu{Validation} menu
- from the \l{menubar}{menu bar}.
+ \li Select \gui File > \gui Save to save your work.
- The Warnings window is a dockable window. If it has been closed,
- it can be made visible by pressing the \e{Warnings} tab at the
- bottom of the window, or by pressing \key{F8}.
+ \endlist
- \target multiple languages
- \section2 Translating Multiple Languages Simultaneously
+ Repeat this process until all strings in the string list are marked with
+ \inlineimage linguist-check-on.png
+ (\gui {Accepted/Correct}) or
+ \inlineimage linguist-check-warning.png
+ (\gui {Accepted/Warnings}). Then select the next context and continue.
- Qt Linguist can now load and edit multiple translation files
- simultaneously. One use for this is the case where you know two
- languages better than you know English (Polish and Japanese, say),
- and you are given an application's Polish translation file and
- asked to update the application's Japanese translation file. You
- are more comfortable translating Polish to Japanese than you are
- translating English to Japanese.
+ To view the number of words and characters in the source text and in the
+ translated text, select \gui View > \gui Statistics.
- Below is the UI snapshot shown earlier, but this time with both
- \e{Polish} and \e{Japanese} translation files loaded.
+ Select \gui File > \gui Release to create a Qt message QM file with the same
+ base name as the current translation source file. The release manager's
+ command line tool lrelease performs the same function on \e all of an
+ application's translation source files.
- \image linguist-linguist_2.png
+ To print the translation source and the translations, select \gui File >
+ \gui Print.
- The first thing to notice is that the \l{The Translation Area}
- {translation area} has text editing areas for both Polish and
- Japanese, and these are color-coded for easier separation.
- Second, the \l{Context Window} and the \l{Strings Window} both
- have two columns labeled \inlineimage linguist-check-obsolete.png
- instead of one, and although it may be hard to tell, these columns
- are also color-coded with the same colors. The left-most column in
- either case applies to the top-most language area (Polish above)
- in the \l{The Translation Area} {translation area}, and the
- right-most column applies to the bottom language area.
-
- The \e{Items} column in the \l{Context Window} combines the values
- for both languages. The best way to see this is to look at the
- value for the \b{MessageEditor} context, which is the one
- selected in the snapshot shown above. Recall that in the first UI
- snapshot (Polish only), the numbers for this context were
- \e{18/18}, meaning 18 translatable strings had been found in the
- context, and all 18 strings had accepted translations. In the UI
- snapshot above, the numbers for the \b{MessageEditor} context
- are now \e{1/18}, meaning that both languages have 18 translatable
- strings for that context, but for Japanese, only 1 of the 18
- strings has an accepted translation. The
- \inlineimage linguist-check-off.png
- icon in the Japanese column means that at least one string in the
- context doesn't have an accepted Japanese translation yet. In fact,
- 17 of the 18 strings don't have accepted Japanese translations yet.
- We will see \e{18/18} in the \e{Items} column when all 18 strings
- have accepted translations for all the loaded translation files,
- e.g., both Polish and Japanese in the snapshot.
-
- \section1 Common Tasks
+ To quit \QL, select \gui File > \gui Exit.
\section2 Leaving a Translation for Later
- If you wish to leave a translation press \key{Ctrl+L} (Next
+ If you wish to leave a translation, press \key{Ctrl+L} (Next
Unfinished) to move to the next unfinished translation. To move to
the next translation (whether finished or unfinished) press
- \key{Shift+Ctrl+L}. You can also navigate using the Translation
+ \key{Shift+Ctrl+L}. You can also navigate using the \gui Translation
menu. If you want to go to a different context entirely, click the
- context you want to work on in the Context list, then click the
- source text in the \l{Strings Window} {string list}.
+ context you want to work on in the \gui Context list, then click the
+ source text in the \gui Strings view.
\section2 Phrases That Require Multiple Translations Depending on Context
The same phrase may occur in two or more contexts without conflict. Once
- a phrase has been translated in one context, \QL notes
- that the translation has been made and when the translator reaches a
- later occurrence of the same phrase \QL will provide
+ a phrase has been translated in one context, \QL notes that the translation
+ has been made and when the translator reaches a later occurrence of the same
+ phrase, \QL provides
the previous translation as a possible translation candidate in the
- \l{Phrases and Guesses Window}.
-
- If a phrase occurs more than once in a particular context it will
- only be shown once in \QL's \l{Context Window} {context list} and
- the translation will be applied to every occurrence within the
- context. If the same phrase needs to be translated differently
- within the same context the developer must provide a
- distinguishing comment for each of the phrases concerned. If such
- comments are used the duplicate phrases will appear in the
- \l{Context Window} {context list}. The developer's comments will
- appear in the \l{The Translation Area} {translation area} on a
- light blue background.
+ \gui {Phrases and Guesses} view.
+
+ If a phrase occurs more than once in a particular context it is shown only
+ once in the \gui Context view and the translation is applied to every
+ occurrence within the context. If the same phrase needs to be translated
+ differently within the same context, the developer must provide a
+ distinguishing comment for each occurrence of the phrase. If such comments
+ are used, the duplicate phrases appear in the \gui Context view. The
+ developer's comments appear in the translation area on a light blue
+ background.
\section2 Changing Keyboard Accelerators
@@ -757,7 +490,7 @@
and then clicking \e{New} with the mouse, or by entering \e{Alt+F}
and \e{N}.
- Each Ctrl key accelerator is shown in the \gui Strings window
+ Each Ctrl key accelerator is shown in the \gui Strings view
as a separate string, for example \key{Ctrl+Enter}. Since
the string does not have a context to give it meaning, such as
the context of the phrase in which an Alt key accelerator appears,
@@ -765,24 +498,23 @@
\l{QObject::tr()} {disambiguation comment} to explain the action
the Ctrl key accelerator is meant to perform. This disambiguating
comment (if provided by the developer) will appear under
- \e{Developer comments} in the \l{The Translation Area}
- {translation area} under the \e{Source text} area.
+ \gui {Developer comments} in the translation area below the
+ \gui {Source text} field.
- Ideally Ctrl key accelerators are translated simply by copying
- them directly using \e {Copy from source text} in the
- \menu{Translation} menu. However, in some cases the character will
+ Ideally, translations for Ctrl key accelerators are simply copied by
+ selecting \gui Translation > \gui {Copy from source text}. However, in some
+ cases the character will
not make sense in the target language, and it must be
changed. Whichever character (alpha or digit) is chosen, the
translation must be in the form "Ctrl+" followed by the upper case
- character. \e{Qt} will automatically display the correct name at
+ character. Qt will automatically display the correct name at
run-time. As with Alt key accelerators, if the translator changes
the character, the new character must not conflict with any other
Ctrl key accelerator.
\warning Do not translate the "Alt", "Ctrl" or "Shift" parts of
- the accelerators. \e{Qt} relies on these strings being there. For
- supported languages, \e {Qt} automatically translates these
- strings.
+ the accelerators. Qt relies on these strings being there. For
+ supported languages, Qt automatically translates these strings.
\section2 Handling Numbered Arguments and Plurals
@@ -792,7 +524,7 @@
a digit. Consider an example: \c{After processing file %1, file %2
is next in line}. In this string to be translated, \c{%1} and
\c{%2} are numbered arguments. At run-time, \c{%1} and \c{%2} will
- be replaced with the first and next file names respectively. The
+ be replaced with the first and second file names respectively. The
same numbered arguments must appear in the translation, but not
necessarily in the same order. A German translation of the string
might reverse the phrases, for example \c{Datei %2 wird bearbeitet, wenn
@@ -807,421 +539,307 @@
text will depend on the value shown, and more than one translation
is required. If the developers have marked up the source text in
correct way, fields for each of the possible plural forms will be
- available in the translation area. (The
- \l{Writing Source Code for Translation#Handling Plurals}{Writing Source Code for Translation}
- document contains details about this feature for developers.)
-
- \section2 Reusing Translations
-
- If the translated text is similar to the source text, choose the
- \e {Copy from source text} entry in the \menu Translation menu (press
- \key{Ctrl+B}) which will copy the source text into the
- \l{The Translation Area} {translation area}.
-
- \QL automatically lists possible translations from any open
- \l{Phrase Books} {phrase books} in the \l{Phrases and Guesses
- Window}, as well as similar or identical phrases that have already
- been translated.
+ available in the translation area. For more information, see
+ \l{Writing Source Code for Translation#Handling Plurals}
+ {Writing Source Code for Translation}.
\section2 Changing the Target Locale
- \QL displays the target language in the \l{The Translation Area}
- {translation area}, and adapts the number of input fields for
- plural forms accordingly. If not explicitly set, \QL guesses the
- target language and country by evaluating the translation source
- file name. For example, \c app_de.ts sets the target language to German,
- and \c app_de_ch.ts sets the target language to German and the
- target country to Switzerland (this also helps loading
- translations for the current locale automatically; see
- \l{linguist-programmers.html}{Developers} for details).
+ If the target language and country are not explicitly set, \QL deducts them
+ from the translation source file name. For example, \c app_de.ts sets the
+ target language to German, and \c app_de_ch.ts sets the target language to
+ German and the target country to Switzerland. This also helps loading
+ translations for the current locale automatically. For more information, see
+ \l{linguist-programmers.html}{Developers}.
+
If your files do not follow this convention, you can also set the
- locale information explicitly using \e {Translation File Settings}
- in the \menu Edit menu.
+ locale information explicitly by selecting \gui Edit >
+ \gui {Translation File Settings}.
\image linguist-translationfilesettings.png
- \section1 Phrase Books
+ \section1 Selecting Context to Translate
- A \QL phrase book is a set of source phrases, target
- (translated) phrases, and optional definitions. Typically one phrase book
- will be created per language and family of applications. Phrase books
- are used to provide a common set of translations to help ensure consistency.
- They can also be used to avoid duplication of effort since the translations
- for a family of applications can be produced once in the phrase book.
- If the translator reaches an non-translated phrase that is the same as a
- source phrase in a phrase book, \QL will show the
- phrase book entry in the \l {Phrases and Guesses Window}.
+ The \gui Context view lists the contexts in which strings to be translated
+ appear. The column labeled \gui Context lists the context names in
+ alphabetical order. Each context is the name of a subclass of
+ QObject. There can also be a context for QObject itself, which
+ contains strings passed to the static function QObject::tr().
+ There can also be an \e{<unnamed context>}, which contains strings
+ that are not in a subclass of QObject.
- \section2 Creating and Editing Phrase Books
+ The following icons indicate the current translation state for each context:
- \image linguist-phrasebookdialog.png
+ \table
+ \header
+ \li State
+ \li Icon
+ \li Description
- Before a phrase book can be edited it must be created or, if it already
- exists, opened. Create a new phrase book by selecting
- \menu{Phrase|New Phrase Book} from the menu bar. You must enter a
- filename and may change the location of the file if you wish. A newly
- created phrase book is automatically opened. Open an existing phrase
- book by choosing \menu{Phrase|Open Phrase Book} from the menu bar.
-
- The phrase book contents can be displayed and changed by selecting
- \menu{Phrase|Edit Phrase Book}, and then activating the phrase book you
- want to work on. This will pop up the Phrase Book Dialog as shown
- in the image above. To add a new phrase click the \gui{New Phrase}
- button (or press Alt+N) and type in a new source phrase. Press Tab and
- type in the translation. Optionally press Tab and enter a definition \mdash
- this is useful to distinguish different translations of the same source
- phrase. This process may be repeated as often as necessary. You can delete
- a phrase by selecting it in the phrases list and clicking
- Remove Phrase. Click the \gui Close button (press Esc) once you've finished
- adding (and removing) phrases.
-
- \section2 Shortcuts for Editing Phrase Books
-
- You can also create a new phrase book entry directly out of the translation you
- are working on: Clicking \menu{Phrases|Add to Phrase Book} or pressing
- \key{Ctrl+T} will add the source text and the content of the first translation
- field to the current phrase book. If multiple phrase books are loaded,
- you have to specify the phrase book to add the entry to in a dialogue.
- If you detect an error in a phrase book entry that is shown in the
- \l{Phrases and Guesses Window}, you can also edit it in place by right
- clicking on the entry, and selecting \menu{Edit}. After fixing the error
- press \key{Return} to leave the editing mode.
+ \row
+ \li Accepted/Correct
+ \li \inlineimage linguist-check-on.png
+ \li All strings in the context have been translated, and all the
+ translations passed the \l{Validating Translations}{validation tests}.
- \section2 Batch Translation
+ \row
+ \li Accepted/Warnings
+ \li \inlineimage linguist-check-warning.png
+ \li All strings in the context have been translated or marked as translated,
+ but at least one translation failed the validation tests.
+ In the \gui Strings view, you can see which string failed the test.
- \image linguist-batchtranslation.png
+ \row
+ \li Not Accepted
+ \li \inlineimage linguist-check-off.png
+ \li At least one string in the context has not been translated or is not
+ marked as translated.
- Use the batch translation feature of \QL to automatically
- translate source texts that are also in a phrase book. Selecting
- \menu{Tools|Batch Translation} will show you the batch translation dialog,
- which let you configure which phrase books to use in what order during the
- batch translation process. Furthermore you can set whether only entries
- with no present translation should be considered, and whether batch translated
- entries should be set to finished (see also \l {String Translation States}).
+ \row
+ \li Obsolete
+ \li \inlineimage linguist-check-obsolete.png
+ \li None of the translated strings appears in the context any more. This
+ usually means the context itself no longer exists in the application.
+ \endtable
- \section1 Validation Tests
+ The \gui Items column displays the total number of translatable strings in
+ the context and the number of translated strings, separated by a slash (/).
+ If the numbers are equal, all the translatable strings in the context have
+ translations.
- \QL provides four kinds of validation tests for translations.
+ \section1 Selecting String to Translate
- \list 1
- \li \e {Accelerator validation} detects translated phrases
- that do not have an ampersand when the source phrase does and vice
- versa.
- \li \e {Punctuation validation} detects differences in the
- terminating punctuation between source and translated phrases when this
- may be significant, e.g. warns if the source phrase ends with an
- ellipsis, exclamation mark or question mark, and the translated phrase
- doesn't and vice versa.
- \li \e {Phrases validation} detects source phrases that are
- also in the phrase book but whose translation differs from that given in
- the phrase book.
- \li \e {Place marker validation} detects whether the same variables
- (like \c %1, \c %2) are used both in the source text and in the translation.
- \endlist
+ The \gui Strings view lists all the translatable strings found in the
+ current context and their translation acceptance state. Selecting a string
+ makes that string the current string in the translation area.
+
+ Click the icon in front of a string to change its translation acceptance
+ state. A tick mark, green or yellow, means the string has been translated
+ and the translation has been accepted. A question mark means either that the
+ translation has not been accepted or that the string does not have a
+ translation.
+
+ The following icons indicate the current translation state for each string:
+
+ \target String Translation States
+
+ \table
+ \header
+ \li State
+ \li Icon
+ \li Description
+
+ \row
+ \li Accepted/Correct
+ \li \inlineimage linguist-check-on.png
+ \li The source string has a translation (possibly empty). The user
+ has accepted the translation, and the translation passes all the
+ \l{Validating Translations} {validation tests}. If the translation is
+ empty, the user has chosen to leave it empty. Click the icon to
+ revoke acceptance of the translation and decrement the number of
+ accepted translations in the \gui Items column of the \ gui Context view
+ by 1. The state is reset to \gui {Not Accepted} if the string has a
+ translation, or to \gui {No Translation} if the string's translation is
+ empty. If \c{lupdate} changes the contents of a string, its acceptance
+ state is automatically reset to \gui {Not Accepted}.
- Validation may be switched on or off from the menu bar's
- Validation item or using the toolbar buttons. Unfinished phrases
- that fail validation are marked with an exclamation mark in the
- source text pane. Finished phrases will get a yellow tick
- instead. If you switch validation off and then switch it on later,
- \QL will recheck all phrases and mark any that fail
- validation. See also \l{String Translation States}.
+ \row
+ \li Accepted/Warnings
+ \li \inlineimage linguist-check-warning.png
+ \li The user has accepted the translation, but the translation does
+ not pass all the validation tests. The validation test failures are
+ shown in the \gui Warnings view. Click the icon to revoke acceptance of
+ the translation. The state is reset to \gui {Validation Failures}, and
+ the number of accepted translations in the \gui Items column of the
+ \gui Context view is decremented by 1.
- \section1 Form Preview
+ \row
+ \li Not Accepted
+ \li \inlineimage linguist-check-off.png
+ \li The string has a translation that passes all the validation tests, but
+ the user has not yet accepted the translation. Click the icon or press
+ \key{Ctrl+Enter} to accept the translation. The state is reset to
+ \gui {Accepted/Correct}, and the number of accepted translations in the
+ \gui Items column of the \gui Context view is incremented by 1.
- \image linguist-previewtool.png
+ \row
+ \li No Translation
+ \li \inlineimage linguist-check-empty.png
+ \li The string does not have a translation. Click the icon to
+ accept the empty translation anyway. The state is reset to
+ \gui {Accepted/Correct}, and the number of accepted translations in the
+ \gui Items column of the \gui Context view is incremented by 1.
- Forms created by \e{Qt Designer} are stored in special UI files.
- \QL can make use of these UI files to show the translations
- done so far on the form itself. This of course requires access to the UI
- files during the translation process. Activate
- \menu{Tools|Open/Refresh Form Preview} to open the window shown above.
- The list of UI files \QL has detected are displayed in the Forms
- List on the left hand. If the path to the files has changed, you can load
- the files manually via \menu{File|Open Form...}. Double-click on an entry
- in the Forms List to display the Form File. Select \e{<No Translation>} from
- the toolbar to display the non-translated form.
+ \row
+ \li Validation Failures
+ \li \inlineimage linguist-danger.png
+ \li The string has a translation, but the translation does not pass all the
+ validation tests. Validation test failures are shown in the
+ \gui Warnings view. Click on the icon or press \key{Ctrl+Return} to
+ accept the translation even with validation failures. The state is
+ reset to \gui {Accepted/Warnings}. We recommended editing the
+ translation to fix the causes of the validation failures. The state will
+ reset automatically to \gui {Not Accepted}, when all the failures have
+ been fixed.
- \section1 Qt Linguist Reference
+ \row
+ \li Obsolete
+ \li \inlineimage linguist-check-obsolete.png
+ \li The string is obsolete. It is no longer used in the context.
+ See the \l{Qt Linguist Manual: Release Manager} {Release Manager}
+ for instructions on how to remove obsolete messages from the file.
+ \endtable
- \section2 File Types
+ \section1 Viewing Strings in Context
- \QL makes use of four kinds of files:
+ If the source files containing the translatable strings are
+ available to \QL, the \gui {Sources and Forms} view shows the source context
+ of the current string in the \gui Strings view. The source
+ code line containing the current string should be shown and
+ highlighted. If the file containing the source string is not
+ found, the expected absolute file path is shown.
- \list
- \li TS \e {translation source files} \BR are human-readable XML
- files containing source phrases and their translations. These files are
- usually created and updated by lupdate
- and are specific to an application.
- \li \c .xlf \e {XLIFF files} \BR are human-readable XML files that adhere
- to the international XML Localization Interchange File Format. \QL
- can be used to edit XLIFF files generated by other programs. However, for
- standard Qt projects, only the TS file format is used. \note The minimum
- supported version for XLIFF format files is 1.1. XLIFF 1.0 version files
- are not supported.
- \li QM \e {Qt message files} \BR are binary files that contain
- translations used by an application at run-time. These files are
- generated by lrelease, but can also
- be generated by \QL.
- \li \c .qph \e {Qt phrase book files} \BR are human-readable XML
- files containing standard phrases and their translations. These files
- are created and updated by \QL and may be used by any
- number of projects and applications.
- \endlist
+ If the source context shows the wrong source line, it probably
+ means the translation file is out of sync with the source files.
+ For more information about how to re-sync the translation file with the
+ source files, see \l{Using lupdate}.
+
+ Forms created by \QD are stored in special UI files. \QL can make use of
+ these UI files to show the translations done so far on the form itself if
+ the UI files are available to it during the translation process.
+
+ \section1 Reusing Translations
+
+ If the translated text is similar to the source text, select
+ \gui Translation > \gui {Copy from source text} (or press \key{Ctrl+B}) to
+ copy the source text into the translation area.
+
+ In \QL, \e {phrase books} are used to provide a common set of translations
+ to help ensure consistency. A phrase book is a set of source phrases, target
+ (translated) phrases, and optional definitions. Typically, one phrase book
+ is created per language and family of applications. Phrase books can also be
+ used to avoid duplication of effort since the translations for a family of
+ applications can be produced once in the phrase book.
+
+ If the current string in the \gui Strings view appears in one or more of the
+ phrase books that have been loaded, the current string and its phrase book
+ translations are listed in the \gui {Phrases and Guesses} view. If the
+ current string is the same as, or similar to, another string that has
+ already been translated, that other string and its translation
+ are also listed in this view.
- \target menubar
- \section2 The Menu Bar
+ To copy a translation from the \gui {Phrases and Guesses} view to the
+ translation area, double-click it or select it and press \key Enter.
- \image linguist-menubar.png
+ \section2 Batch Translation
- \list
- \li \gui {File}
- \list
- \li \gui {Open... Ctrl+O} \BR pops up an open file dialog from which a
- translation source \c .ts or \c .xlf file can be chosen.
- \li \gui {Recently opened files} \BR shows the TS files that
- have been opened recently, click one to open it.
- \li \gui {Save Ctrl+S} \BR saves the current translation source file.
- \li \gui {Save As...} \BR pops up a save as file dialog so that the
- current translation source file may be saved with a different
- name, format and/or put in a different location.
- \li \gui {Release} \BR create a Qt message QM file with the same base
- name as the current translation source file. The release manager's
- command line tool lrelease
- performs the same function on \e all of an application's translation
- source files.
- \li \gui {Release As...} \BR pops up a save as file dialog. The
- filename entered will be a Qt message QM file of the translation
- based on the current translation source file. The release manager's
- command line tool lrelease
- performs the same function on \e all of an application's translation
- source files.
- \li \gui {Print... Ctrl+P} \BR pops up a print dialog. If you click
- OK the translation source and the translations will be printed.
- \li \gui {Exit Ctrl+Q} \BR closes \QL.
- \endlist
-
- \li \gui {Edit}
- \list
- \li \gui {Undo Ctrl+Z} \BR undoes the last editing action in the
- translation pane.
- \li \gui {Redo Ctrl+Y} \BR redoes the last editing action in the
- translation pane.
- \li \gui {Cut Ctrl+X} \BR deletes any highlighted text in the
- translation pane and saves a copy to the clipboard.
- \li \gui {Copy Ctrl+C} \BR copies the highlighted text in the
- translation pane to the clipboard.
- \li \gui {Paste Ctrl+V} \BR pastes the clipboard text into the
- translation pane.
- \omit
- \li \gui {Delete} \BR deletes the highlighted text in the
- translation pane.
- \endomit
- \li \gui {Select All Ctrl+A} \BR selects all the text in the
- translation pane ready for copying or deleting.
- \li \gui {Find... Ctrl+F} \BR pops up the
- Find dialog. When the dialog pops up
- enter the text to be found and click the \gui {Find Next} button.
- Source phrases, translations and comments may be searched.
- \li \gui {Find Next F3} \BR finds the next occurrence of the text that
- was last entered in the Find dialog.
- \li \gui {Search and Translate...} \BR pops up the Search and
- Replace Dialog. Use this dialog to translate the same text in multiple items.
- \li \gui {Translation File Settings...} \BR let you configure the target
- language and the country/region of a translation source file.
- \endlist
-
- \li \gui {Translation}
- \list
- \li \gui {Prev Unfinished Ctrl+K} \BR moves to the nearest previous
- unfinished source phrase (unfinished means non-translated or
- translated but failed validation).
- \li \gui {Next Unfinished Ctrl+L} \BR moves to the next unfinished source
- phrase.
- \li \gui {Prev Shift+Ctrl+K} \BR moves to the previous source phrase.
- \li \gui {Next Shift+Ctrl+L} \BR moves to the next source phrase.
- \li \gui {Done \& Next Ctrl+Enter} \BR mark this phrase as 'done'
- (translated) and move to the next unfinished source phrase.
- \li \gui {Copy from source text Ctrl+B} \BR copies the source text into
- the translation.
- \endlist
-
- \li \gui {Validation} (See \l{Validation Tests})
- \list
- \li \gui {Accelerators} \BR toggles validation on or off for Alt
- accelerators.
- \li \gui {Ending Punctuation} \BR switches validation on or off
- for phrase ending punctuation, e.g. ellipsis, exclamation mark,
- question mark, etc.
- \li \gui {Phrase Matches} \BR sets validation on or off for
- matching against translations that are in the current phrase book.
- \li \gui {Place Marker Matches} \BR sets validation on or off for
- the use of the same place markers in the source and translation.
- \endlist
-
- \li \gui {Phrases} (See the section \l {Phrase Books} for details.)
- \list
-
- \li \gui {New Phrase Book... Ctrl+N} \BR pops up a save as file
- dialog. You must enter a filename to be used for the phrase
- book and save the file. Once saved you should open the phrase
- book to begin using it.
-
- \li \gui {Open Phrase Book... Ctrl+H} \BR pops up an open file
- dialog. Find and choose a phrase book to open.
-
- \li \gui {Close Phrase Book} \BR displays the list of phrase
- books currently opened. Clicking on one of the items will
- close the phrase book. If the phrase book has been modified, a
- dialog box asks whether \QL should save the changes.
-
- \li \gui {Edit Phrase Book...} \BR displays the list of phrase
- books currently opened. Clicking on one of the items will open
- the \l{Creating and Editing Phrase Books}{Phrase Book Dialog}
- where you can add, edit or delete phrases.
-
- \li \gui {Print Phrase Book...} \BR displays the list of phrase
- books currently opened. Clicking on one of the items pops up a
- print dialog. If you click OK the phrase book will be
- printed.
-
- \li \gui {Add to Phrase Book Ctrl+T} \BR Adds the source text
- and translation currently shown in the \l{The Translation
- Area} {translation area} to a phrase book. If multiple phrase
- books are loaded, a dialog box let you specify select one.
-
- \endlist
-
- \li \gui {Tools}
- \list
-
- \li \gui {Batch Translation...} \BR Opens a \l{Batch
- Translation}{dialog} which let you automatically insert
- translations for source texts which are in a phrase book.
-
- \li \gui {Open/Refresh Form Preview F3} \BR Opens the \l{Form
- Preview}. This window let you instantly see translations for
- forms created with \QD. \endlist
-
- \li \gui {View}
- \list
-
- \li \gui {Revert Sorting} \BR puts the items in the \l{Context
- Window} {context list} and in the \l{Strings Window} {string
- list} into their original order.
-
- \li \gui {Display Guesses} \BR turns the display of phrases and
- guesses on or off.
-
- \li \gui {Statistics} \BR toggles the visibility of the
- Statistics dialog.
-
- \li \gui {Views} \BR toggles the visibility of the \l{Context
- Window}, \l{Strings Window}, \l{Phrases and Guesses Window},
- \l{Warnings Window}, or \l{Sources and Forms Window}.
-
- \li \gui {Toolbars} \BR toggles the visibility of the different
- toolbars.
-
- \endlist
-
- \li \gui {Help}
- \list
- \li \gui {Manual F1} \BR opens this manual.
- \li \gui {About Qt Linguist} \BR Shows information about \QL.
- \li \gui {About Qt} \BR Shows information about \e{Qt}.
- \li \gui {What's This? Shift+F1} \BR Click on one item in the main window
- to get additional information about it.
- \endlist
+ \image linguist-batchtranslation.png
- \endlist
+ Use the batch translation feature of \QL to automatically translate source
+ texts that are also in a phrase book. To configure which phrase books to use
+ in what order during the batch translation process, select \gui Edit >
+ \gui {Batch Translation}. You can specify whether only entries with no
+ current translation should be considered, and whether batch translated
+ entries should be marked as \gui Accepted.
- \section2 The Toolbar
+ \section2 Creating and Editing Phrase Books
- \image linguist-toolbar.png
+ Phrase book files are human-readable XML files containing standard phrases
+ and their translations. These files are created and updated by \QL and may
+ be used by any number of projects and applications.
- \list
- \li \inlineimage linguist-fileopen.png
- \BR
- Pops up the open file dialog to open a new translation source TS file.
+ To create a new phrase book, select \gui Phrases > \gui {New Phrase Book}.
- \li \inlineimage linguist-filesave.png
- \BR
- Saves the current translation source TS file.
+ \image linguist-phrasebookdialog.png
- \li \inlineimage linguist-fileprint.png
- \BR
- Prints the current translation source TS file.
+ To open a phrase book, select \gui Phrases > \gui {Open Phrase Book}, and
+ then select the Qt phrase book file (.qph) to open.
- \li \inlineimage linguist-phrasebookopen.png
- \BR
- Pops up the file open dialog to open a new phrase book \c .qph file.
+ To view and change open phrase books, select \gui Phrases >
+ \gui {Edit Phrase Book}.
- \li \inlineimage linguist-editundo.png
- \BR
- Undoes the last editing action in the translation pane.
+ To add a new phrase, select \gui {New Entry} (or press \key {Alt+N}) and
+ type in a new source phrase, the translation, and an optinal definition.
+ This is useful to distinguish different translations of the same source
+ phrase.
- \li \inlineimage linguist-editredo.png
- \BR
- Redoes the last editing action in the translation pane.
+ To add the translation you are working on to the current phrase book, select
+ \gui Phrases > \gui {Add to Phrase Book} or press \key{Ctrl+T}. If multiple
+ phrase books are loaded, you have to select one.
- \li \inlineimage linguist-editcut.png
- \BR
- Deletes any highlighted text in the translation pane and save a copy to
- the clipboard.
+ If you detect an error in a phrase book entry that is shown in the
+ \gui {Phrases and Guesses} view, you can also edit it in place by right
+ clicking on the entry, and selecting \gui Edit. After fixing the error
+ press \key{Return} to leave the editing mode.
- \li \inlineimage linguist-editcopy.png
- \BR
- Copies the highlighted text in the translation pane to the clipboard.
+ To delete a phrase, select it in the \gui {Source phrase} list, and then
+ select \gui {Remove Entry}.
- \li \inlineimage linguist-editpaste.png
- \BR
- Pastes the clipboard text into the translation pane.
+ To print an open phrase book, select \gui Phrases >
+ \gui {Print Phrase Book}.
- \li \inlineimage linguist-editfind.png
- \BR
- Pops up the Find dialog .
+ \section1 Validating Translations
- \li \inlineimage linguist-prev.png
- \BR
- Moves to the previous source phrase.
+ \QL provides the following validation tests for translations:
- \li \inlineimage linguist-next.png
- \BR
- Moves to the next source phrase.
+ \list
+ \li \e {Accelerator validation} detects translated phrases
+ that do not have an ampersand when the source phrase does and vice
+ versa.
+ \li \e {Punctuation validation} detects differences in the
+ terminating punctuation between source and translated phrases when
+ this may be significant. For example, warns if the source phrase
+ ends with an ellipsis, exclamation mark or question mark, and the
+ translated phrase does not, and vice versa.
+ \li \e {Phrases validation} detects source phrases that are
+ also in the phrase book but whose translation differs from that
+ given in the phrase book.
+ \li \e {Place marker validation} detects whether the same variables
+ (like \c %1, \c %2) are used both in the source text and in the
+ translation.
+ \endlist
- \li \inlineimage linguist-prevunfinished.png
- \BR
- Moves to the previous unfinished source phrase.
+ To switch validation tests on or off, select \gui Validation or use the
+ toolbar buttons.
- \li \inlineimage linguist-nextunfinished.png
- \BR
- Moves to the next unfinished source phrase.
+ Not accepted strings that fail validation tests are marked with the
+ \gui {Validation Failures} icon in the \gui Strings view. Accepted strings
+ are marked with \gui {Accepted/Warnings}.
- \li \inlineimage linguist-doneandnext.png
- \BR
- Marks the phrase as 'done' (translated) and move to the next
- unfinished source phrase.
+ If you switch validation off and then switch it on later,
+ \QL rechecks all phrases and marks any that fail validation.
- \li \inlineimage linguist-validateaccelerators.png
- \BR
- Toggles accelerator validation on and off.
+ If the translation you enter for the current string fails any of
+ the active validation tests, the failures
+ are listed in the \gui Warnings view. The first of these failure
+ messages is also shown in the status bar at the bottom of the main
+ window.
- \li \inlineimage linguist-validatepunctuation.png
- \BR
- Toggles phrase ending punctuation validation on and off.
+ \note Only results of \e{active} validation tests are reported.
- \li \inlineimage linguist-validatephrases.png
- \BR
- Toggles phrase book validation on or off.
+ \target multiple languages
+ \section1 Translating Multiple Languages Simultaneously
- \li \inlineimage linguist-validateplacemarkers.png
- \BR
- Toggles place marker validation on or off.
+ You can load and edit multiple translation files simultaneously.
+ The following screen shot displays \e{Polish} and \e{Japanese} translation
+ files loaded.
- \endlist
+ \image linguist-linguist_2.png
+ The translation area has text editing areas for both Polish and Japanese,
+ and these are color-coded for easier separation. The \gui Context view and
+ the \gui Strings view both have two status columns instead of one,
+ color-coded with the same colors. The left-most column
+ is related to the top-most language area (Polish above)
+ in the translation area, and the right-most column is related to the bottom
+ language area.
+
+ The \gui Items column in the \gui Context view combines the values
+ for both languages. If the number of translatable strings does not match the
+ number of accepted strings, either or both languages have strings that need
+ to be translated or accepted. The \gui Strings view shows the translation
+ acceptance state of each string for each language.
*/
/*!