[fpc-devel] patch for rstconv

Michael Van Canneyt michael at freepascal.org
Thu Dec 27 14:17:16 CET 2007



On Thu, 27 Dec 2007, Vincent Snijders wrote:

> 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.

The patch looks good. You can apply it yourself if you want.

Michael.



More information about the fpc-devel mailing list