Hi,

On Fri, 2008-09-05 at 05:31 +0900, Satoru SATOH wrote:
> [snip]

Thanks again for the good description. I think I now understand the
process, but I would like to make sure I really do.

First of all, there seems to be a minor nit with the current set of
files. Please have a look at what happens here:

--------------------------------
[EMAIL PROTECTED] rsyslog]# xml2po -v
0.12.2
[EMAIL PROTECTED] rsyslog]# make -C man/ja create-pot
make: Entering directory `/home/rger/proj/rsyslog/man/ja'
/usr/bin/xml2po -e -o rsyslogd.8.pot ../C/rsyslogd.8.xml
Traceback (most recent call last):
  File "/usr/bin/xml2po", line 856, in <module>
    doSerialize(doc)
  File "/usr/bin/xml2po", line 589, in doSerialize
    outtxt += doSerialize(child)
  File "/usr/bin/xml2po", line 583, in doSerialize
    (starttag, content, endtag, translation) = processElementTag(node,
repl, 1)
  File "/usr/bin/xml2po", line 525, in processElementTag
    translation = translation.replace('<placeholder-%d/>' % (i),
replacement)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
4930: ordinal not in range(128)
make: *** [rsyslogd.8.pot] Error 1
make: Leaving directory `/home/rger/proj/rsyslog/man/ja'
----------------------------------

Do you have an idea how I can find out what exactly to fix (I think I
understand that there is in invalid character in rsyslogd.8.xml, but the
error message is not very helpful at pointing me at the actual trouble
source ;)).

>From an upper level view, I now understand the workflow as follows:

When I update the documentation, I update the files in ./man/C. These
are kept in docbook format and these are the only sources for the
English language documentation.

After I have updated these files, every translator needs to run 

$ make -C man/<lang> update-po

to update the PO files. The translators will work on the .po files only.
When they are (sufficiently ;)) finished, the man files need to be
regenerated. Let me elaborate a bit on this process, I'd like to get to
some details.

As far as I understand, this results in the .po files being converted
back to docbook. Then, docbook is used to generate the ultimate
destination, e.g. the man files. The same process is used to generate
the English files, except that the docbook tools are run directly,
because there were no interim .po files.

Is this description correct? I am asking because I think it would make
sense to generate different formats (man, html, pdf at least) from the
same set of source files. So I understand that .po is just an interim
step which makes translation easier, but there will be a translated
version which in turn can be processed into any format that docbook
tools support.

I'd greatly appreciate your feedback. If you know how to do it, I would
also greatly appreciate if you could provide me a patch (or
instructions) on how to generate pdf from the "man files".

Thanks,
Rainer


> > I also have not yet fully understood the translation workflow. If
> > the ./ja subdirectory is copied, doesn't it (soon) contain the Japanese
> > version? If so, shouldn't any other subdirectory be copied (e.g. an ./en
> > be created with the English source doc, which I maintain)?
> 
> It is a little much complicated than that. Here are example steps for
> german (de) man pages.
> 
> 
> [initial translation]
> 
>   1. create mandir and makefile.am in it
> 
>      $ mkdir man/de && \
>         sed 's/LANG = ja/LANG = de/' man/ja/Makefile.am > \
>                 man/de/Makefile.am
> 
>   2. add man/de/ to SUBDIRS in man/Makefile.am
> 
>      $ sed -i 's/^\(SUBDIRS.*\)/\1 de/' man/Makefile.am
> 
>   3. add man/de/Makefile.am to AC_CONFIG_FILES in configure.ac
> 
>   4. generate man/de/Makefile.am
> 
>      $ autoreconf -vfi && ./configure --prefix=$(pwd)/i \
>         --enable-regenerate-man
> 
>   5. generate POT (PO template; language independent) and rename it 
> 
>      $ make -C man/de create-pot
>      $ mv man/de/rsyslog.conf.5.pot man/de/rsyslog.conf.5.po
>      $ mv man/de/rsyslogd.8.pot man/de/rsyslogd.8.po
> 
>   6. edit necessary header fields in PO files
> 
>      $ vim man/de/rsyslog.conf.5.po
>      $ cat man/de/rsyslog.conf.5.po
>      msgid ""
>      msgstr ""
>      "Project-Id-Version: rsyslog HEAD\n"
>      "POT-Creation-Date: 2008-09-05 04:41+0900\n"
>      "PO-Revision-Date: 2008-09-05 05:01+0900\n"
>      "Last-Translator: XXXXX YYYYY <[EMAIL PROTECTED]>\n"
>      "Language-Team: German <[EMAIL PROTECTED]>\n"
>      "MIME-Version: 1.0\n"
>      "Content-Type: text/plain; charset=UTF-8\n"
>      "Content-Transfer-Encoding: 8bit\n"
> 
>      (snip)
> 
>   7. translate PO files
> 
>   8. generate man files
> 
>      $ ./configure --prefix=$(pwd)/i --enable-regenerate-man && make
> 
> 
> [update translations]
> 
>   1. update PO to follow changes in original docbook xml files
> 
>      $ make -C man/de update-po
> 
> 
> Please refer to man/ja/Makefile.am also. 
> 
> 
> BTW, "C" (man/C) means C (English) locale. This is the traditional dir
> name to keep original English message catalogs, I think.
> 
> - satoru
> 
> (snip)
> > > How to build:
> > > 
> > > To enable the man build process, configure have to be regenerated:
> > > 
> > >   $ (autoreconf -vfi && \
> > >         ./configure --enable-regenerate-man [...other options] && \
> > >         make && make install
> > > 
> > > 
> > > Translator's workflow:
> > > 
> > >  a. initial translation:
> > > 
> > >    0. arrange lang dir, that is, cp man/ja to man/YOUR_LANG/ and edit
> > >       Makefile.am; s/ja/YOUR_LANG/.
> > >    1. create POT: make -C man/YOUR_LANG/ create-pot
> > >    2. copy POT to PO and translate it
> > >    3. run make
> > > 
> > >  b. maintanance:
> > > 
> > >    1. update PO: make -C man/YOUR_LANG update-po
> > >    2. update translations
> > >    3. just run make
> > > 
> > > 
> > > Requirements for man regeneration / translation:
> > >  
> > >    xmllint, xsltproc, xml2po in gnome-doc-utils, DocBook DTD and DocBook
> > >    xslt stylesheet for man pages are required.
> > > 
> > >    If xmlcatalog (e.g. /etc/xml/catalog) is configured appropriately,
> > >    both xmllint and xsltproc will use local DTD and stylsheet files
> > >    instead of these from remote site
> > >    (http://www.oasis-open.org/docbook/...).
> > > 
> > > 
> > > - satoru
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog

Reply via email to