Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-12

patch for rstconv

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

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

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 26 lines
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.

Reply by email

Vincent Snijders
to Michael Van Canneyt
Michael Van Canneyt wrote 7 lines
On Thu, 27 Dec 2007, Vincent Snijders wrote: > > Please, review, comment and/or apply the patch. The patch looks good. You can apply it yourself if you want.

Applied in r9541.

Thanks,
Vincent

Reply by email

Vincent Snijders
to Vincent Snijders
Vincent Snijders wrote 11 lines
Michael Van Canneyt schreef: > > On Thu, 27 Dec 2007, Vincent Snijders wrote: >> >> Please, review, comment and/or apply the patch. > > The patch looks good. You can apply it yourself if you want. > Applied in r9541.

Can this patch be merged to the fixes_2_2 branch?

Vincent

Reply by email

Vincent Snijders
to Vincent Snijders
Vincent Snijders wrote 15 lines
Vincent Snijders schreef: > Michael Van Canneyt schreef: >> >> On Thu, 27 Dec 2007, Vincent Snijders wrote: >>> >>> Please, review, comment and/or apply the patch. >> >> The patch looks good. You can apply it yourself if you want. >> > > Applied in r9541. > Can this patch be merged to the fixes_2_2 branch?

No objections?

Vincent

Reply by email

Vincent Snijders
to Vincent Snijders
Vincent Snijders wrote 19 lines
Vincent Snijders schreef: > Vincent Snijders schreef: >> Michael Van Canneyt schreef: >>> >>> On Thu, 27 Dec 2007, Vincent Snijders wrote: >>>> >>>> Please, review, comment and/or apply the patch. >>> >>> The patch looks good. You can apply it yourself if you want. >>> >> >> Applied in r9541. >> > > Can this patch be merged to the fixes_2_2 branch? > No objections?

Merged in r9713.

Vincent

Reply by email