                    PGP language tools.


This is set of tools to maintain the PGP language files, with these
tools you can find new messages in the PGP source code and add them to
your language file.  You can also merge multiple languages into one file
and extract languages from a merged file.


Two programs are needed to extract the PSTR messages from the PGP source
code: "pickpstr" and "killdups", the batch file extract.bat will run
these programs on the PGP source files in the right order (the order is
important if you want to use diff to find differences).  You must run
extract.bat in the pgp src directory, this will create the file
"pstrmsgs".  I have included this file with these tools.


To create an up-to-date language file with one or more translations you
must use the "langtool" program with the merge (-m) option:

langtool -m -o newfile.txt pstrmsgs language.txt

language.txt is the old language file with your translations.  If there
is more than one language in this file you must specify the language
identifier after the filename.  The output file "newfile.txt" will
contain all messages from "pstrmsgs" and the translations from
"language.txt", new messages that are not present in language.txt will
have the line:

No translation

instead of the translated message, so you can use the "find" command of
your editor to find the untranslated messages by searching for this string.


If you want to combine several languages into one file you can also
use "langtool" with the -m option:

langtool -m -o language.txt lang1.txt lang2.txt

This will add the language in lang2.txt to the combined language file
"lang1.txt", the merged output will be in "language.txt".  If you 
want to add another language, run the same command again, but use the
output file from the last command (language.txt) as first inputfile:

langtool -m -o outfile.txt language.txt lang3.txt

"langtool -m" will use all translations from the first inputfile, and
one translation from the second input file.  If the second file contains
more than one language, you can specify the language you want after the
last filename.


You can also use langtool to extract one or more languages from a
combined language file:

langtool -x -o es-nl.txt language.txt es nl

will extract the languages with identifiers "es" and "nl" from
language.txt to the file "es-nl.txt"


If you want to run a simple check on a language file (the same check
that is done when pgp creates an index file), you can use the -c option:

langtool -c language.txt

This will print the number of messages, and the number of translations.


A language file for distribution should be in the PGP internal character
set: latin-1, for Russian it should be in KOI8.  This means that if your
system doesn't use a latin-1 or KOI8 character set you will have to
convert the language file to this internal format before you add it to
the distribution.  You can use the "charconv" program to do this:

charconv int language.in >language.txt

will convert from cp850 to the latin-1 internal format.  To convert from
internal to external, use "charconv ext file_name".  For conversion
between Russian character sets you need a different program.  Harry Bush
has sent me such a program, I assume the Russian translators already
have this program, but if someone needs it, I can send it to you.


Branko
