summaryrefslogtreecommitdiffstats
path: root/doc/html/linguist-manual-4.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/linguist-manual-4.html')
-rw-r--r--doc/html/linguist-manual-4.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/html/linguist-manual-4.html b/doc/html/linguist-manual-4.html
index e33dcc97..ddb4df71 100644
--- a/doc/html/linguist-manual-4.html
+++ b/doc/html/linguist-manual-4.html
@@ -313,7 +313,7 @@ TRANSLATIONS = tt2_fr.ts \
<!-- index lupdate --><!-- index tt2_fr.ts --><!-- index tt2_nl.ts --> <p>Run <a href="linguist-manual-2.html#2">lupdate</a>; it should produce two identical message files <tt>tt2_fr.ts</tt> and <tt>tt2_nl.ts</tt>. These files will contain all the source texts marked for translation with <tt>tr()</tt> calls and their contexts.</p>
<h5><a name="2-2-1"></a>Line by Line Walk-through</h5>
<!-- index ArrowPad!in Translation Tutorial --><!-- index English Language --><p>In <tt>arrowpad.h</tt> we define the <tt>ArrowPad</tt> subclass which is a subclass of <a href="tqwidget.html">TQWidget</a>. In the <em>Tutorial 2 Screenshot, English version</em>, above, the central widget with the four buttons is an <tt>ArrowPad</tt>.</p>
-<pre> class ArrowPad : public <a href="ntqgrid.html">TQGrid</a>
+<pre> class ArrowPad : public <a href="tqgrid.html">TQGrid</a>
</pre>
<!-- index TQ_OBJECT --><!-- index tr() --><!-- index TQObject!tr() --><!-- index Translation Contexts --><!-- index Contexts!for Translation --> <p>When <a href="linguist-manual-2.html#2">lupdate</a> 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 <tt>ArrowPad</tt> class. The <tt>TQ_OBJECT</tt> macro defines <tt>tr(x)</tt> in <tt>ArrowPad</tt> like this</p>
<!-- index TQApplication!translate() --><!-- index translate()!TQApplication --><pre>
@@ -440,12 +440,12 @@ TRANSLATIONS = tt3_pt.ts
twoSided-&gt;<a href="ntqgroupbox.html#setTitle">setTitle</a>( <a href="tqobject.html#tr">tr</a>("2-sided") );
but = new <a href="tqradiobutton.html">TQRadioButton</a>( <a href="tqobject.html#tr">tr</a>("Enabled"), twoSided );
but = new <a href="tqradiobutton.html">TQRadioButton</a>( <a href="tqobject.html#tr">tr</a>("Disabled"), twoSided );
- but-&gt;<a href="ntqbutton.html#toggle">toggle</a>();
+ but-&gt;<a href="tqbutton.html#toggle">toggle</a>();
<a href="ntqhbuttongroup.html">TQHButtonGroup</a> *colors = new <a href="ntqhbuttongroup.html">TQHButtonGroup</a>( this );
colors-&gt;<a href="ntqgroupbox.html#setTitle">setTitle</a>( <a href="tqobject.html#tr">tr</a>("Colors") );
but = new <a href="tqradiobutton.html">TQRadioButton</a>( <a href="tqobject.html#tr">tr</a>("Enabled"), colors );
but = new <a href="tqradiobutton.html">TQRadioButton</a>( <a href="tqobject.html#tr">tr</a>("Disabled"), colors );
- but-&gt;<a href="ntqbutton.html#toggle">toggle</a>();
+ but-&gt;<a href="tqbutton.html#toggle">toggle</a>();
</pre>
<p>Notice the two occurrences of <tt>tr("Enabled")</tt> and of <tt>tr("Disabled")</tt> in PrintPanel. Since both "Enabled"s and "Disabled"s appear in the same context <em>TQt Linguist</em> will only display one occurrence of each and will use the same translations for the duplicates that it doesn't display. Whilst this is a useful timesaver, in some languages, such as Portuguese, the second occurrence requires a separate translation. We will see how <em>TQt Linguist</em> can be made to display all the occurrences for separate translation shortly.</p>
<!-- index MainWindow!in Translation Tutorial --><p>The header file for <tt>MainWindow</tt>, <tt>mainwindow.h</tt>, contains no surprises. In the implementation, <tt>mainwindow.cpp</tt>, we have some user-visible source texts that must be marked for translation.</p>