[fpc-devel] patch for rstconv

Vincent Snijders vsnijders at quicknet.nl
Thu Dec 27 13:11:15 CET 2007


Hi,

Lazarus internally has a tool for generating po files from rst files, much like 
rstconv. For the convenience of translators using a po-editor, the files generated 
by Lazarus start with:
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

The important part is: charset=UTF-8
Then the po-editor knows in what encoding it should read and write the file.

Attached patch adds an option -c XXX for the conversion to .po files to rstconv.
It adds the above header to the .po file and you can specify what the charset should 
be. I was not sure what option name I should take, -c is used in the other output 
formats already, but so -s and -h (for header) is not possible too.

In our scripts to do the conversion outside Lazarus from the command line, we will 
call it like
rstconv -c UTF-8 -i bla.rst -o bla.po

Please, review, comment and/or apply the patch.

Vincent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rstconv.patch
Type: text/x-patch
Size: 2731 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20071227/c07863ef/attachment.bin>


More information about the fpc-devel mailing list