summaryrefslogtreecommitdiffstats
path: root/tools/linguist/book/linguist-programmer.leaf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist/book/linguist-programmer.leaf')
-rw-r--r--tools/linguist/book/linguist-programmer.leaf30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/linguist/book/linguist-programmer.leaf b/tools/linguist/book/linguist-programmer.leaf
index 311ac40b..31225a6a 100644
--- a/tools/linguist/book/linguist-programmer.leaf
+++ b/tools/linguist/book/linguist-programmer.leaf
@@ -241,7 +241,7 @@ understood as meaning \c MyNamespace::MyClass::tr().
If the quoted text is not in a member function of a QObject subclass,
use either the tr() function of an appropriate class, or the
-QApplication::translate() function directly:
+QApplication::translate() function directly:
\code
void some_global_function( LoginWidget *logwid )
@@ -258,30 +258,30 @@ QApplication::translate() function directly:
}
\endcode
-\section3 Using QT_TR_NOOP() and QT_TRANSLATE_NOOP()
+\section3 Using TQT_TR_NOOP() and TQT_TRANSLATE_NOOP()
If you need to have translatable text completely outside a function,
-there are two macros to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP().
+there are two macros to help: TQT_TR_NOOP() and TQT_TRANSLATE_NOOP().
These macros merely mark the text for extraction by \l{lupdate}.
-The macros expand to just the text (without the context).
+The macros expand to just the text (without the context).
-Example of QT_TR_NOOP():
+Example of TQT_TR_NOOP():
\code
QString FriendlyConversation::greeting( int greet_type )
{
static const char* greeting_strings[] = {
- QT_TR_NOOP( "Hello" ),
- QT_TR_NOOP( "Goodbye" )
+ TQT_TR_NOOP( "Hello" ),
+ TQT_TR_NOOP( "Goodbye" )
};
return tr( greeting_strings[greet_type] );
}
\endcode
-Example of QT_TRANSLATE_NOOP():
+Example of TQT_TRANSLATE_NOOP():
\code
static const char* greeting_strings[] = {
- QT_TRANSLATE_NOOP( "FriendlyConversation", "Hello" ),
- QT_TRANSLATE_NOOP( "FriendlyConversation", "Goodbye" )
+ TQT_TRANSLATE_NOOP( "FriendlyConversation", "Hello" ),
+ TQT_TRANSLATE_NOOP( "FriendlyConversation", "Goodbye" )
};
QString FriendlyConversation::greeting( int greet_type )
@@ -337,7 +337,7 @@ English version}, above, shows the English version.
\index QTranslator
-This line includes the definition of the \l QTranslator class.
+This line includes the definition of the \l QTranslator class.
Objects of this class provide translations for user-visible text.
\skipto QTranslator
@@ -590,7 +590,7 @@ version}, above, the central widget with the four buttons is an
When \l lupdate is run it not only extracts the source texts but it
also groups them into contexts. A context is the name of the class in
which the source text appears. Thus, in this example, "ArrowPad" is a
-context: it is the context of the texts in the \c ArrowPad class.
+context: it is the context of the texts in the \c ArrowPad class.
The \c TQ_OBJECT macro defines \c tr(x) in \c ArrowPad like this
\index QApplication!translate()
@@ -796,7 +796,7 @@ then the example. What effect did this change have?
\index Canada
\index French Canada
-Set \c LANG=fr_CA (French Canada) and run the example program again.
+Set \c LANG=fr_CA (French Canada) and run the example program again.
Explain why the result is the same as with \c LANG=fr.
Change one of the accelerators in the Dutch translation to eliminate the
@@ -926,7 +926,7 @@ translation file based on the current locale.
We will use the translations in the \c tt3_pt.ts file that is provided.
-Set the \c LANG environment variable to \c pt, and then run \c tt3.
+Set the \c LANG environment variable to \c pt, and then run \c tt3.
You should still see the English version, as shown in the \e
{Tutorial 3 Screenshot, "Troll Print 1.0", English version}, above.
Now run \l lrelease, e.g. \c {lrelease tt3.pro}, and then run the
@@ -1031,7 +1031,7 @@ Try adding these comments to some source files, particularly to
dialog classes, describing the navigation necessary to reach the
dialogs. You could also add them to the example files, e.g. \c
mainwindow.cpp and \c printpanel.cpp are appropriate files. Run \l
-lupdate and then start \e {Qt Linguist} and load in \c tt3_pt.ts.
+lupdate and then start \e {Qt Linguist} and load in \c tt3_pt.ts.
You should see the comments in the \e {Source text and comments} area
as you browse through the list of source texts.