~ubuntu-branches/ubuntu/trusty/gettext/trusty

« back to all changes in this revision

Viewing changes to gettext-tools/doc/gettext_8.html

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-10-21 19:12:18 UTC
  • mfrom: (2.1.22 sid)
  • Revision ID: package-import@ubuntu.com-20131021191218-5t1ixdaae0dbc1l3
Tags: 0.18.3.1-1ubuntu1
* Merge with Debian; remaining changes:
  - Allow the package to cross-build.
  - Define a stage1 profile to build without java and git.
  - Throw away /usr/lib/gettext/gnu.gettext*; we don't need them.
  - Explicitly configure with --disable-csharp.
  - Keep gettext.jar in /usr/share/gettext instead of moving it to
    /usr/share/java.
  - Drop autopoint recommends of gettext. It pulls in git and
    other sizable packages which make the CDs explode.
* gettext-el: Add an alternative dependency on emacs24.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<HTML>
2
2
<HEAD>
3
3
<!-- This HTML file has been created by texi2html 1.52b
4
 
     from gettext.texi on 6 June 2010 -->
 
4
     from gettext.texi on 15 August 2013 -->
5
5
 
6
6
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
7
7
<TITLE>GNU gettext utilities - 8  Editing PO Files</TITLE>
13
13
 
14
14
<H1><A NAME="SEC55" HREF="gettext_toc.html#TOC55">8  Editing PO Files</A></H1>
15
15
<P>
16
 
<A NAME="IDX328"></A>
 
16
<A NAME="IDX334"></A>
17
17
 
18
18
</P>
19
19
 
21
21
 
22
22
<H2><A NAME="SEC56" HREF="gettext_toc.html#TOC56">8.1  KDE's PO File Editor</A></H2>
23
23
<P>
24
 
<A NAME="IDX329"></A>
 
24
<A NAME="IDX335"></A>
25
25
 
26
26
</P>
27
27
 
28
28
 
29
29
<H2><A NAME="SEC57" HREF="gettext_toc.html#TOC57">8.2  GNOME's PO File Editor</A></H2>
30
30
<P>
31
 
<A NAME="IDX330"></A>
 
31
<A NAME="IDX336"></A>
32
32
 
33
33
</P>
34
34
 
35
35
 
36
36
<H2><A NAME="SEC58" HREF="gettext_toc.html#TOC58">8.3  Emacs's PO File Editor</A></H2>
37
37
<P>
38
 
<A NAME="IDX331"></A>
 
38
<A NAME="IDX337"></A>
39
39
 
40
40
</P>
41
41
 
64
64
<H3><A NAME="SEC59" HREF="gettext_toc.html#TOC59">8.3.1  Completing GNU <CODE>gettext</CODE> Installation</A></H3>
65
65
 
66
66
<P>
67
 
<A NAME="IDX332"></A>
68
 
<A NAME="IDX333"></A>
 
67
<A NAME="IDX338"></A>
 
68
<A NAME="IDX339"></A>
69
69
Once you have received, unpacked, configured and compiled the GNU
70
70
<CODE>gettext</CODE> distribution, the <SAMP>&lsquo;make install&rsquo;</SAMP> command puts in
71
71
place the programs <CODE>xgettext</CODE>, <CODE>msgfmt</CODE>, <CODE>gettext</CODE>, and
75
75
 
76
76
</P>
77
77
<P>
78
 
<A NAME="IDX334"></A>
79
 
<A NAME="IDX335"></A>
 
78
<A NAME="IDX340"></A>
 
79
<A NAME="IDX341"></A>
80
80
During the installation of the PO mode, you might want to modify your
81
81
file <TT>&lsquo;.emacs&rsquo;</TT>, once and for all, so it contains a few lines looking
82
82
like:
126
126
<H3><A NAME="SEC60" HREF="gettext_toc.html#TOC60">8.3.2  Main PO mode Commands</A></H3>
127
127
 
128
128
<P>
129
 
<A NAME="IDX336"></A>
130
 
<A NAME="IDX337"></A>
 
129
<A NAME="IDX342"></A>
 
130
<A NAME="IDX343"></A>
131
131
After setting up Emacs with something similar to the lines in
132
132
section <A HREF="gettext_8.html#SEC59">8.3.1  Completing GNU <CODE>gettext</CODE> Installation</A>, PO mode is activated for a window when Emacs finds a
133
133
PO file in that window.  This puts the window read-only and establishes a
159
159
 
160
160
<DT><KBD>_</KBD>
161
161
<DD>
162
 
<A NAME="IDX338"></A>
 
162
<A NAME="IDX344"></A>
163
163
Undo last modification to the PO file (<CODE>po-undo</CODE>).
164
164
 
165
165
<DT><KBD>Q</KBD>
166
166
<DD>
167
 
<A NAME="IDX339"></A>
 
167
<A NAME="IDX345"></A>
168
168
Quit processing and save the PO file (<CODE>po-quit</CODE>).
169
169
 
170
170
<DT><KBD>q</KBD>
171
171
<DD>
172
 
<A NAME="IDX340"></A>
 
172
<A NAME="IDX346"></A>
173
173
Quit processing, possibly after confirmation (<CODE>po-confirm-and-quit</CODE>).
174
174
 
175
175
<DT><KBD>0</KBD>
176
176
<DD>
177
 
<A NAME="IDX341"></A>
 
177
<A NAME="IDX347"></A>
178
178
Temporary leave the PO file window (<CODE>po-other-window</CODE>).
179
179
 
180
180
<DT><KBD>?</KBD>
181
181
<DD>
182
182
<DT><KBD>h</KBD>
183
183
<DD>
184
 
<A NAME="IDX342"></A>
185
 
<A NAME="IDX343"></A>
 
184
<A NAME="IDX348"></A>
 
185
<A NAME="IDX349"></A>
186
186
Show help about PO mode (<CODE>po-help</CODE>).
187
187
 
188
188
<DT><KBD>=</KBD>
189
189
<DD>
190
 
<A NAME="IDX344"></A>
 
190
<A NAME="IDX350"></A>
191
191
Give some PO file statistics (<CODE>po-statistics</CODE>).
192
192
 
193
193
<DT><KBD>V</KBD>
194
194
<DD>
195
 
<A NAME="IDX345"></A>
 
195
<A NAME="IDX351"></A>
196
196
Batch validate the format of the whole PO file (<CODE>po-validate</CODE>).
197
197
 
198
198
</DL>
199
199
 
200
200
<P>
201
 
<A NAME="IDX346"></A>
202
 
<A NAME="IDX347"></A>
 
201
<A NAME="IDX352"></A>
 
202
<A NAME="IDX353"></A>
203
203
The command <KBD>_</KBD> (<CODE>po-undo</CODE>) interfaces to the Emacs
204
204
<EM>undo</EM> facility.  See section ‘Undoing Changes’ in <CITE>The Emacs Editor</CITE>.  Each time <KBD>_</KBD> is typed, modifications which the translator
205
205
did to the PO file are undone a little more.  For the purpose of
211
211
 
212
212
</P>
213
213
<P>
214
 
<A NAME="IDX348"></A>
215
 
<A NAME="IDX349"></A>
216
 
<A NAME="IDX350"></A>
217
 
<A NAME="IDX351"></A>
 
214
<A NAME="IDX354"></A>
 
215
<A NAME="IDX355"></A>
 
216
<A NAME="IDX356"></A>
 
217
<A NAME="IDX357"></A>
218
218
The commands <KBD>Q</KBD> (<CODE>po-quit</CODE>) and <KBD>q</KBD>
219
219
(<CODE>po-confirm-and-quit</CODE>) are used when the translator is done with the
220
220
PO file.  The former is a bit less verbose than the latter.  If the file
227
227
 
228
228
</P>
229
229
<P>
230
 
<A NAME="IDX352"></A>
231
 
<A NAME="IDX353"></A>
 
230
<A NAME="IDX358"></A>
 
231
<A NAME="IDX359"></A>
232
232
The command <KBD>0</KBD> (<CODE>po-other-window</CODE>) is another, softer way,
233
233
to leave PO mode, temporarily.  It just moves the cursor to some other
234
234
Emacs window, and pops one if necessary.  For example, if the translator
242
242
 
243
243
</P>
244
244
<P>
245
 
<A NAME="IDX354"></A>
246
 
<A NAME="IDX355"></A>
247
 
<A NAME="IDX356"></A>
 
245
<A NAME="IDX360"></A>
 
246
<A NAME="IDX361"></A>
 
247
<A NAME="IDX362"></A>
248
248
The command <KBD>h</KBD> (<CODE>po-help</CODE>) displays a summary of all available PO
249
249
mode commands.  The translator should then type any character to resume
250
250
normal PO mode operations.  The command <KBD>?</KBD> has the same effect
252
252
 
253
253
</P>
254
254
<P>
255
 
<A NAME="IDX357"></A>
256
 
<A NAME="IDX358"></A>
 
255
<A NAME="IDX363"></A>
 
256
<A NAME="IDX364"></A>
257
257
The command <KBD>=</KBD> (<CODE>po-statistics</CODE>) computes the total number of
258
258
entries in the PO file, the ordinal of the current entry (counted from
259
259
1), the number of untranslated entries, the number of obsolete entries,
261
261
 
262
262
</P>
263
263
<P>
264
 
<A NAME="IDX359"></A>
265
 
<A NAME="IDX360"></A>
 
264
<A NAME="IDX365"></A>
 
265
<A NAME="IDX366"></A>
266
266
The command <KBD>V</KBD> (<CODE>po-validate</CODE>) launches <CODE>msgfmt</CODE> in
267
267
checking and verbose
268
268
mode over the current PO file.  This command first offers to save the
273
273
 
274
274
</P>
275
275
<P>
276
 
<A NAME="IDX361"></A>
 
276
<A NAME="IDX367"></A>
277
277
The program <CODE>msgfmt</CODE> runs asynchronously with Emacs, so the
278
278
translator regains control immediately while her PO file is being studied.
279
279
Error output is collected in the Emacs <SAMP>&lsquo;*compilation*&rsquo;</SAMP> buffer,
289
289
<H3><A NAME="SEC61" HREF="gettext_toc.html#TOC61">8.3.3  Entry Positioning</A></H3>
290
290
 
291
291
<P>
292
 
<A NAME="IDX362"></A>
 
292
<A NAME="IDX368"></A>
293
293
The cursor in a PO file window is almost always part of
294
294
an entry.  The only exceptions are the special case when the cursor
295
295
is after the last entry in the file, or when the PO file is
300
300
 
301
301
</P>
302
302
<P>
303
 
<A NAME="IDX363"></A>
 
303
<A NAME="IDX369"></A>
304
304
Some PO mode commands alter the position of the cursor in a specialized
305
305
way.  A few of those special purpose positioning are described here,
306
306
the others are described in following sections (for a complete list try
311
311
 
312
312
<DT><KBD>.</KBD>
313
313
<DD>
314
 
<A NAME="IDX364"></A>
 
314
<A NAME="IDX370"></A>
315
315
Redisplay the current entry (<CODE>po-current-entry</CODE>).
316
316
 
317
317
<DT><KBD>n</KBD>
318
318
<DD>
319
 
<A NAME="IDX365"></A>
 
319
<A NAME="IDX371"></A>
320
320
Select the entry after the current one (<CODE>po-next-entry</CODE>).
321
321
 
322
322
<DT><KBD>p</KBD>
323
323
<DD>
324
 
<A NAME="IDX366"></A>
 
324
<A NAME="IDX372"></A>
325
325
Select the entry before the current one (<CODE>po-previous-entry</CODE>).
326
326
 
327
327
<DT><KBD>&#60;</KBD>
328
328
<DD>
329
 
<A NAME="IDX367"></A>
 
329
<A NAME="IDX373"></A>
330
330
Select the first entry in the PO file (<CODE>po-first-entry</CODE>).
331
331
 
332
332
<DT><KBD>&#62;</KBD>
333
333
<DD>
334
 
<A NAME="IDX368"></A>
 
334
<A NAME="IDX374"></A>
335
335
Select the last entry in the PO file (<CODE>po-last-entry</CODE>).
336
336
 
337
337
<DT><KBD>m</KBD>
338
338
<DD>
339
 
<A NAME="IDX369"></A>
 
339
<A NAME="IDX375"></A>
340
340
Record the location of the current entry for later use
341
341
(<CODE>po-push-location</CODE>).
342
342
 
343
343
<DT><KBD>r</KBD>
344
344
<DD>
345
 
<A NAME="IDX370"></A>
 
345
<A NAME="IDX376"></A>
346
346
Return to a previously saved entry location (<CODE>po-pop-location</CODE>).
347
347
 
348
348
<DT><KBD>x</KBD>
349
349
<DD>
350
 
<A NAME="IDX371"></A>
 
350
<A NAME="IDX377"></A>
351
351
Exchange the current entry location with the previously saved one
352
352
(<CODE>po-exchange-location</CODE>).
353
353
 
354
354
</DL>
355
355
 
356
356
<P>
357
 
<A NAME="IDX372"></A>
358
 
<A NAME="IDX373"></A>
 
357
<A NAME="IDX378"></A>
 
358
<A NAME="IDX379"></A>
359
359
Any Emacs command able to reposition the cursor may be used
360
360
to select the current entry in PO mode, including commands which
361
361
move by characters, lines, paragraphs, screens or pages, and search
384
384
 
385
385
</P>
386
386
<P>
387
 
<A NAME="IDX374"></A>
388
 
<A NAME="IDX375"></A>
389
 
<A NAME="IDX376"></A>
390
 
<A NAME="IDX377"></A>
 
387
<A NAME="IDX380"></A>
 
388
<A NAME="IDX381"></A>
 
389
<A NAME="IDX382"></A>
 
390
<A NAME="IDX383"></A>
391
391
The commands <KBD>n</KBD> (<CODE>po-next-entry</CODE>) and <KBD>p</KBD>
392
392
(<CODE>po-previous-entry</CODE>) move the cursor the entry following,
393
393
or preceding, the current one.  If <KBD>n</KBD> is given while the
396
396
 
397
397
</P>
398
398
<P>
399
 
<A NAME="IDX378"></A>
400
 
<A NAME="IDX379"></A>
401
 
<A NAME="IDX380"></A>
402
 
<A NAME="IDX381"></A>
 
399
<A NAME="IDX384"></A>
 
400
<A NAME="IDX385"></A>
 
401
<A NAME="IDX386"></A>
 
402
<A NAME="IDX387"></A>
403
403
The commands <KBD>&#60;</KBD> (<CODE>po-first-entry</CODE>) and <KBD>&#62;</KBD>
404
404
(<CODE>po-last-entry</CODE>) move the cursor to the first entry, or last
405
405
entry, of the PO file.  When the cursor is located past the last
422
422
 
423
423
</P>
424
424
<P>
425
 
<A NAME="IDX382"></A>
426
 
<A NAME="IDX383"></A>
427
 
<A NAME="IDX384"></A>
428
 
<A NAME="IDX385"></A>
 
425
<A NAME="IDX388"></A>
 
426
<A NAME="IDX389"></A>
 
427
<A NAME="IDX390"></A>
 
428
<A NAME="IDX391"></A>
429
429
PO mode offers another approach, by which cursor locations may be saved
430
430
onto a special stack.  The command <KBD>m</KBD> (<CODE>po-push-location</CODE>)
431
431
merely adds the location of current entry to the stack, pushing
445
445
 
446
446
</P>
447
447
<P>
448
 
<A NAME="IDX386"></A>
449
 
<A NAME="IDX387"></A>
 
448
<A NAME="IDX392"></A>
 
449
<A NAME="IDX393"></A>
450
450
The command <KBD>x</KBD> (<CODE>po-exchange-location</CODE>) simultaneously
451
451
repositions the cursor to the entry associated with the top element of
452
452
the stack of saved locations, and replaces that top element with the
461
461
 
462
462
<H3><A NAME="SEC62" HREF="gettext_toc.html#TOC62">8.3.4  Normalizing Strings in Entries</A></H3>
463
463
<P>
464
 
<A NAME="IDX388"></A>
 
464
<A NAME="IDX394"></A>
465
465
 
466
466
</P>
467
467
<P>
495
495
 
496
496
</P>
497
497
<P>
498
 
<A NAME="IDX389"></A>
 
498
<A NAME="IDX395"></A>
499
499
<DL COMPACT>
500
500
 
501
501
<DT><KBD>M-x po-normalize</KBD>
502
502
<DD>
503
 
<A NAME="IDX390"></A>
 
503
<A NAME="IDX396"></A>
504
504
Tidy the whole PO file by making entries more uniform.
505
505
 
506
506
</DL>
532
532
 
533
533
</P>
534
534
<P>
535
 
<A NAME="IDX391"></A>
 
535
<A NAME="IDX397"></A>
536
536
Having such an explicit normalizing command allows for importing PO
537
537
files from other sources, but also eases the evolution of the current
538
538
convention, evolution driven mostly by aesthetic concerns, as of now.
545
545
 
546
546
</P>
547
547
<P>
548
 
<A NAME="IDX392"></A>
 
548
<A NAME="IDX398"></A>
549
549
Right now, in PO mode, strings are single line or multi-line.  A string
550
550
goes multi-line if and only if it has <EM>embedded</EM> newlines, that
551
551
is, if it matches <SAMP>&lsquo;[^\n]\n+[^\n]&rsquo;</SAMP>.  So, we would have:
598
598
 
599
599
<H3><A NAME="SEC63" HREF="gettext_toc.html#TOC63">8.3.5  Translated Entries</A></H3>
600
600
<P>
601
 
<A NAME="IDX393"></A>
 
601
<A NAME="IDX399"></A>
602
602
 
603
603
</P>
604
604
<P>
610
610
 
611
611
</P>
612
612
<P>
613
 
<A NAME="IDX394"></A>
 
613
<A NAME="IDX400"></A>
614
614
Some commands are more specifically related to translated entry processing.
615
615
 
616
616
</P>
618
618
 
619
619
<DT><KBD>t</KBD>
620
620
<DD>
621
 
<A NAME="IDX395"></A>
 
621
<A NAME="IDX401"></A>
622
622
Find the next translated entry (<CODE>po-next-translated-entry</CODE>).
623
623
 
624
624
<DT><KBD>T</KBD>
625
625
<DD>
626
 
<A NAME="IDX396"></A>
 
626
<A NAME="IDX402"></A>
627
627
Find the previous translated entry (<CODE>po-previous-translated-entry</CODE>).
628
628
 
629
629
</DL>
630
630
 
631
631
<P>
632
 
<A NAME="IDX397"></A>
633
 
<A NAME="IDX398"></A>
634
 
<A NAME="IDX399"></A>
635
 
<A NAME="IDX400"></A>
 
632
<A NAME="IDX403"></A>
 
633
<A NAME="IDX404"></A>
 
634
<A NAME="IDX405"></A>
 
635
<A NAME="IDX406"></A>
636
636
The commands <KBD>t</KBD> (<CODE>po-next-translated-entry</CODE>) and <KBD>T</KBD>
637
637
(<CODE>po-previous-translated-entry</CODE>) move forwards or backwards, chasing
638
638
for an translated entry.  If none is found, the search is extended and
640
640
 
641
641
</P>
642
642
<P>
643
 
<A NAME="IDX401"></A>
 
643
<A NAME="IDX407"></A>
644
644
Translated entries usually result from the translator having edited in
645
645
a translation for them, section <A HREF="gettext_8.html#SEC67">8.3.9  Modifying Translations</A>.  However, if the
646
646
variable <CODE>po-auto-fuzzy-on-edit</CODE> is not <CODE>nil</CODE>, the entry having
653
653
 
654
654
<H3><A NAME="SEC64" HREF="gettext_toc.html#TOC64">8.3.6  Fuzzy Entries</A></H3>
655
655
<P>
656
 
<A NAME="IDX402"></A>
 
656
<A NAME="IDX408"></A>
657
657
 
658
658
</P>
659
659
<P>
660
 
<A NAME="IDX403"></A>
661
 
<A NAME="IDX404"></A>
 
660
<A NAME="IDX409"></A>
 
661
<A NAME="IDX410"></A>
662
662
Each PO file entry may have a set of <EM>attributes</EM>, which are
663
663
qualities given a name and explicitly associated with the translation,
664
664
using a special system comment.  One of these attributes
681
681
 
682
682
</P>
683
683
<P>
684
 
<A NAME="IDX405"></A>
 
684
<A NAME="IDX411"></A>
685
685
Also, the translator may decide herself to mark an entry as fuzzy
686
686
for her own convenience, when she wants to remember that the entry
687
687
has to be later revisited.  So, some commands are more specifically
692
692
 
693
693
<DT><KBD>f</KBD>
694
694
<DD>
695
 
<A NAME="IDX406"></A>
 
695
<A NAME="IDX412"></A>
696
696
Find the next fuzzy entry (<CODE>po-next-fuzzy-entry</CODE>).
697
697
 
698
698
<DT><KBD>F</KBD>
699
699
<DD>
700
 
<A NAME="IDX407"></A>
 
700
<A NAME="IDX413"></A>
701
701
Find the previous fuzzy entry (<CODE>po-previous-fuzzy-entry</CODE>).
702
702
 
703
703
<DT><KBD><KBD>TAB</KBD></KBD>
704
704
<DD>
705
 
<A NAME="IDX408"></A>
 
705
<A NAME="IDX414"></A>
706
706
Remove the fuzzy attribute of the current entry (<CODE>po-unfuzzy</CODE>).
707
707
 
708
708
</DL>
709
709
 
710
710
<P>
711
 
<A NAME="IDX409"></A>
712
 
<A NAME="IDX410"></A>
713
 
<A NAME="IDX411"></A>
714
 
<A NAME="IDX412"></A>
 
711
<A NAME="IDX415"></A>
 
712
<A NAME="IDX416"></A>
 
713
<A NAME="IDX417"></A>
 
714
<A NAME="IDX418"></A>
715
715
The commands <KBD>f</KBD> (<CODE>po-next-fuzzy-entry</CODE>) and <KBD>F</KBD>
716
716
(<CODE>po-previous-fuzzy-entry</CODE>) move forwards or backwards, chasing for
717
717
a fuzzy entry.  If none is found, the search is extended and wraps
719
719
 
720
720
</P>
721
721
<P>
722
 
<A NAME="IDX413"></A>
723
 
<A NAME="IDX414"></A>
724
 
<A NAME="IDX415"></A>
 
722
<A NAME="IDX419"></A>
 
723
<A NAME="IDX420"></A>
 
724
<A NAME="IDX421"></A>
725
725
The command <KBD><KBD>TAB</KBD></KBD> (<CODE>po-unfuzzy</CODE>) removes the fuzzy
726
726
attribute associated with an entry, usually leaving it translated.
727
727
Further, if the variable <CODE>po-auto-select-on-unfuzzy</CODE> has not
743
743
 
744
744
</P>
745
745
<P>
746
 
<A NAME="IDX416"></A>
747
 
<A NAME="IDX417"></A>
 
746
<A NAME="IDX422"></A>
 
747
<A NAME="IDX423"></A>
748
748
The translator may also use the <KBD><KBD>DEL</KBD></KBD> command
749
749
(<CODE>po-fade-out-entry</CODE>) over any translated entry to mark it as being
750
750
fuzzy, when she wants to easily leave a trace she wants to later return
761
761
 
762
762
<H3><A NAME="SEC65" HREF="gettext_toc.html#TOC65">8.3.7  Untranslated Entries</A></H3>
763
763
<P>
764
 
<A NAME="IDX418"></A>
 
764
<A NAME="IDX424"></A>
765
765
 
766
766
</P>
767
767
<P>
781
781
 
782
782
</P>
783
783
<P>
784
 
<A NAME="IDX419"></A>
 
784
<A NAME="IDX425"></A>
785
785
The work of the translator might be (quite naively) seen as the process
786
786
of seeking for an untranslated entry, editing a translation for
787
787
it, and repeating these actions until no untranslated entries remain.
793
793
 
794
794
<DT><KBD>u</KBD>
795
795
<DD>
796
 
<A NAME="IDX420"></A>
 
796
<A NAME="IDX426"></A>
797
797
Find the next untranslated entry (<CODE>po-next-untranslated-entry</CODE>).
798
798
 
799
799
<DT><KBD>U</KBD>
800
800
<DD>
801
 
<A NAME="IDX421"></A>
 
801
<A NAME="IDX427"></A>
802
802
Find the previous untranslated entry (<CODE>po-previous-untransted-entry</CODE>).
803
803
 
804
804
<DT><KBD>k</KBD>
805
805
<DD>
806
 
<A NAME="IDX422"></A>
 
806
<A NAME="IDX428"></A>
807
807
Turn the current entry into an untranslated one (<CODE>po-kill-msgstr</CODE>).
808
808
 
809
809
</DL>
810
810
 
811
811
<P>
812
 
<A NAME="IDX423"></A>
813
 
<A NAME="IDX424"></A>
814
 
<A NAME="IDX425"></A>
815
 
<A NAME="IDX426"></A>
 
812
<A NAME="IDX429"></A>
 
813
<A NAME="IDX430"></A>
 
814
<A NAME="IDX431"></A>
 
815
<A NAME="IDX432"></A>
816
816
The commands <KBD>u</KBD> (<CODE>po-next-untranslated-entry</CODE>) and <KBD>U</KBD>
817
817
(<CODE>po-previous-untransted-entry</CODE>) move forwards or backwards,
818
818
chasing for an untranslated entry.  If none is found, the search is
820
820
 
821
821
</P>
822
822
<P>
823
 
<A NAME="IDX427"></A>
824
 
<A NAME="IDX428"></A>
 
823
<A NAME="IDX433"></A>
 
824
<A NAME="IDX434"></A>
825
825
An entry can be turned back into an untranslated entry by
826
826
merely emptying its translation, using the command <KBD>k</KBD>
827
827
(<CODE>po-kill-msgstr</CODE>).  See section <A HREF="gettext_8.html#SEC67">8.3.9  Modifying Translations</A>.
837
837
 
838
838
<H3><A NAME="SEC66" HREF="gettext_toc.html#TOC66">8.3.8  Obsolete Entries</A></H3>
839
839
<P>
840
 
<A NAME="IDX429"></A>
 
840
<A NAME="IDX435"></A>
841
841
 
842
842
</P>
843
843
<P>
863
863
 
864
864
</P>
865
865
<P>
866
 
<A NAME="IDX430"></A>
 
866
<A NAME="IDX436"></A>
867
867
Moreover, some commands are more specifically related to obsolete
868
868
entry processing.
869
869
 
872
872
 
873
873
<DT><KBD>o</KBD>
874
874
<DD>
875
 
<A NAME="IDX431"></A>
 
875
<A NAME="IDX437"></A>
876
876
Find the next obsolete entry (<CODE>po-next-obsolete-entry</CODE>).
877
877
 
878
878
<DT><KBD>O</KBD>
879
879
<DD>
880
 
<A NAME="IDX432"></A>
 
880
<A NAME="IDX438"></A>
881
881
Find the previous obsolete entry (<CODE>po-previous-obsolete-entry</CODE>).
882
882
 
883
883
<DT><KBD><KBD>DEL</KBD></KBD>
884
884
<DD>
885
 
<A NAME="IDX433"></A>
 
885
<A NAME="IDX439"></A>
886
886
Make an active entry obsolete, or zap out an obsolete entry
887
887
(<CODE>po-fade-out-entry</CODE>).
888
888
 
889
889
</DL>
890
890
 
891
891
<P>
892
 
<A NAME="IDX434"></A>
893
 
<A NAME="IDX435"></A>
894
 
<A NAME="IDX436"></A>
895
 
<A NAME="IDX437"></A>
 
892
<A NAME="IDX440"></A>
 
893
<A NAME="IDX441"></A>
 
894
<A NAME="IDX442"></A>
 
895
<A NAME="IDX443"></A>
896
896
The commands <KBD>o</KBD> (<CODE>po-next-obsolete-entry</CODE>) and <KBD>O</KBD>
897
897
(<CODE>po-previous-obsolete-entry</CODE>) move forwards or backwards,
898
898
chasing for an obsolete entry.  If none is found, the search is
908
908
 
909
909
</P>
910
910
<P>
911
 
<A NAME="IDX438"></A>
912
 
<A NAME="IDX439"></A>
913
 
<A NAME="IDX440"></A>
914
 
<A NAME="IDX441"></A>
 
911
<A NAME="IDX444"></A>
 
912
<A NAME="IDX445"></A>
 
913
<A NAME="IDX446"></A>
 
914
<A NAME="IDX447"></A>
915
915
However, it is possible to comment out an active entry, so making
916
916
it obsolete.  GNU <CODE>gettext</CODE> utilities will later react to the
917
917
disappearance of a translation by using the untranslated string.
941
941
 
942
942
<H3><A NAME="SEC67" HREF="gettext_toc.html#TOC67">8.3.9  Modifying Translations</A></H3>
943
943
<P>
944
 
<A NAME="IDX442"></A>
945
 
<A NAME="IDX443"></A>
 
944
<A NAME="IDX448"></A>
 
945
<A NAME="IDX449"></A>
946
946
 
947
947
</P>
948
948
<P>
968
968
 
969
969
<DT><KBD><KBD>RET</KBD></KBD>
970
970
<DD>
971
 
<A NAME="IDX444"></A>
 
971
<A NAME="IDX450"></A>
972
972
Interactively edit the translation (<CODE>po-edit-msgstr</CODE>).
973
973
 
974
974
<DT><KBD><KBD>LFD</KBD></KBD>
975
975
<DD>
976
976
<DT><KBD>C-j</KBD>
977
977
<DD>
978
 
<A NAME="IDX445"></A>
979
 
<A NAME="IDX446"></A>
 
978
<A NAME="IDX451"></A>
 
979
<A NAME="IDX452"></A>
980
980
Reinitialize the translation with the original, untranslated string
981
981
(<CODE>po-msgid-to-msgstr</CODE>).
982
982
 
983
983
<DT><KBD>k</KBD>
984
984
<DD>
985
 
<A NAME="IDX447"></A>
 
985
<A NAME="IDX453"></A>
986
986
Save the translation on the kill ring, and delete it (<CODE>po-kill-msgstr</CODE>).
987
987
 
988
988
<DT><KBD>w</KBD>
989
989
<DD>
990
 
<A NAME="IDX448"></A>
 
990
<A NAME="IDX454"></A>
991
991
Save the translation on the kill ring, without deleting it
992
992
(<CODE>po-kill-ring-save-msgstr</CODE>).
993
993
 
994
994
<DT><KBD>y</KBD>
995
995
<DD>
996
 
<A NAME="IDX449"></A>
 
996
<A NAME="IDX455"></A>
997
997
Replace the translation, taking the new from the kill ring
998
998
(<CODE>po-yank-msgstr</CODE>).
999
999
 
1000
1000
</DL>
1001
1001
 
1002
1002
<P>
1003
 
<A NAME="IDX450"></A>
1004
 
<A NAME="IDX451"></A>
 
1003
<A NAME="IDX456"></A>
 
1004
<A NAME="IDX457"></A>
1005
1005
The command <KBD><KBD>RET</KBD></KBD> (<CODE>po-edit-msgstr</CODE>) opens a new Emacs
1006
1006
window meant to edit in a new translation, or to modify an already existing
1007
1007
translation.  The new window contains a copy of the translation taken from
1014
1014
 
1015
1015
</P>
1016
1016
<P>
1017
 
<A NAME="IDX452"></A>
1018
 
<A NAME="IDX453"></A>
1019
 
<A NAME="IDX454"></A>
 
1017
<A NAME="IDX458"></A>
 
1018
<A NAME="IDX459"></A>
 
1019
<A NAME="IDX460"></A>
1020
1020
The command <KBD><KBD>LFD</KBD></KBD> (<CODE>po-msgid-to-msgstr</CODE>) initializes, or
1021
1021
reinitializes the translation with the original string.  This command is
1022
1022
normally used when the translator wants to redo a fresh translation of
1024
1024
 
1025
1025
</P>
1026
1026
<P>
1027
 
<A NAME="IDX455"></A>
 
1027
<A NAME="IDX461"></A>
1028
1028
It is possible to arrange so, whenever editing an untranslated
1029
1029
entry, the <KBD><KBD>LFD</KBD></KBD> command be automatically executed.  If you set
1030
1030
<CODE>po-auto-edit-with-msgid</CODE> to <CODE>t</CODE>, the translation gets
1033
1033
 
1034
1034
</P>
1035
1035
<P>
1036
 
<A NAME="IDX456"></A>
 
1036
<A NAME="IDX462"></A>
1037
1037
In fact, whether it is best to start a translation with an empty
1038
1038
string, or rather with a copy of the original string, is a matter of
1039
1039
taste or habit.  Sometimes, the source language and the
1047
1047
 
1048
1048
</P>
1049
1049
<P>
1050
 
<A NAME="IDX457"></A>
1051
 
<A NAME="IDX458"></A>
1052
 
<A NAME="IDX459"></A>
1053
 
<A NAME="IDX460"></A>
1054
 
<A NAME="IDX461"></A>
 
1050
<A NAME="IDX463"></A>
 
1051
<A NAME="IDX464"></A>
 
1052
<A NAME="IDX465"></A>
 
1053
<A NAME="IDX466"></A>
 
1054
<A NAME="IDX467"></A>
1055
1055
The command <KBD>k</KBD> (<CODE>po-kill-msgstr</CODE>) merely empties the
1056
1056
translation string, so turning the entry into an untranslated
1057
1057
one.  But while doing so, its previous contents is put apart in
1083
1083
 
1084
1084
</P>
1085
1085
<P>
1086
 
<A NAME="IDX462"></A>
1087
 
<A NAME="IDX463"></A>
 
1086
<A NAME="IDX468"></A>
 
1087
<A NAME="IDX469"></A>
1088
1088
The command <KBD>y</KBD> (<CODE>po-yank-msgstr</CODE>) completely replaces the
1089
1089
translation of the current entry by a string taken from the kill ring.
1090
1090
Following Emacs terminology, we then say that the replacement
1118
1118
 
1119
1119
</P>
1120
1120
<P>
1121
 
<A NAME="IDX464"></A>
 
1121
<A NAME="IDX470"></A>
1122
1122
To better illustrate the operation of killing and yanking, let's
1123
1123
use an actual example, taken from a common situation.  When the
1124
1124
programmer slightly modifies some string right in the program, his
1158
1158
 
1159
1159
<H3><A NAME="SEC68" HREF="gettext_toc.html#TOC68">8.3.10  Modifying Comments</A></H3>
1160
1160
<P>
1161
 
<A NAME="IDX465"></A>
1162
 
<A NAME="IDX466"></A>
 
1161
<A NAME="IDX471"></A>
 
1162
<A NAME="IDX472"></A>
1163
1163
 
1164
1164
</P>
1165
1165
<P>
1188
1188
 
1189
1189
<DT><KBD>#</KBD>
1190
1190
<DD>
1191
 
<A NAME="IDX467"></A>
 
1191
<A NAME="IDX473"></A>
1192
1192
Interactively edit the translator comments (<CODE>po-edit-comment</CODE>).
1193
1193
 
1194
1194
<DT><KBD>K</KBD>
1195
1195
<DD>
1196
 
<A NAME="IDX468"></A>
 
1196
<A NAME="IDX474"></A>
1197
1197
Save the translator comments on the kill ring, and delete it
1198
1198
(<CODE>po-kill-comment</CODE>).
1199
1199
 
1200
1200
<DT><KBD>W</KBD>
1201
1201
<DD>
1202
 
<A NAME="IDX469"></A>
 
1202
<A NAME="IDX475"></A>
1203
1203
Save the translator comments on the kill ring, without deleting it
1204
1204
(<CODE>po-kill-ring-save-comment</CODE>).
1205
1205
 
1206
1206
<DT><KBD>Y</KBD>
1207
1207
<DD>
1208
 
<A NAME="IDX470"></A>
 
1208
<A NAME="IDX476"></A>
1209
1209
Replace the translator comments, taking the new from the kill ring
1210
1210
(<CODE>po-yank-comment</CODE>).
1211
1211
 
1221
1221
 
1222
1222
</P>
1223
1223
<P>
1224
 
<A NAME="IDX471"></A>
1225
 
<A NAME="IDX472"></A>
 
1224
<A NAME="IDX477"></A>
 
1225
<A NAME="IDX478"></A>
1226
1226
The command <KBD>#</KBD> (<CODE>po-edit-comment</CODE>) opens a new Emacs window
1227
1227
containing a copy of the translator comments on the current PO file entry.
1228
1228
If there are no such comments, PO mode understands that the translator wants
1236
1236
 
1237
1237
</P>
1238
1238
<P>
1239
 
<A NAME="IDX473"></A>
1240
 
Functions found on <CODE>po-subedit-mode-hook</CODE>, if any, are executed after
1241
 
the string has been inserted in the edit buffer.
1242
 
 
1243
 
</P>
1244
 
<P>
1245
 
<A NAME="IDX474"></A>
1246
 
<A NAME="IDX475"></A>
1247
 
<A NAME="IDX476"></A>
1248
 
<A NAME="IDX477"></A>
1249
 
<A NAME="IDX478"></A>
1250
1239
<A NAME="IDX479"></A>
 
1240
Functions found on <CODE>po-subedit-mode-hook</CODE>, if any, are executed after
 
1241
the string has been inserted in the edit buffer.
 
1242
 
 
1243
</P>
 
1244
<P>
 
1245
<A NAME="IDX480"></A>
 
1246
<A NAME="IDX481"></A>
 
1247
<A NAME="IDX482"></A>
 
1248
<A NAME="IDX483"></A>
 
1249
<A NAME="IDX484"></A>
 
1250
<A NAME="IDX485"></A>
1251
1251
The command <KBD>K</KBD> (<CODE>po-kill-comment</CODE>) gets rid of all
1252
1252
translator comments, while saving those comments on the kill ring.
1253
1253
The command <KBD>W</KBD> (<CODE>po-kill-ring-save-comment</CODE>) takes
1288
1288
 
1289
1289
<H3><A NAME="SEC69" HREF="gettext_toc.html#TOC69">8.3.11  Details of Sub Edition</A></H3>
1290
1290
<P>
1291
 
<A NAME="IDX480"></A>
 
1291
<A NAME="IDX486"></A>
1292
1292
 
1293
1293
</P>
1294
1294
<P>
1301
1301
 
1302
1302
<DT><KBD>C-c C-c</KBD>
1303
1303
<DD>
1304
 
<A NAME="IDX481"></A>
 
1304
<A NAME="IDX487"></A>
1305
1305
Complete edition (<CODE>po-subedit-exit</CODE>).
1306
1306
 
1307
1307
<DT><KBD>C-c C-k</KBD>
1308
1308
<DD>
1309
 
<A NAME="IDX482"></A>
 
1309
<A NAME="IDX488"></A>
1310
1310
Abort edition (<CODE>po-subedit-abort</CODE>).
1311
1311
 
1312
1312
<DT><KBD>C-c C-a</KBD>
1313
1313
<DD>
1314
 
<A NAME="IDX483"></A>
 
1314
<A NAME="IDX489"></A>
1315
1315
Consult auxiliary PO files (<CODE>po-subedit-cycle-auxiliary</CODE>).
1316
1316
 
1317
1317
</DL>
1318
1318
 
1319
1319
<P>
1320
 
<A NAME="IDX484"></A>
1321
 
<A NAME="IDX485"></A>
1322
 
<A NAME="IDX486"></A>
 
1320
<A NAME="IDX490"></A>
 
1321
<A NAME="IDX491"></A>
 
1322
<A NAME="IDX492"></A>
1323
1323
The window's contents represents a translation for a given message,
1324
1324
or a translator comment.  The translator may modify this window to
1325
1325
her heart's content.  Once this is done, the command <KBD>C-c C-c</KBD>
1329
1329
 
1330
1330
</P>
1331
1331
<P>
1332
 
<A NAME="IDX487"></A>
1333
 
<A NAME="IDX488"></A>
 
1332
<A NAME="IDX493"></A>
 
1333
<A NAME="IDX494"></A>
1334
1334
If the translator becomes unsatisfied with her translation or comment,
1335
1335
to the extent she prefers keeping what was existent prior to the
1336
1336
<KBD><KBD>RET</KBD></KBD> or <KBD>#</KBD> command, she may use the command <KBD>C-c C-k</KBD>
1341
1341
 
1342
1342
</P>
1343
1343
<P>
1344
 
<A NAME="IDX489"></A>
1345
 
<A NAME="IDX490"></A>
 
1344
<A NAME="IDX495"></A>
 
1345
<A NAME="IDX496"></A>
1346
1346
The command <KBD>C-c C-a</KBD> (<CODE>po-subedit-cycle-auxiliary</CODE>)
1347
1347
allows for glancing through translations
1348
1348
already achieved in other languages, directly while editing the current
1376
1376
 
1377
1377
</P>
1378
1378
<P>
1379
 
<A NAME="IDX491"></A>
 
1379
<A NAME="IDX497"></A>
1380
1380
When a translation (or a comment) is being edited, the translator may move
1381
1381
the cursor back into the PO file buffer and freely move to other entries,
1382
1382
browsing at will.  If, with an edition pending, the translator wanders in the
1389
1389
 
1390
1390
</P>
1391
1391
<P>
1392
 
<A NAME="IDX492"></A>
 
1392
<A NAME="IDX498"></A>
1393
1393
Pending subedits may be completed or aborted in any order, regardless
1394
1394
of how or when they were started.  When many subedits are pending and the
1395
1395
translator asks for quitting the PO file (with the <KBD>q</KBD> command), subedits
1400
1400
 
1401
1401
<H3><A NAME="SEC70" HREF="gettext_toc.html#TOC70">8.3.12  C Sources Context</A></H3>
1402
1402
<P>
1403
 
<A NAME="IDX493"></A>
1404
 
<A NAME="IDX494"></A>
1405
 
<A NAME="IDX495"></A>
 
1403
<A NAME="IDX499"></A>
 
1404
<A NAME="IDX500"></A>
 
1405
<A NAME="IDX501"></A>
1406
1406
 
1407
1407
</P>
1408
1408
<P>
1439
1439
 
1440
1440
</P>
1441
1441
<P>
1442
 
<A NAME="IDX496"></A>
 
1442
<A NAME="IDX502"></A>
1443
1443
The following commands are meant to help the translator at getting
1444
1444
program source context for a PO file entry.
1445
1445
 
1448
1448
 
1449
1449
<DT><KBD>s</KBD>
1450
1450
<DD>
1451
 
<A NAME="IDX497"></A>
 
1451
<A NAME="IDX503"></A>
1452
1452
Resume the display of a program source context, or cycle through them
1453
1453
(<CODE>po-cycle-source-reference</CODE>).
1454
1454
 
1455
1455
<DT><KBD>M-s</KBD>
1456
1456
<DD>
1457
 
<A NAME="IDX498"></A>
 
1457
<A NAME="IDX504"></A>
1458
1458
Display of a program source context selected by menu
1459
1459
(<CODE>po-select-source-reference</CODE>).
1460
1460
 
1461
1461
<DT><KBD>S</KBD>
1462
1462
<DD>
1463
 
<A NAME="IDX499"></A>
 
1463
<A NAME="IDX505"></A>
1464
1464
Add a directory to the search path for source files
1465
1465
(<CODE>po-consider-source-path</CODE>).
1466
1466
 
1467
1467
<DT><KBD>M-S</KBD>
1468
1468
<DD>
1469
 
<A NAME="IDX500"></A>
 
1469
<A NAME="IDX506"></A>
1470
1470
Delete a directory from the search path for source files
1471
1471
(<CODE>po-ignore-source-path</CODE>).
1472
1472
 
1473
1473
</DL>
1474
1474
 
1475
1475
<P>
1476
 
<A NAME="IDX501"></A>
1477
 
<A NAME="IDX502"></A>
1478
 
<A NAME="IDX503"></A>
1479
 
<A NAME="IDX504"></A>
 
1476
<A NAME="IDX507"></A>
 
1477
<A NAME="IDX508"></A>
 
1478
<A NAME="IDX509"></A>
 
1479
<A NAME="IDX510"></A>
1480
1480
The commands <KBD>s</KBD> (<CODE>po-cycle-source-reference</CODE>) and <KBD>M-s</KBD>
1481
1481
(<CODE>po-select-source-reference</CODE>) both open another window displaying
1482
1482
some source program file, and already positioned in such a way that
1521
1521
 
1522
1522
</P>
1523
1523
<P>
1524
 
<A NAME="IDX505"></A>
1525
 
<A NAME="IDX506"></A>
1526
 
<A NAME="IDX507"></A>
1527
 
<A NAME="IDX508"></A>
 
1524
<A NAME="IDX511"></A>
 
1525
<A NAME="IDX512"></A>
 
1526
<A NAME="IDX513"></A>
 
1527
<A NAME="IDX514"></A>
1528
1528
Program source files are usually found relative to where the PO
1529
1529
file stands.  As a special provision, when this fails, the file is
1530
1530
also looked for, but relative to the directory immediately above it.
1544
1544
 
1545
1545
<H3><A NAME="SEC71" HREF="gettext_toc.html#TOC71">8.3.13  Consulting Auxiliary PO Files</A></H3>
1546
1546
<P>
1547
 
<A NAME="IDX509"></A>
 
1547
<A NAME="IDX515"></A>
1548
1548
 
1549
1549
</P>
1550
1550
<P>
1557
1557
 
1558
1558
</P>
1559
1559
<P>
1560
 
<A NAME="IDX510"></A>
1561
 
<A NAME="IDX511"></A>
 
1560
<A NAME="IDX516"></A>
 
1561
<A NAME="IDX517"></A>
1562
1562
An <EM>auxiliary</EM> PO file is an existing PO file meant for the same
1563
1563
package the translator is working on, but targeted to a different mother
1564
1564
tongue language.  Commands exist for declaring and handling auxiliary
1573
1573
 
1574
1574
<DT><KBD>a</KBD>
1575
1575
<DD>
1576
 
<A NAME="IDX512"></A>
 
1576
<A NAME="IDX518"></A>
1577
1577
Seek auxiliary files for another translation for the same entry
1578
1578
(<CODE>po-cycle-auxiliary</CODE>).
1579
1579
 
1580
1580
<DT><KBD>C-c C-a</KBD>
1581
1581
<DD>
1582
 
<A NAME="IDX513"></A>
 
1582
<A NAME="IDX519"></A>
1583
1583
Switch to a particular auxiliary file (<CODE>po-select-auxiliary</CODE>).
1584
1584
 
1585
1585
<DT><KBD>A</KBD>
1586
1586
<DD>
1587
 
<A NAME="IDX514"></A>
 
1587
<A NAME="IDX520"></A>
1588
1588
Declare this PO file as an auxiliary file (<CODE>po-consider-as-auxiliary</CODE>).
1589
1589
 
1590
1590
<DT><KBD>M-A</KBD>
1591
1591
<DD>
1592
 
<A NAME="IDX515"></A>
 
1592
<A NAME="IDX521"></A>
1593
1593
Remove this PO file from the list of auxiliary files
1594
1594
(<CODE>po-ignore-as-auxiliary</CODE>).
1595
1595
 
1596
1596
</DL>
1597
1597
 
1598
1598
<P>
1599
 
<A NAME="IDX516"></A>
1600
 
<A NAME="IDX517"></A>
1601
 
<A NAME="IDX518"></A>
1602
 
<A NAME="IDX519"></A>
 
1599
<A NAME="IDX522"></A>
 
1600
<A NAME="IDX523"></A>
 
1601
<A NAME="IDX524"></A>
 
1602
<A NAME="IDX525"></A>
1603
1603
Command <KBD>A</KBD> (<CODE>po-consider-as-auxiliary</CODE>) adds the current
1604
1604
PO file to the list of auxiliary files, while command <KBD>M-A</KBD>
1605
1605
(<CODE>po-ignore-as-auxiliary</CODE> just removes it.
1606
1606
 
1607
1607
</P>
1608
1608
<P>
1609
 
<A NAME="IDX520"></A>
1610
 
<A NAME="IDX521"></A>
 
1609
<A NAME="IDX526"></A>
 
1610
<A NAME="IDX527"></A>
1611
1611
The command <KBD>a</KBD> (<CODE>po-cycle-auxiliary</CODE>) seeks all auxiliary PO
1612
1612
files, round-robin, searching for a translated entry in some other language
1613
1613
having an <CODE>msgid</CODE> field identical as the one for the current entry.
1619
1619
 
1620
1620
</P>
1621
1621
<P>
1622
 
<A NAME="IDX522"></A>
1623
 
<A NAME="IDX523"></A>
 
1622
<A NAME="IDX528"></A>
 
1623
<A NAME="IDX529"></A>
1624
1624
The command <KBD>C-c C-a</KBD> (<CODE>po-select-auxiliary</CODE>) asks the translator
1625
1625
for her choice of a particular auxiliary file, with completion, and
1626
1626
then switches to that selected PO file.  The command also checks if
1640
1640
 
1641
1641
</P>
1642
1642
<P>
1643
 
<A NAME="IDX524"></A>
 
1643
<A NAME="IDX530"></A>
1644
1644
However, PO files initially created by PO mode itself, while marking
1645
1645
strings in source files, are normalised differently.  So are PO
1646
1646
files resulting of the <SAMP>&lsquo;M-x normalize&rsquo;</SAMP> command.  Until these
1652
1652
 
1653
1653
<H2><A NAME="SEC72" HREF="gettext_toc.html#TOC72">8.4  Using Translation Compendia</A></H2>
1654
1654
<P>
1655
 
<A NAME="IDX525"></A>
 
1655
<A NAME="IDX531"></A>
1656
1656
 
1657
1657
</P>
1658
1658
<P>
1659
 
<A NAME="IDX526"></A>
 
1659
<A NAME="IDX532"></A>
1660
1660
A <EM>compendium</EM> is a special PO file containing a set of
1661
1661
translations recurring in many different packages.  The translator can
1662
1662
use gettext tools to build a new compendium, to add entries to her
1669
1669
 
1670
1670
<H3><A NAME="SEC73" HREF="gettext_toc.html#TOC73">8.4.1  Creating Compendia</A></H3>
1671
1671
<P>
1672
 
<A NAME="IDX527"></A>
1673
 
<A NAME="IDX528"></A>
 
1672
<A NAME="IDX533"></A>
 
1673
<A NAME="IDX534"></A>
1674
1674
 
1675
1675
</P>
1676
1676
<P>
1685
1685
<H4><A NAME="SEC74" HREF="gettext_toc.html#TOC74">8.4.1.1  Concatenate PO Files</A></H4>
1686
1686
 
1687
1687
<P>
1688
 
<A NAME="IDX529"></A>
1689
 
<A NAME="IDX530"></A>
 
1688
<A NAME="IDX535"></A>
 
1689
<A NAME="IDX536"></A>
1690
1690
To concatenate several valid PO files into one compendium file you can
1691
1691
use <SAMP>&lsquo;msgcomm&rsquo;</SAMP> or <SAMP>&lsquo;msgcat&rsquo;</SAMP> (the latter preferred):
1692
1692
 
1767
1767
 
1768
1768
<H4><A NAME="SEC75" HREF="gettext_toc.html#TOC75">8.4.1.2  Extract a Message Subset from a PO File</A></H4>
1769
1769
<P>
1770
 
<A NAME="IDX531"></A>
 
1770
<A NAME="IDX537"></A>
1771
1771
 
1772
1772
</P>
1773
1773
<P>
1798
1798
 
1799
1799
<H4><A NAME="SEC77" HREF="gettext_toc.html#TOC77">8.4.2.1  Initialize a New Translation File</A></H4>
1800
1800
<P>
1801
 
<A NAME="IDX532"></A>
 
1801
<A NAME="IDX538"></A>
1802
1802
 
1803
1803
</P>
1804
1804
<P>
1815
1815
 
1816
1816
<H4><A NAME="SEC78" HREF="gettext_toc.html#TOC78">8.4.2.2  Update an Existing Translation File</A></H4>
1817
1817
<P>
1818
 
<A NAME="IDX533"></A>
 
1818
<A NAME="IDX539"></A>
1819
1819
 
1820
1820
</P>
1821
1821
<P>
1822
1822
Concatenate the compendium file(s) and the existing PO, merge the
1823
1823
result with the POT file and remove the obsolete entries (optional,
1824
 
here done using <SAMP>&lsquo;sed&rsquo;</SAMP>):
 
1824
here done using <SAMP>&lsquo;msgattrib&rsquo;</SAMP>):
1825
1825
 
1826
1826
</P>
1827
1827