|
|
1.1 root 1: PGP language tools.
2:
3:
4: This is set of tools to maintain the PGP language files, with these
5: tools you can find new messages in the PGP source code and add them to
6: your language file. You can also merge multiple languages into one file
7: and extract languages from a merged file.
8:
9:
10: Two programs are needed to extract the PSTR messages from the PGP source
11: code: "pickpstr" and "killdups", the batch file extract.bat will run
12: these programs on the PGP source files in the right order (the order is
13: important if you want to use diff to find differences). You must run
14: extract.bat in the pgp src directory, this will create the file
15: "pstrmsgs". I have included this file with these tools.
16:
17:
18: To create an up-to-date language file with one or more translations you
19: must use the "langtool" program with the merge (-m) option:
20:
21: langtool -m -o newfile.txt pstrmsgs language.txt
22:
23: language.txt is the old language file with your translations. If there
24: is more than one language in this file you must specify the language
25: identifier after the filename. The output file "newfile.txt" will
26: contain all messages from "pstrmsgs" and the translations from
27: "language.txt", new messages that are not present in language.txt will
28: have the line:
29:
30: No translation
31:
32: instead of the translated message, so you can use the "find" command of
33: your editor to find the untranslated messages by searching for this string.
34:
35:
36: If you want to combine several languages into one file you can also
37: use "langtool" with the -m option:
38:
39: langtool -m -o language.txt lang1.txt lang2.txt
40:
41: This will add the language in lang2.txt to the combined language file
42: "lang1.txt", the merged output will be in "language.txt". If you
43: want to add another language, run the same command again, but use the
44: output file from the last command (language.txt) as first inputfile:
45:
46: langtool -m -o outfile.txt language.txt lang3.txt
47:
48: "langtool -m" will use all translations from the first inputfile, and
49: one translation from the second input file. If the second file contains
50: more than one language, you can specify the language you want after the
51: last filename.
52:
53:
54: You can also use langtool to extract one or more languages from a
55: combined language file:
56:
57: langtool -x -o es-nl.txt language.txt es nl
58:
59: will extract the languages with identifiers "es" and "nl" from
60: language.txt to the file "es-nl.txt"
61:
62:
63: If you want to run a simple check on a language file (the same check
64: that is done when pgp creates an index file), you can use the -c option:
65:
66: langtool -c language.txt
67:
68: This will print the number of messages, and the number of translations.
69:
70:
71: A language file for distribution should be in the PGP internal character
72: set: latin-1, for Russian it should be in KOI8. This means that if your
73: system doesn't use a latin-1 or KOI8 character set you will have to
74: convert the language file to this internal format before you add it to
75: the distribution. You can use the "charconv" program to do this:
76:
77: charconv int language.in >language.txt
78:
79: will convert from cp850 to the latin-1 internal format. To convert from
80: internal to external, use "charconv ext file_name". For conversion
81: between Russian character sets you need a different program. Harry Bush
82: has sent me such a program, I assume the Russian translators already
83: have this program, but if someone needs it, I can send it to you.
84:
85:
86: Branko
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.