Commit 1b1768f6 authored by Leena Miettinen's avatar Leena Miettinen Committed by The Qt Project
Browse files

Doc: edit Qt Linguist Manual for style


Replaced "e.g." with "for example" and "etc" with
"and so on". Removed contractions. Removed some extra spaces.

Change-Id: Ic0b9d5df2ee7f7bb080abb002027546f0fc6da4d
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent a09b10b3
dev 5.10 5.11 5.12 5.12.1 5.12.10 5.12.11 5.12.12 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.12.7 5.12.8 5.12.9 5.13 5.13.0 5.13.1 5.13.2 5.14 5.14.0 5.14.1 5.14.2 5.15 5.15.0 5.15.1 5.15.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.9.8 6.0 6.0.0 6.1 6.1.0 6.1.1 6.1.2 6.1.3 6.2 6.2.0 6.2.1 6.2.2 old/5.1 old/5.2 wip/cmake wip/winrt v5.15.0-alpha1 v5.14.1 v5.14.0 v5.14.0-rc2 v5.14.0-rc1 v5.14.0-beta3 v5.14.0-beta2 v5.14.0-beta1 v5.14.0-alpha1 v5.13.2 v5.13.1 v5.13.0 v5.13.0-rc3 v5.13.0-rc2 v5.13.0-rc1 v5.13.0-beta4 v5.13.0-beta3 v5.13.0-beta2 v5.13.0-beta1 v5.13.0-alpha1 v5.12.7 v5.12.6 v5.12.5 v5.12.4 v5.12.3 v5.12.2 v5.12.1 v5.12.0 v5.12.0-rc2 v5.12.0-rc1 v5.12.0-beta4 v5.12.0-beta3 v5.12.0-beta2 v5.12.0-beta1 v5.12.0-alpha1 v5.11.3 v5.11.2 v5.11.1 v5.11.0 v5.11.0-rc2 v5.11.0-rc1 v5.11.0-beta4 v5.11.0-beta3 v5.11.0-beta2 v5.11.0-beta1 v5.11.0-alpha1 v5.10.1 v5.10.0 v5.10.0-rc3 v5.10.0-rc2 v5.10.0-rc1 v5.10.0-beta4 v5.10.0-beta3 v5.10.0-beta2 v5.10.0-beta1 v5.10.0-alpha1 v5.9.9 v5.9.8 v5.9.7 v5.9.6 v5.9.5 v5.9.4 v5.9.3 v5.9.2 v5.9.1 v5.9.0 v5.9.0-rc2 v5.9.0-rc1 v5.9.0-beta4 v5.9.0-beta3 v5.9.0-beta2 v5.9.0-beta1 v5.9.0-alpha1 v5.8.0 v5.8.0-rc1 v5.8.0-beta1 v5.8.0-alpha1 v5.7.1 v5.7.0 v5.7.0-rc1 v5.7.0-beta1 v5.7.0-alpha1 v5.6.3 v5.6.2 v5.6.1 v5.6.1-1 v5.6.0 v5.6.0-rc1 v5.6.0-beta1 v5.6.0-alpha1 v5.5.1 v5.5.0 v5.5.0-rc1 v5.5.0-beta1 v5.5.0-alpha1 v5.4.2 v5.4.1 v5.4.0 v5.4.0-rc1 v5.4.0-beta1 v5.4.0-alpha1 v5.3.2 v5.3.1 v5.3.0 v5.3.0-rc1 v5.3.0-beta1 v5.3.0-alpha1 v5.2.1 v5.2.0 v5.2.0-rc1 v5.2.0-beta1 v5.2.0-alpha1 v5.1.1 v5.1.0 v5.1.0-rc2 v5.1.0-rc1 v5.1.0-beta1 v5.1.0-alpha1
No related merge requests found
Showing with 21 additions and 17 deletions
...@@ -111,13 +111,13 @@ ...@@ -111,13 +111,13 @@
\list \list
\li A single phrase may need to be translated into several \li A single phrase may need to be translated into several
different forms depending on context, e.g. \e open in English different forms depending on context. For example, \e open in English
might become \e{\ouml}\e{ffnen}, "open file", or \e aufbauen, might become \e{\ouml}\e{ffnen}, "open file", or \e aufbauen,
"open internet connection", in German. "open internet connection", in German.
\li Keyboard accelerators may need to be changed but without \li Keyboard accelerators may need to be changed but without
introducing conflicts, e.g. "\&Quit" in English becomes "Avslutt" introducing conflicts. For example, "\&Quit" in English becomes "Avslutt"
in Norwegian which doesn't contain a "Q". We cannot use a letter in Norwegian which does not contain a "Q". We cannot use a letter
that is already in use - unless we change several accelerators. that is already in use - unless we change several accelerators.
\li Phrases that contain variables, for example, "The 25 files \li Phrases that contain variables, for example, "The 25 files
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
This tool is run whenever a release of the application is to be This tool is run whenever a release of the application is to be
made, from initial test version through to final release made, from initial test version through to final release
version. If the QM files are not created, e.g. because an version. If the QM files are not created, for example because an
alpha release is required before any translation has been alpha release is required before any translation has been
undertaken, the application will run perfectly well using the text undertaken, the application will run perfectly well using the text
the developers placed in the source files. Once the QM files the developers placed in the source files. Once the QM files
...@@ -694,12 +694,12 @@ ...@@ -694,12 +694,12 @@
The underlined character in a menu item or button label signifies The underlined character in a menu item or button label signifies
that pressing the Alt key with the underlined character will that pressing the Alt key with the underlined character will
perform the same action as clicking the menu item or pressing the perform the same action as clicking the menu item or pressing the
button. For example, most applications have a \e{File} menu with button. For example, most applications have a \e{File} menu with
the "F" in the word "File" underlined. In these applications the the "F" in the word "File" underlined. In these applications the
\e{File} menu can be invoked either by clicking the word "File" on \e{File} menu can be invoked either by clicking the word "File" on
the menu bar or by pressing \e{Alt+F}. To identify an accelerator the menu bar or by pressing \e{Alt+F}. To identify an accelerator
key in the translation text ("File") precede it with an ampersand, key in the translation text ("File") precede it with an ampersand:
e.g. \e{\&File}. If a string to be translated has an ampersand in \e{\&File}. If a string to be translated has an ampersand in
it, then the translation for that string should also have an it, then the translation for that string should also have an
ampersand in it, preferably in front of the same character. ampersand in it, preferably in front of the same character.
...@@ -709,7 +709,7 @@ ...@@ -709,7 +709,7 @@
translated phrase does not contain the same character or if that translated phrase does not contain the same character or if that
character has already been used in the translation of some other character has already been used in the translation of some other
Alt key accelerator. Conflicts with other Alt key accelerators Alt key accelerator. Conflicts with other Alt key accelerators
must be avoided within a context. Note that some Alt key must be avoided within a context. Note that some Alt key
accelerators, usually those on the menu bar, may apply in other accelerators, usually those on the menu bar, may apply in other
contexts. contexts.
...@@ -727,9 +727,9 @@ ...@@ -727,9 +727,9 @@
and then clicking \e{New} with the mouse, or by entering \e{Alt+F} and then clicking \e{New} with the mouse, or by entering \e{Alt+F}
and \e{N}. and \e{N}.
Each Ctrl key accelerator is shown in the \l{Strings Window} Each Ctrl key accelerator is shown in the \gui Strings window
{string list} as a separate string, e.g. \key{Ctrl+Enter}. Since as a separate string, for example \key{Ctrl+Enter}. Since
the string doesn't have a context to give it meaning, e.g. like 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, the context of the phrase in which an Alt key accelerator appears,
the translator must rely on the UI developer to include a the translator must rely on the UI developer to include a
\l{QObject::tr()} {disambiguation comment} to explain the action \l{QObject::tr()} {disambiguation comment} to explain the action
...@@ -765,7 +765,7 @@ ...@@ -765,7 +765,7 @@
be replaced with the first and next file names respectively. The be replaced with the first and next file names respectively. The
same numbered arguments must appear in the translation, but not same numbered arguments must appear in the translation, but not
necessarily in the same order. A German translation of the string necessarily in the same order. A German translation of the string
might reverse the phrases, e.g. \c{Datei %2 wird bearbeitet, wenn might reverse the phrases, for example \c{Datei %2 wird bearbeitet, wenn
Datei %1 fertig ist}. Both numbered arguments appear in the Datei %1 fertig ist}. Both numbered arguments appear in the
translation, but in the reverse order. \c{%i} will always be translation, but in the reverse order. \c{%i} will always be
replaced by the same text in the translation strings, regardless replaced by the same text in the translation strings, regardless
...@@ -1287,7 +1287,7 @@ ...@@ -1287,7 +1287,7 @@
In production applications a more flexible approach, for example, In production applications a more flexible approach, for example,
loading translations according to locale, might be more appropriate. If loading translations according to locale, might be more appropriate. If
the TS files are all named according to a convention such as the TS files are all named according to a convention such as
\e appname_locale, e.g. \c tt2_fr, \c tt2_de etc, then the \e appname_locale, for example \c tt2_fr, \c tt2_de, and so on, then the
code above will load the current locale's translation at runtime. code above will load the current locale's translation at runtime.
If there is no translation file for the current locale the application If there is no translation file for the current locale the application
...@@ -1330,7 +1330,9 @@ ...@@ -1330,7 +1330,9 @@
a dialog that contained two separate frames, each of which contained an a dialog that contained two separate frames, each of which contained an
"Enabled" option would need each identified because in some languages the "Enabled" option would need each identified because in some languages the
translation would differ between the two. This is easily achieved using the translation would differ between the two. This is easily achieved using the
two argument form of the \c tr() call, e.g. two argument form of the \c tr() call.
For example:
\snippet doc_src_linguist-manual.cpp 10 \snippet doc_src_linguist-manual.cpp 10
...@@ -1351,7 +1353,9 @@ ...@@ -1351,7 +1353,9 @@
In large complex applications it may be difficult for the translator to In large complex applications it may be difficult for the translator to
see where a particular source text comes from. This problem can be see where a particular source text comes from. This problem can be
solved by adding a comment using the keyword \e TRANSLATOR which solved by adding a comment using the keyword \e TRANSLATOR which
describes the navigation steps to reach the text in question; e.g. describes the navigation steps to reach the text in question.
For example:
\snippet doc_src_linguist-manual.cpp 12 \snippet doc_src_linguist-manual.cpp 12
...@@ -1373,9 +1377,9 @@ ...@@ -1373,9 +1377,9 @@
If a French translation is loaded, this will expand to "0 item If a French translation is loaded, this will expand to "0 item
remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items
remplac\unicode{233}s", etc., depending on \c{n}'s value. remplac\unicode{233}s", and so on, depending on \c{n}'s value.
And if no translation is loaded, the original string is used, with \c %n And if no translation is loaded, the original string is used, with \c %n
replaced with count's value (e.g., "6 item(s) replaced"). replaced with count's value (for example, "6 item(s) replaced").
To handle plural forms in the native language, you need to load a To handle plural forms in the native language, you need to load a
translation file for this language, too. translation file for this language, too.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment