1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
|
<!-- <?xml version="1.0" ?>
<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd"> -->
<!-- Uncomment the previous two lines to validate this document -->
<!-- standalone. Be sure to recomment them before attempting to -->
<!-- process index.docbook -->
<chapter id="preferences">
<chapterinfo>
<!-- Fill in this section if this document has a different author -->
<authorgroup>
<author>
<personname><firstname></firstname><surname></surname></personname>
</author>
</authorgroup>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</chapterinfo>
<title>Preferences</title>
<sect1 id="preferences-overview">
<title>Global and project settings</title>
<para>
From KBabel 1.10 (KDE 3.4) on, KBabel has the concept of projects and therefore
the settings have been split in two categories:
the global settings and the project settings (also called project configuration).
</para>
<important><para>
&GNU; gettext uses a term called "project", which has nothing to do with
KBabel's projects. &GNU; gettext means by project an application which is
related to the <acronym>PO</acronym> file. For KBabel, a project is
much bigger. It can mean a set of applications, like &kde;.
</para></important>
<para>
KBabel has <emphasis>always</emphasis> a current project, even if it is the
default project. KBabel has not mode without any project. A project is always
for KBabel's editor and KBabel's catalog manager.
</para>
<sect2 id="preferences-limitations">
<title>Known limitations of the current implementation</title>
<para>
Unfortunately the current implementation of projects has a few known problems.
</para>
<para>
An example is that in the global settings, there is no setting for the default user,
his/her default language and other similar important global user data. It means that such
data must be entered again each time that a new project is created.
</para>
<para>
Another problem is the new project wizard. It does not ask enough information, especially
it fails to ask for the team email address. So it is recommended to check the project
settings after having run the wizard.
</para>
<tip><para>
Currently you cannot copy projects from inside KBabel, so apparently you cannot easily share good settings.
However you are free to copy the project outside KBabel and to load the copied project into KBabel.
</para></tip>
</sect2>
<sect2 id="preferences-non-kde-projects">
<title>Using KBabel for non-&kde; projects</title>
<para>
While &kbabel;'s defaults are oriented toward working with and for &kde;, &kbabel; can be used
to translate <acronym>PO</acronym> files of other projects. However mostly you will have to tweak the
settings to the need of your project. This is especially true for &GNU; and
&GNU;-like projects, which need quite different defaults than for &kde;.
</para>
<para>
One problem is that &kbabel; is relatively agressive when saving <acronym>PO</acronym> files and
replaces setting of the <acronym>PO</acronym> files by settings of the projects, if not told otherwise.
This might look very strange to somebody not used to &kde;. However &kde; has 900+
<acronym>POT</acronym> files to translate for the <acronym>GUI</acronym> messages only.
So for such a task, much automatisation is wanted. Taking time to set a project
is little compared to the time gained thereafter. Of course, as non-&kde; user, you
might be less fortunate. You need to do more settings, as the defaults are not entirely suitable
and you will not gain much by doing many translations, as &GNU; projects have typically
only one <acronym>POT</acronym> file to translate.
</para>
</sect2>
</sect1>
<sect1 id="preferences-global">
<title>&kbabel; global settings</title>
<para>
To show the Preferences dialog choose
<menuchoice><guimenu>Settings</guimenu> <guimenuitem>Configure
KBabel...</guimenuitem></menuchoice> from &kbabel;'s menu. It uses a
structured configuration dialog which makes it very easy to find an
option without having to perform an extensive search for it.
</para>
<sect2 id="preferences-editor">
<title>Edit</title>
<para>
The editor preferences category is divided in 3 subwindows:
<guilabel>General</guilabel>, <guilabel>Appearance</guilabel>,
<guilabel>Spell Check</guilabel> and <guilabel>Fonts</guilabel>.
All these settings customize how the editor behaves and looks.
</para>
<sect3 id="preferences-editor-general">
<title>General</title>
<screenshot>
<screeninfo>Dialog Edit General</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_edit_general.png" format="PNG"/>
</imageobject>
<textobject><phrase>Dialog Edit General</phrase></textobject>
</mediaobject>
</screenshot>
<para>This section contains a set of checkboxes.</para>
<para>The first checkbox in the upper side sets if the fuzzy status is
reset automatically when a character is inputted into the MsgStr
editor. When this option is disabled you have to manually choose
<menuchoice><guimenu>Edit</guimenu><guimenuitem>Unset Fuzzy Status
</guimenuitem></menuchoice> or use the <keycombo
action="simul">&Ctrl;<keycap>U</keycap></keycombo> shortcut. Note
that this means the string <literal>, fuzzy</literal> is removed from
the entry's comment.</para>
<para>Next option allows you to enable <quote>clever</quote> editing,
where editor automatically inserts special characters escaped
correctly, ⪚ <literal>\t</literal> after pressing
<keycap>Tab</keycap> and it allows special handling of
<keycap>Enter</keycap>.</para>
<para>
The lower checkboxes are very useful in assisting, not for the
correctness of the translation, but if the translated string
is a suitable replacement for the original. For
example, many messages represent menu items with keyboard accelerator
and C-like formatted strings whose structure must remain intact once
translated.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Check Arguments</guilabel></term>
<listitem>
<para>
When this option is selected, C-format strings in the original and
the translation are checked to ensure the number of
format sequences and the order are consistent.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Check Accelerator</guilabel></term>
<listitem>
<para>When this option is selected, &kbabel; checks if the number
accelerator characters is identical in both the original and the
translated string. Note that accelerator marker is & (but not in
every programming toolkit). See the <link
linkend="preferences-project-miscellaneous">Miscellaneous</link> section below
to find how to change a keyboard accelerator.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Check Equation</guilabel></term>
<listitem>
<para>
This is a feature for the &kde; project development.
<filename>.desktop</filename> files are simply
text files which store various parameters in
<literal>value=key</literal> format. Some of
these <literal>key</literal>s are translatable.
The only restriction is to maintain the left
side of equality unchanged. Equation check
allows you to spot many errors determined
by the fuzzy <command>msgmerge</command> algorithm.
Note that there are situations where this function
generates false errors on some PO-files.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Look for Translated Context Info</guilabel></term>
<listitem>
<para> Some original messages are marked with context information to
mark them as being unique even if they represent same word. This is
because many simple words, such as <quote>Save</quote>, are translated
into many languages. Context information is marked with
<literal>_:</literal>. Many unexperienced translators translate the
context information and fill their PO files with garbage. Check this
box to make sure you will be warned about these errors in a
file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Check Plural Forms</guilabel></term>
<listitem>
<para>
If you are translating &kde; project, it uses a special kind of
syntax for specifying plural forms of messages. This check automatically
counts the number of forms in <acronym>msgstr</acronym> and
compares it with the number specified in
<link linkend="preferences-project-identity"><guilabel>Identity</guilabel></link>
tab. Incorrect number of plural forms can result in crash of an application.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Beep on error</guilabel></term>
<listitem>
<para>
Your system bell will beep when you switch
on entries with errors like those described above.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Change text color on error</guilabel></term>
<listitem>
<para>
This is another type of warning about
errors in current message. It is a good solution for those who are
hearing impaired or dislike bell noise. See also the
<link linkend="preferences-editor-appearance">Appearance</link> tab
to find out how to change the text color on errors.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 id="preferences-editor-appearance">
<title>Appearance</title>
<screenshot>
<screeninfo>Dialog Edit Appearance</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_edit_appearance.png" format="PNG"/>
</imageobject>
<textobject><phrase>Dialog Edit Appearance</phrase></textobject>
</mediaobject>
</screenshot>
<para>
These options let
you configure the appearance for the message editor. In upper part there
are 4 checkboxes:
</para>
<variablelist>
<varlistentry>
<term><guibutton>Highlight syntax</guibutton></term>
<listitem><para>
Setting this option will enable syntax highlighting for
special characters, accelerators and text background in the msgid viewer
and msgstr editor. If don't have a monochrome display or have a visual impairment, you should enable this option.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Highlight background</guibutton></term>
<listitem><para>
The background will be highlighted only for existing characters in
the msgid and msgstr. This includes spaces. This is useful if you
don't want to see the surrounding quotes (see below) for the <acronym>PO</acronym> entry, and you will still
be able to observe starting and ending spaces in a text line.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Mark whitespaces with points</guibutton></term>
<listitem><para>
When you feel the need to count spaces
and background highlighting is not your taste then you can
check this option to have a point sign drawn in the middle of
whitespace characters. Note that the point is a point sign in the
center of a character box and is not a decimal point.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Show surrounding quotes</guibutton></term>
<listitem><para>
If you think that viewing the terminal characters in msgstr or
msgid's text line is better for you then check this option to view
the surrounding quotes for every text line.</para>
<para>If you are experienced editing <acronym>PO</acronym> files with
ordinary text editors you may feel safer if you can track starting and
ending double quotes in <acronym>PO</acronym> entry lines.
</para></listitem>
</varlistentry>
</variablelist>
<para>
For the different items in edited text there are different color choices
to make editing easy. Colors can be changed by clicking on color-picker
buttons. From the 'select color' dialogs you can choose from standard
colors, custom colors or just pick a color from any part of your screen.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Background color</guilabel></term>
<listitem><para>
This sets the background color for characters in the MsgID view
and the MsgStr editor. To change the general background color
of edit boxes you must use the &kcontrolcenter;.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Color for quoted characters</guilabel></term>
<listitem><para>
Here you can adjust the color for escaped characters like
(<literal>\"</literal>) double quotes or (<literal>\n</literal>) newline. </para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Color for syntax errors</guilabel></term>
<listitem><para>
This is the color for the entire text entry if errors are
detected when you try to save <acronym>PO</acronym> file. Errors are
triggered by not terminating identically both <acronym>msgid</acronym> and <acronym>msgstr</acronym>, or
escaping characters incorrectly.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Color for c-format characters</guilabel></term>
<listitem><para>
This sets the color for a characters sequence like in
C language <function>printf</function> or <function>scanf</function> functions. In general these start with (<literal>%</literal>) percent char and are continued by one char.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Color for keyboard accelerators</guilabel></term>
<listitem><para>
Keyboard accelerators start with (&) <quote>ampersand</quote>
character in &kde; but if you are translating for other projects there might be an different character marking the accelerator key.
See <link linkend="preferences-project-miscellaneous">Miscellaneous</link>
section below to find how to change keyboard accelerator.
</para></listitem>
</varlistentry>
</variablelist>
<para> The status for the current edited entry is marked by three
<acronym>LED</acronym>s. For your convenience you can choose where to
put these <acronym>LED</acronym>s—either on the statusbar or in
the editor section (between the msgid and msgstr entry). If have
difficulties viewing some colors or you want to be able to track
<acronym>LED</acronym> status changes easily without moving your eye
you can select the preferred color using the color button chooser.
</para>
</sect3>
</sect2>
<sect2 id="preferences-search">
<title>Search</title>
<screenshot>
<screeninfo>Dialog Search</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_search.png" format="PNG"/>
</imageobject>
<textobject><phrase>Dialog Search</phrase></textobject>
</mediaobject>
</screenshot>
<para>
The search section allows you to customize various settings
for searching in previously translated strings.
</para>
<para>General settings are common for all search types. If you check
the <guibutton>Automatically start search</guibutton> option then the
search is automatically started whenever you switch to another entry
in the editor. Currently, there are three possibilities you can choose
from, but since &kbabel; can use dictionary plugins the available
dictionaries depend on those installed. Using
<menuchoice><guimenuitem>Settings</guimenuitem> <guimenuitem>Configure
Dictionary</guimenuitem> <guimenuitem>...</guimenuitem></menuchoice>
you can configure every search plugin.</para>
<para>The dictionary plugins installed by default are:</para>
<variablelist>
<varlistentry>
<term>&kde; Database Search Engine</term>
<listitem>
<para>This new method is still in alpha stage of development
and is based on &kbabeldict; which accompanies &kbabel;.
See &kbabeldict; documentation for further info on
configuring the search engine.
</para></listitem>
</varlistentry>
<varlistentry>
<term>PO Compendium</term>
<listitem><para>The compendium is a normal <acronym>PO</acronym> file,
which should contain a list of standard translations from your translation
team. If you don't have one, you can also use a file that contains all
the translations from your team (⪚ the <filename>$lang.messages</filename>
file in the &kde; Project, that can be found at
<ulink url="http://i18n.kde.org/po_overview/">i18n.kde.org</ulink>).
</para></listitem>
</varlistentry>
<varlistentry>
<term>PO Auxiliary</term>
<listitem><para>The auxiliary should help you find the
context of a translation by looking up the same message in a message
catalog of the same package but translated to another language. This way
you can have a look how this message is translated in another language.
</para></listitem>
</varlistentry>
</variablelist>
<para>
You can also start searching manually by choosing an
entry in the popup menu that appears, either by clicking
<menuchoice>
<guimenu>Dictionaries</guimenu><guimenuitem>Search Text</guimenuitem>
<guimenuitem>PO Compendium</guimenuitem></menuchoice>
or by keeping the search button on the toolbar pressed down for a while.
</para>
</sect2>
<sect2 id="preferences-diffmode">
<title>Diff</title>
<screenshot>
<screeninfo>Dialog Diff</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_diff.png" format="PNG"/>
</imageobject>
<textobject><phrase>Dialog Diff</phrase></textobject>
</mediaobject>
</screenshot>
<para>The <guilabel>Diff</guilabel> section holds settings how to
display differences in msgids. </para>
<para>Every difference can be displayed by two added parts and by characters removed from the text. For both you can specify the method of display and the color to be used. <guilabel>Highlighted</guilabel> means that the background of the corresponding characters will be shown in the selected color, while
<guilabel>Underlined</guilabel>(for added characters) or <guilabel>Stroked Out</guilabel>
(for removed characters) will denote the changed parts by colored lines.
</para>
<para>
Diff mode needs to find the original <acronym>msgid</acronym> to compare
with. For this purpose, &kbabel; can use the <link linkend="database">translation database</link>
if you turn in on by enabling <guilabel>Use messages from Translation Database</guilabel>.
A second possibility is to use a tree of original PO files and specifying the root of
the tree in <guilabel>Base folder for diff files</guilabel>.
</para>
</sect2>
<sect2 id="preferences-fonts">
<title>Fonts</title>
<screenshot>
<screeninfo>Dialog Fonts</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_fonts.png" format="PNG"/>
</imageobject>
<textobject><phrase>Dialog Fonts</phrase></textobject>
</mediaobject>
</screenshot>
<para>
This is a standard &kde; font chooser dialog with a little addition. You can
select to view only fixed fonts by checking the
<guibutton>Show only fixed fonts</guibutton> option.
This is highly recommended for easy translating. The font dialog lets you set
font family, style, size and encoding. The bottom box shows a preview of the
current font for user convenience.
</para>
</sect2>
</sect1>
<sect1 id="preferences-project-wizard">
<title>New Project Wizard</title>
<sect2 id="preferences-project-wizard-basic">
<title>Page 1</title>
<screenshot>
<screeninfo>Project Wizard Page 1</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_wizard_page1.png" format="PNG"/>
</imageobject>
<textobject><phrase>Project Wizard Page 1</phrase></textobject>
</mediaobject>
</screenshot>
<para>
The first page of the wizard ask about the basic data of the project.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Project name</guilabel></term>
<listitem><para>
Enter here the name of the project, as it will be displayed in &kbabel;'s menu.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Configuration file name</guilabel></term>
<listitem><para>
Select here a file for holding your project settings.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Language</guilabel></term>
<listitem><para>
Select or enter here the language name used by this project.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Project type</guilabel></term>
<listitem><para>
Select here the type of your project.
</para></listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="preferences-project-wizard-catman">
<title>Page 2</title>
<screenshot>
<screeninfo>Project Wizard Page 2</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_wizard_page2.png" format="PNG"/>
</imageobject>
<textobject><phrase>Project Wizard Page 2</phrase></textobject>
</mediaobject>
</screenshot>
<para>
The second page of the wizard asks about settings related to the
Catalog Manager.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Base folder for PO files</guilabel></term>
<listitem><para>
Select the base folder where your PO files are.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Base folder for POT files</guilabel></term>
<listitem><para>
Select the base folder where your POT files are.
</para></listitem>
</varlistentry>
</variablelist>
<para>
Type in or select the folders that contains all your <acronym>PO</acronym> and respectively
<acronym>POT</acronym> files. The files and the folders in these folders will then be
merged into one tree in &catalogmanager; window.
</para>
</sect2>
<sect2>
<title>Checking Project Stettings</title>
<important><para>
As written earlier in this chapter, unfortunately the wizard is very simple and
therefore fails to ask for some important settings.
</para></important>
<para>
Now that you have <quote>finished</quote> your new project, you should verify the main settings in
<menuchoice><guimenu>Project</guimenu> <guimenuitem>Configure...</guimenuitem></menuchoice>.
Especially select the <guilabel>Identity</guilabel> page and fix the team email address in
<guilabel>Language mailing list</guilabel>.
(The default one created by the wizard from the language setting is only useful if you are part of a &GNU; project.)
</para>
<para>
If the project settings are not for KDE, it is recommended that you check the
<guilabel>Save</guilabel> page and checks the settings there.
</para>
</sect2>
</sect1>
<sect1 id="preferences-project-settings">
<title>Project Settings</title>
<para> To show the project setting dialog choose
<menuchoice><guimenu>Project</guimenu> <guimenuitem>Configure...</guimenuitem></menuchoice>
from &kbabel;'s or &catalogmanager;'s menu. It uses a
structured configuration dialog which makes it very easy to find an
option without having to perform an extensive search for it.</para>
<para>The left side of the preferences dialog lists the categories of
customizable items and the right side shows the corresponding tab for
the selected category. &kbabel; keeps changes if you move between
categories, so when you're finally happy click the
<guibutton>OK</guibutton> button. At any time you can use quick
help—just click on the question mark on the title bar and,
after the cursor has changed to an arrow with a question mark,
click on a button, label, or preference entry to find out more
about it.</para>
<note><para>
Pages for settings for &kbabel; (the editor) and for &catalogmanager;
are in the list.
</para></note>
<sect2 id="preferences-project-identity">
<title>Identity</title>
<para>These settings are for &kbabel;.</para>
<para>This section allows you to set standard fields for every
translated <acronym>PO</acronym> file. These are your name, email
address, full language name, email address for your translation team
mailing list. There is also a timezone field to track your
<quote>last modified</quote> time for <acronym>PO</acronym> files.
You can specify it as character sequence like <acronym>EEST</acronym>
or offset from <acronym>GMT</acronym> time like +0200 (&ie; for
Romania). This information is used when updating file headers. You
can find the options that control what fields in the header should be
updated in the <link linkend="preferences-project-save">Save</link> section of
the Preferences dialog.</para>
<warning><para>Character sequences for timezones are not standardized.
So you should not use the string set here in time specification for
saving in <link linkend="preferences-project-save">Save</link> tab. You should
use <literal>%z</literal> instead.</para></warning>
<variablelist>
<varlistentry>
<term><guilabel>Number of singular/plural forms</guilabel></term>
<listitem>
<para> Use this for setting number of plural forms for your
language. For example, it is 2 for German (one for the singular and
one for the plural form).</para>
<note><para>This feature is currently implemented only for plural forms format used in &kde;. It does not work with &GNU; gettext plural forms.</para></note>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="preferences-project-save">
<title>Save</title>
<para>These settings are for &kbabel;.</para>
<para><remark>
TODO This seems to document only the "General" tab but not the "Header" and "Copyright" ones
</remark></para>
<para>
This section allows you to edit the options for <acronym>PO</acronym> file saving. The first
group of checkboxes controls general behavior for actions
performed in <acronym>PO</acronym> file saving.
</para>
<variablelist>
<varlistentry>
<term><guibutton>Update header when saving</guibutton></term>
<listitem><para>
Check this button, to update the header information of the file
every time it is saved. The header normally keeps information
about the date and time the file was last updated,the last translator
etc. You can choose which information you want to update from the
<guilabel>Fields to update</guilabel> checkboxes area below. Fields
that do not exist are added to the header. If you want to add
additional fields to the header you can edit the header manually by
choosing <menuchoice><guimenu>Edit</guimenu> <guimenuitem>Edit
Header</guimenuitem></menuchoice> in the editor window.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Check syntax of file when saving</guibutton></term>
<listitem><para>
Check this to automatically check syntax of file with
<userinput><command>msgfmt</command> --statistics</userinput> when
saving a file. You will only get a message if an error occurred. You
should keep this validation enabled unless you know what you are doing.
</para></listitem>
</varlistentry>
</variablelist>
<para>If you do not want to touch some fields in a <acronym>PO</acronym>
file header or want to force updating of specific fields, there are five
checkboxes which control this: revision date, <acronym>PO</acronym> file
language, text encoding, last translator name, charset. If a field
does not exist, it is appended to the header. If you want to add other
information to the header, you have to edit the header manually by
choosing <menuchoice><guimenu>Edit</guimenu><guimenuitem>Edit
Header</guimenuitem></menuchoice> in the editor window. Deactivate
<guibutton>Update header when saving</guibutton> above if you don't
want to have the header updated.</para>
<para>For date and time of the header field
<emphasis>PO-Revision-Date</emphasis> you can choose one of the
formats: <guilabel>Default</guilabel>, <guilabel>Local</guilabel>, <guilabel>Custom</guilabel>.</para>
<important><para>
You should keep the default setting of <guilabel>Default</guilabel>. The two other settings
make that the generated <acronym>PO</acronym> file is not a standard &GNU; gettext <acronym>PO</acronym> file
anymore, so this should be avoided.
</para></important>
<itemizedlist>
<listitem><para>
<guilabel>Default</guilabel> is the format normally used in <acronym>PO</acronym> files.
</para></listitem>
<listitem><para>
<guilabel>Local</guilabel> is the format specific to your country.
</para></listitem>
<listitem><para>
<guilabel>Custom</guilabel> lets you define your own format, where you
can use the following C-like format strings:
<table>
<title>Year</title>
<tgroup cols="3">
<thead>
<row>
<entry>Format</entry><entry>Meaning</entry><entry>Range</entry>
</row>
</thead>
<tbody>
<row>
<entry>%y</entry><entry>year</entry><entry>00 to 99</entry>
</row>
<row>
<entry>%Y</entry><entry>year</entry><entry>0001 to 9999</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
<title>Month</title>
<tgroup cols="3">
<thead>
<row>
<entry>Format</entry><entry>Meaning</entry><entry>Range</entry>
</row>
</thead>
<tbody>
<row>
<entry>%m</entry><entry>month of year</entry><entry>01 to 12</entry>
</row>
<row>
<entry>%f</entry><entry>month of year</entry><entry>1 to 12</entry>
</row>
<row>
<entry>%b,%h</entry><entry>month abbreviation</entry><entry>Jan to Dec</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
<title>Day</title>
<tgroup cols="3">
<thead>
<row>
<entry>Format</entry><entry>Meaning</entry><entry>Range</entry>
</row>
</thead>
<tbody>
<row>
<entry>%j</entry><entry>day of the year</entry><entry>001 to 366</entry>
</row>
<row>
<entry>%d</entry><entry>day of month</entry><entry>01 to 31</entry>
</row>
<row>
<entry>%e</entry><entry>day of month</entry><entry>1 to 31</entry>
</row>
<row>
<entry>%a</entry><entry>weekday abbreviation</entry><entry>Sun to Sat</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
<title>Hour</title>
<tgroup cols="3">
<thead>
<row>
<entry>Format</entry><entry>Meaning</entry><entry>Range</entry>
</row>
</thead>
<tbody>
<row>
<entry>%H</entry><entry>hour</entry><entry>00 to 23</entry>
</row>
<row>
<entry>%k</entry><entry>hour</entry><entry>0 to 23</entry>
</row>
<row>
<entry>%i</entry><entry>hour</entry><entry>1 to 12</entry>
</row>
<row>
<entry>%I</entry><entry>hour</entry><entry>01 to 12</entry>
</row>
<row>
<entry>%p</entry><entry></entry><entry>AM or PM</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
<title>Minute, Second, Timezone</title>
<tgroup cols="3">
<thead>
<row>
<entry>Format</entry><entry>Meaning</entry><entry>Range</entry>
</row>
</thead>
<tbody>
<row>
<entry>%M</entry><entry>minute</entry><entry>00 to 59</entry>
</row>
<row>
<entry>%S</entry><entry>second</entry><entry>00 to 59</entry>
</row>
<row>
<entry>%Z</entry><entry>timezone</entry><entry>(given in identity settings)</entry>
</row>
<row>
<entry>%z</entry><entry>timezone</entry><entry>(numeric offset as specified by system settings)</entry>
</row>
</tbody>
</tgroup>
</table>
</para></listitem>
</itemizedlist>
<note><para>
The option to select the date format for the <acronym>PO</acronym> file is considered to be deprecated,
and will probably be removed in a future version of KBabel.
</para></note>
<para>The lower group covers encoding options for <acronym>PO</acronym>
files when saving. If you work on the &kde; project you should be aware
that at least <acronym>PO</acronym> files <emphasis>must</emphasis> be UTF-8 encoded in &kde;.
Alternatively you can select the encoding corresponding to your locale.
If, for some reason, you do not want to accidentally change the current PO
file encoding, turn on <guibutton>Keep the encoding of the
file</guibutton>.</para>
<caution><para>
For reason of informtation interchange, &GNU; gettext limits the encodings allowed for a
<acronym>PO</acronym> file. &kbabel; does not know of this restriction, so the encoding
correspondig to your locale might not be suitable. (UTF-8 is always supported by &GNU; gettext.)
</para></caution>
</sect2>
<sect2 id="preferences-project-spellcheck">
<title>Spell Check</title>
<para>These settings are for &kbabel;.</para>
<para>Here you can set your spell checking preferences. This is of
interest if you have a dictionary file for the language you are
translating to. Below are the items to consider setting:</para>
<variablelist>
<varlistentry>
<term><guibutton>Create root/affix combinations not in dictionary</guibutton></term>
<listitem><para>
For new words added to the personal dictionary,
the spell checker will create root/affix
combinations to match more than one word (variations).
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Consider run-together words as spelling errors</guibutton></term>
<listitem><para>
If this is turned on, joined words will be treated
as errors. However, such words are very common in
the German language, which have a very large number of
compound words, so it should be left turned off in that case.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Dictionary</guilabel></term>
<listitem><para>
From the popup list you can choose which dictionary to use. Note
that you must install an appropriate dictionary for your language.
Check your ispell or aspell distribution to find out if you have
one.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Encoding</guilabel></term>
<listitem>
<para>
Here you choose the encoding for your text. This option is passed
to the spellchecker, and is used as the encoding for your words
dictionary.
See the <ulink url="help:/tdespell">tdespell</ulink> documentation for
more details.
</para>
<note><para>
The encoding selected here is not linked to encodings of the
<acronym>PO</acronym> files. Depending on the spellchecker
(especially in the case of <command>ispell</command>),
you might not have much choice for the encoding.
(For example, a few Western European languages can only work
with <command>ispell</command> when using ISO-8859-1.)
</para></note>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Client</guilabel></term>
<listitem><para>
Backend program to use for spell checking. Currently either
<command>ispell</command> (International Ispell) or aspell.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Remember ignored words</guibutton></term>
<listitem><para>
Keep track of user-ignored words when spell-checking
<acronym>PO</acronym> files. It is very convenient to ignore the abbreviations or strange letter combinations you meet in &GUI; interfaces.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>File to store ignored words</guilabel></term>
<listitem><para>
Here you can set location of the file for ignored words. Click
on the folder icon to the right of the edit box. The default is
<filename>$<envar>HOME</envar>/.trinity/share/apps/kbabel/spellignores</filename>,
where <filename>$<envar>HOME</envar></filename> is your home folder.
</para></listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="preferences-project-source">
<title>Source reference</title>
<para>These settings are for &kbabel;.</para>
<screenshot>
<screeninfo>Project Settings, source reference</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_proj_source.png" format="PNG"/>
</imageobject>
<textobject><phrase>Project Settings, source reference</phrase></textobject>
</mediaobject>
</screenshot>
<para>
This dialog is for setting how KBabel should construct the full path from each source references,
which are in the comments of each entry of a <acronym>PO</acronym> file.
</para>
<sect3>
<title>Dialog elements</title>
<para>
In the edit line <guilabel>Base folder for source code</guilabel>, you can set a
base folder where the source code of your project is. This defines the value of the variable
<userinput>@CODEROOT@</userinput>, which is described below.
</para>
<para>
In the group <guilabel>Path Patterns</guilabel>, you can define patterns or rules
to construct the paths with the help of a few variables:
<userinput>@CODEROOT@</userinput>, <userinput>@PACKAGEDIR@</userinput>,
<userinput>@PACKAGE@</userinput>, <userinput>@COMMENTPATH@</userinput>,
<userinput>@POFILEDIR@</userinput>, which are defined below.
</para>
<note><para>
The variable <userinput>@PODIRFILE@</userinput> was introduced in &kbabel; version 1.11.1 (for &kde; 3.5.1).
</para></note>
<para>
With the button <guibutton>Add</guibutton>, you can add the line from the text box
to the list of used path patterns. With the button <guibutton>Remove</guibutton>,
you can remove the selected pattern from the list. With the buttons
<guibutton>Up</guibutton> and <guibutton>Down</guibutton>, you can change the priority of
the path patterns.
</para>
</sect3>
<sect3>
<title>The variables</title>
<itemizedlist>
<listitem><para>
<userinput>@CODEROOT@</userinput>: The base folder of the source code.
</para></listitem>
<listitem><para>
<userinput>@PACKAGEDIR@</userinput>: The folder of the package (i.e. <acronym>PO</acronym> file).
</para></listitem>
<listitem><para>
<userinput>@PACKAGE@</userinput>: The package name (i.e. <acronym>PO</acronym> file name without extension).
</para></listitem>
<listitem><para>
<userinput>@POFILEDIR@</userinput>: The folder of the <acronym>PO</acronym> file.
</para></listitem>
<listitem><para>
<userinput>@COMMENTPATH@</userinput>: The relative path given as source reference in the comment of an entry of the <acronym>PO</acronym> file.
</para></listitem>
</itemizedlist>
<important><para>
The variables <userinput>@PACKAGEDIR@</userinput> and <userinput>@POFILEDIR@</userinput> have similar
meaning but not the same result. The variable <userinput>@POFILEDIR@</userinput>
will always hold the folder of <acronym>PO</acronym> file,
<userinput>@PACKAGEDIR@</userinput> might not. If the <acronym>PO</acronym> file was loaded
by the help of the &catalogmanager; then <userinput>@PACKAGEDIR@</userinput> has only the part of
the path, based on the <acronym>PO</acronym> base path defined for the &catalogmanager;
<link linkend="preferences-project-folders">(see below)</link>.
</para></important>
<note><para>
The variables <userinput>@CODEROOT@</userinput> and <userinput>@POFILEDIR@</userinput> can only be used at
the beginning of a pattern to be useful. The variable <userinput>@COMMENTPATH@</userinput> can only be used at the
end of a pattern and is nearly mandatory.
The variables <userinput>@PACKAGEDIR@</userinput> and <userinput>@POFILEDIR@</userinput>
should not be used in the same pattern. The variables <userinput>@CODEROOT@</userinput> and <userinput>@POFILEDIR@</userinput> should not be used in the same pattern either.
</para></note>
</sect3>
<sect3>
<title>The default path patterns</title>
<para>
From &kbabel; 1.11.1 (of &kde; 3.5.1) on, there are five default path patterns:
</para>
<itemizedlist>
<listitem><para>
<userinput>@PACKAGEDIR@</userinput>/<userinput>@PACKAGE@</userinput>/<userinput>@COMMENTPATH@</userinput>
</para></listitem>
<listitem><para>
<userinput>@CODEROOT@</userinput>/<userinput>@PACKAGEDIR@</userinput>/<userinput>@PACKAGE@</userinput>/<userinput>@COMMENTPATH@</userinput>
</para></listitem>
<listitem><para>
<userinput>@CODEROOT@</userinput>/<userinput>@PACKAGE@</userinput>/<userinput>@COMMENTPATH@</userinput>
</para></listitem>
<listitem><para>
<userinput>@POFILEDIR@</userinput>/<userinput>@COMMENTPATH@</userinput>
</para></listitem>
<listitem><para>
<userinput>@POFILEDIR@</userinput>/../<userinput>@COMMENTPATH@</userinput>
</para></listitem>
</itemizedlist>
<note><para>
&kde; projects need typically the third pattern.
The last pattern is typical for &GNU; projects, where the source references are related to
the parent of the directory where the PO file is.
</para></note>
</sect3>
<sect3>
<title>Creating New Path Patterns</title>
<para>
In most cases the default path patterns should be enough, whatever
the project is for KDE (assuming that you have set the correct base directory)
or if the project is a &GNU; one (or structured like a &GNU; project).
</para>
<note><para>
For &kde;, some <acronym>PO</acronym> files do not contain enough information
(including the file path and name) for &kbabel; to find the right source file
that is supposed to be refered. To fix that you would need precise path patterns
for such files, which is nearly impossible to define by the numbers of such files
in &kde;. But if you work often with such a file, may be it is worth to set
a path pattern explicitely for supporting that <acronym>PO</acronym> file.
</para></note>
<para>
For creating your own path patterns, you can use the variables defined above,
but apart <userinput>@COMMENTPATH@</userinput> not any variable is mandatory to use.
(To be exact, <userinput>@COMMENTPATH@</userinput> is not mandatory either,
but not using it will probably lead to no result.)
</para>
<para>
An example of path pattern could be that you want to display the source reference
of &kde;'s file desktop_tdebase.po. In that case you will probably need a path pattern like:
<userinput>@CODEROOT@</userinput>/<userinput>@PACKAGEDIR@</userinput>/tdebase/<userinput>@COMMENTPATH@</userinput>
(compared to one of the default path patterns, the sequence <userinput>@PACKAGE@</userinput> has been
replaced by tdebase).
</para>
<para>
In case of really complex problems you can, of course, define an absolute path
without any variables beside <userinput>@COMMENTPATH@</userinput>, like for example:
/home/usr/kde-source/tdebase/<userinput>@COMMENTPATH@</userinput> assuming that
/home/usr/kde-source/tdebase is the path where the tdebase source module is.
</para>
</sect3>
</sect2>
<sect2 id="preferences-project-miscellaneous">
<title>Miscellaneous</title>
<para>These settings are for &kbabel;.</para>
<para>
<guilabel>Miscellaneous</guilabel> section
holds &kbabel; settings that do not fit anywhere else.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Marker for keyboard accelerator</guilabel></term>
<listitem><para>
Here you can select your own character to serve
as the keyboard accelerator indicator in a &GUI;.
By default it is & (ampersand), but in some
programming toolkits it may vary.
For example, in Gnome/GTK translations the underscore
character <quote>_</quote>
is the marker for the keyboard accelerator.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Regular expression for context information</guilabel></term>
<listitem><para>
For inexperienced users "regular expression" may sound strange.
So you are advised to change the default value
only if you know what you are doing. Some &GUI; programming
toolkits provide their own context information description
methods. Consult an experienced developer if you
translate <acronym>PO</acronym> files other than standard &kde; files.
For the sake of completeness I will "translate" for you what the
default regular expression means:
"the text matches if it starts with _: and is followed
by one or more characters and ends with a newline".
</para></listitem>
</varlistentry>
</variablelist>
</sect2>
<!-- Catalog Manager project settings -->
<sect2 id="preferences-project-folders">
<title>Project folders</title>
<para>These settings are for &catalogmanager;.</para>
<para>
Here are two edit lines with folder buttons.
Type in or select the folders that contains all your <acronym>PO</acronym> and respectively
<acronym>POT</acronym> files. The files and the folders in these folders will then be
merged into one tree in Catalog Manager window.
</para>
<para>
Below you can turn on and off if:
</para>
<variablelist>
<varlistentry>
<term><guibutton>Open files in new window</guibutton></term>
<listitem><para>
If this is activated all files that are opened from the Catalog
Manager are opened in a new window.
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Kill processes on exit</guibutton></term>
<listitem><para>
If you check this, &kbabel; tries to kill the processes that are not
exited already when the program closes by sending a kill signal to them.
<note><para>
It's not guaranteed that the processes are killed.
</para></note>
</para></listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Create index for file contents</guibutton></term>
<listitem><para>
If you check this, &kbabel; will create an index of contents for every
file in the tree. This index is then used in find/replace operations.
<warning><para>There is a large speed trade-off. If you enable
<guibutton>Create index for file contents</guibutton>, the updating of
file information will be much slower. On the other hand, it speeds up
find/replace operations considerably.</para></warning>
</para></listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="preferences-project-folder-commands">
<title>Folder Commands</title>
<para>These settings are for &catalogmanager;.</para>
<screenshot>
<screeninfo>Project Settings,folder commands</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_proj_folder_commands.png" format="PNG"/>
</imageobject>
<textobject><phrase>Project Settings, folder commands</phrase></textobject>
</mediaobject>
</screenshot>
<para>
Here you can insert commands you want to execute in folders from the
Catalog Manager. The commands are then shown in the submenu
<menuchoice><guimenuitem>Commands</guimenuitem></menuchoice>
in the Catalog Manager's context menu.
</para><para>
Insert in the <guilabel>Command Label</guilabel> field the
label of the command. The label can be chosen freely and is only used to be displayed
in the menu. In the <guilabel>Command</guilabel> field insert the command you want to
have executed when selecting the corresponding menu item. Then press the <guibutton>Add</guibutton>
button to add the command to your available commands.
To edit a command, select it, press the
<guibutton>Edit</guibutton> button and press <guibutton>Add</guibutton> after you have
finished. To remove a command, select it from the list and press the
<guibutton>Remove</guibutton> button. If you want a different order in the contextual
submenu, you can use the up and down buttons.
</para><para>
The command is executed through your default shell, so you can execute
multiple commands at once by separating them with a semicolon, and you can set environment
variables if you need to. The commands are executed in the (<acronym>PO</acronym> file) folder you have
selected in the Catalog Manager.
</para><para>
The following strings will be replaced in a command:
</para>
<itemizedlist>
<listitem><para>
<userinput>@PACKAGE@</userinput>: The name of the folder without path
</para></listitem>
<listitem><para>
<userinput>@PODIR@</userinput>: The name of the <acronym>PO</acronym>-folder with path
</para></listitem>
<listitem><para>
<userinput>@POTDIR@</userinput>: The name of the template folder with path
</para></listitem>
</itemizedlist>
<para>
E.g.: If you want to execute <command>make</command> and then <command>make
install</command> you could insert in <userinput>Make install</userinput> in the
<guilabel>Name</guilabel> field, and <userinput>make; make install</userinput>
in the <guilabel>Command</guilabel> field. If you then select
<menuchoice><guimenuitem>Commands</guimenuitem>
<guimenuitem>Make install</guimenuitem></menuchoice>
from the context menu of a folder, the commands listed above will be
executed in that folder.
</para>
</sect2>
<sect2 id="preferences-project-file-commands">
<title>File Commands</title>
<para>These settings are for &catalogmanager;.</para>
<screenshot>
<screeninfo>Project Settings, file commands</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_proj_file_commands.png" format="PNG"/>
</imageobject>
<textobject><phrase>Project Settings, file commands</phrase></textobject>
</mediaobject>
</screenshot>
<para>
Here you can insert the commands you want to execute on files from the Catalog
Manager. The commands are then shown in the submenu
<menuchoice><guimenuitem>Commands</guimenuitem></menuchoice> in the Catalog
Manager's context menu.
</para>
<para>
Insert in the <guilabel>Command Label</guilabel> field the label of the command. The label can be
chosen freely and is only used to be displayed in the menu. In the
<guilabel>Command</guilabel> field insert the command you want to have executed when
selecting the corresponding menu item. Then press the <guibutton>Add</guibutton> button
to add the command to your available commands. To edit a command, select it, press
the <guibutton>Edit</guibutton> button and press the <guibutton>Add</guibutton> button after you have
finished. To remove a command, select it from the list and press the
<guibutton>Remove</guibutton> button. If you want a different order in the contextual
submenu, you can use the up and down buttons.
</para><para>
The command is executed through your default shell, so you can execute
multiple commands at once by separating them with a semicolon, and you can
set environment variables, if you need. The commands are executed in the
(<acronym>PO</acronym> file) folder, in which the file, you have selected in the Catalog
Manager, is.
</para><para>
The following strings will be replaced in a command:
</para>
<itemizedlist>
<listitem><para>
<userinput>@PACKAGE@</userinput>: The name of the file without path and extension
</para></listitem>
<listitem><para>
<userinput>@POFILE@</userinput>: The name of the <acronym>PO</acronym> file with path and extension
</para></listitem>
<listitem><para>
<userinput>@POTFILE@</userinput>: The name of the corresponding template file
with path and extension
</para></listitem>
<listitem><para>
<userinput>@PODIR@</userinput>: The name of the folder the <acronym>PO</acronym> file is in, with path
</para></listitem>
<listitem><para>
<userinput>@POTDIR@</userinput>: The name of the folder the template file is
in, with path
</para></listitem>
</itemizedlist>
<para>
For example, if you want to merge the template file into your <acronym>PO</acronym> file you could
insert <userinput>Merge</userinput> in the <guilabel>Name</guilabel> field and
<userinput>msgmerge @POFILE@ @POTFILE@ > @[email protected] && mv @[email protected]
"@[email protected]</userinput> in the <guilabel>Command</guilabel> field.
If you then select
<menuchoice><guimenuitem>Commands</guimenuitem><guimenuitem>Merge</guimenuitem></menuchoice>
from a file's context menu, the <acronym>PO</acronym> file will be merged with its template file.
</para>
</sect2>
<sect2 id="preferences-project-catalog-manager">
<title>Catalog Manager</title>
<para>These settings are for &catalogmanager;.</para>
<screenshot>
<screeninfo>Project Settings, &catalogmanager;</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_proj_catman.png" format="PNG"/>
</imageobject>
<textobject><phrase>Project Settings, &catalogmanager;</phrase></textobject>
</mediaobject>
</screenshot>
<para>The checkboxes switches on or off the corresponding column of the &catalogmanager;'s view.</para>
</sect2>
<sect2 id="preferences-project-diff">
<title>Diff</title>
<para>These settings are for &catalogmanager;.</para>
<screenshot>
<screeninfo>Project Settings, diff</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="pref_proj_diff.png" format="PNG"/>
</imageobject>
<textobject><phrase>Project Settings, diff</phrase></textobject>
</mediaobject>
</screenshot>
<para><remark>TODO</remark></para>
</sect2>
</sect1>
</chapter>
<!--
Local Variables:
mode: xml
sgml-minimize-attributes:nil
sgml-general-insert-case:lower
sgml-indent-step:0
sgml-indent-data:nil
End:
vim:tabstop=2:shiftwidth=2:expandtab
-->
|