summaryrefslogtreecommitdiffstats
path: root/doc/src/internationalization/linguist-manual.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/internationalization/linguist-manual.qdoc')
-rw-r--r--doc/src/internationalization/linguist-manual.qdoc368
1 files changed, 23 insertions, 345 deletions
diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc
index 5d388f1..3e06a2f 100644
--- a/doc/src/internationalization/linguist-manual.qdoc
+++ b/doc/src/internationalization/linguist-manual.qdoc
@@ -62,7 +62,7 @@
software engineers and the translator. The chapter describes the
use of two tools. The \l{lupdate} tool is used to synchronize
source code and translations. The \l{lrelease} tool is used to
- create runtime translation files for use by the released
+ create run-time translation files for use by the released
application.
The \l{linguist-translators.html}{Translators} chapter is for
@@ -119,7 +119,7 @@
\o Phrases that contain variables, for example, "The 25 files
selected will take 63 seconds to process", where the two numbers
- are inserted programmatically at runtime may need to be reworded
+ are inserted programmatically at run-time may need to be reworded
because in a different language the word order and therefore the
placement of the variables may have to change.
@@ -147,7 +147,7 @@
\row \o{1,2} \inlineimage wVista-Cert-border-small.png
\o \e{Qt Linguist 4.3 is Certified for Windows Vista}
-
+
\row \o Windows Vista and the Windows Vista Start button are
trademarks or registered trademarks of Microsoft Corporation in
the United States and/or other countries.
@@ -508,7 +508,7 @@
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.
-
+
\row
\o Not Accepted
\o \inlineimage linguist-check-off.png
@@ -781,7 +781,7 @@
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
- runtime. As with Alt key accelerators, if the translator changes
+ 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.
@@ -790,14 +790,14 @@
supported languages, \e {Qt} automatically translates these
strings.
- \section2 Handling Numbered Arguments
+ \section2 Handling Numbered Arguments and Plurals
Some phrases contain numbered arguments. A numbered argument is a
- placeholder that will be replaced with text at runtime. A numbered
+ placeholder that will be replaced with text at run-time. A numbered
argument appears in a source string as a percent sign followed by
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 runtime, \c{%1} and \c{%2} will
+ \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
same numbered arguments must appear in the translation, but not
necessarily in the same order. A German translation of the string
@@ -808,336 +808,14 @@
of where argument \e{i} appears in the argument sequence in the
source string.
- \section2 Plurals
-
- The problem of plurals in output is resolved by using an overload of
- the \c tr() function with the signature
- \code
- QString tr(const char *text, const char *comment, int n);
- \endcode
- Using built in comparisons for the value of \c n the tr() function will
- translate the phrase to the plural form for the target language.
-
- Different languages have various forms for plurals beyond simply
- \e singular and \e plural. The rules for determining which form of the
- plural to use are encoded as conditional tests. Below is a table
- representing the numbers associated with the forms rather than the
- conditional tests themselves.
-
-
-
- \table 90%
- \header
- \o Language
- \o Form 1
- \o Form 2
- \o Form 3
- \o Form 4
- \row
- \o Arabic
- \o 0, 1, 11-102, 111-202...
- \o 2
- \o 3-10, 103-110, 203-210...
- \o
- \row
- \o Basque
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Bulgarian
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Catalan
- \o 1
- \o 11, 11 000-11 999, 11 000 000-11 999 999...
- \o 0, 2-10, 12-10 999, 12-10 999 999...
- \o
- \row
- \o Chinese-CN
- \o 0-
- \o
- \o
- \o
- \row
- \o Chinese-HK
- \o 0-
- \o
- \o
- \o
- \row
- \o Chinese-TW
- \o 0-
- \o
- \o
- \o
- \row
- \o Croation
- \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101...
- \o 2-4, 22-24, 32-34, 42-44...
- \o 0, 5-20, 25-30, 35-40...
- \o
- \row
- \o Czech
- \o 1
- \o 2-4
- \o 0, 5-
- \o
- \row
- \o Danish
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Dutch
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o English
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o English-US
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Estonian
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Finnish
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o French-CA
- \o 0, 1
- \o 2-100, 101-
- \o
- \o
- \row
- \o French-FR
- \o 0, 1
- \o 2-100, 101-
- \o
- \o
- \row
- \o Galician
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o German
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Greek
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Hebrew
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Hungarian
- \o 0-
- \o
- \o
- \o
- \row
- \o Icelandic
- \o 1, 21, 31, 41, 51....101, 121, 131...
- \o 0, 2-20, 22-30, 32-40...102-120...
- \o
- \o
- \row
- \o Indonesian
- \o 0-
- \o
- \o
- \o
- \row
- \o Italian
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Japanese
- \o 0-
- \o
- \o
- \o
- \row
- \o Korean
- \o 0-
- \o
- \o
- \o
- \row
- \o Latvian
- \o 0
- \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101, 131, 141...
- \o 2-20, 22-30, 32-40, 42-50...202-220, 222-230...
- \o
- \row
- \o Lithuanian
- \o 1, 21, 31, 41, 51...101, 121, 131...
- \o 2-9, 22-29, 32-39...102-109, 122-129, 132-139...
- \o 0, 10-20, 30, 40, 50...110-120, 130, 140...
- \o
- \row
- \o Malay
- \o 0-
- \o
- \o
- \o
- \row
- \o Norwegian
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Persian
- \o 0-
- \o
- \o
- \o
- \row
- \o Polish
- \o 1
- \o 2-4, 22-24, 32-34...
- \o 5-21, 25-31, 35-41...
- \o
- \row
- \o Portugese-BR
- \o 0, 1
- \o 2-100, 101-
- \o
- \o
- \row
- \o Portugese-PT
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Romanian
- \o 1
- \o 0, 2-19, 101-119, 201-219...
- \o 20-100, 120-200, 220-300...
- \o
- \row
- \o Russian
- \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101...
- \o 2-4, 22-24, 32-34...
- \o 0, 5-20, 25-30, 35-40...
- \o
- \row
- \o Serbian
- \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101...
- \o 2-4, 22-24, 32-34...
- \o 0, 5-20, 25-30, 35-40...
- \o
- \row
- \o Slovak
- \o 1
- \o 2-4
- \o 0, 5-20, 25-30, 35-40...
- \o
- \row
- \o Slovene
- \o 1, 101, 201, 301...
- \o 2, 102, 202, 302...
- \o 3, 4, 103, 104, 203, 204, 303, 304...
- \o 0, 5-100, 105-200, 205-300...
- \row
- \o Spanish-US
- \o 1
- \o 0, 2-
- \o
- \o
- \row
- \o Spanish-ES
- \o 1
- \o 0, 2-
- \o
- \o
- \row
- \o Swedish
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Tagalog
- \o 0, 1
- \o 2, 3, 5, 7-8, 10-13, 15, 17-18, 20-23...101...1001
- \o 4, 6, 9, 14, 16, 19, 24, 26, 29...104, 106, 109...
- \o
- \row
- \o Thai
- \o 0-
- \o
- \o
- \o
- \row
- \o Turkish
- \o 0-
- \o
- \o
- \o
- \row
- \o Ukrainian
- \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101...
- \o 2-4, 22-24, 32-34...
- \o 0, 5-20, 25-30, 35-40...
- \o
- \row
- \o Urdu
- \o 1
- \o 0, 2-100, 101-
- \o
- \o
- \row
- \o Vietnamese
- \o 0-
- \o
- \o
- \o
- \endtable
-
- These rules are embedded within the Qt libraries, there is no need for
- the developer to know them. Merely to use the correct \c tr() call.
-
+ The use of numbered arguments is often accompanied by the use of
+ plurals in the source text. In many languages, the form of the
+ 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
@@ -1157,7 +835,7 @@
{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: E.g. \c app_de.ts sets the target language to German,
+ 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
@@ -1287,7 +965,7 @@
can be used to edit XLIFF files generated by other programs. For standard
Qt projects, however, only the TS file format is used.
\o QM \e {Qt message files} \BR are binary files that contain
- translations used by an application at runtime. These files are
+ translations used by an application at run-time. These files are
generated by \l lrelease, but can also be generated by \QL.
\o \c .qph \e {Qt phrase book files} \BR are human-readable XML
files containing standard phrases and their translations. These files
@@ -1416,7 +1094,7 @@
\endlist
- \o \gui {Tools}
+ \o \gui {Tools}
\list
\o \gui {Batch Translation...} \BR Opens a \l{Batch
@@ -1427,7 +1105,7 @@
Preview}. This window let you instantly see translations for
forms created with \QD. \endlist
- \o \gui {View}
+ \o \gui {View}
\list
\o \gui {Revert Sorting} \BR puts the items in the \l{Context
@@ -1449,7 +1127,7 @@
\endlist
- \o \gui {Help}
+ \o \gui {Help}
\list
\o \gui {Manual F1} \BR opens this manual.
\o \gui {About Qt Linguist} \BR Shows information about \QL.
@@ -1621,7 +1299,7 @@
\code
CODECFORTR = UTF-8
\endcode
-
+
See the \l lupdate and \l lrelease sections.
\section2 Loading Translations
@@ -1683,7 +1361,7 @@
\snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 9
- \section2 Distinguishing Identical Strings That Require Different Translations
+ \section2 Distinguishing Between Identical Translatable Strings
The \l lupdate program automatically provides a \e context for every
source text. This context is the class name of the class that contains