On Thu, Aug 21, 2008 at 04:28:08PM +0200, [EMAIL PROTECTED] wrote:
> 
> I used po4a to convert the Subversion Book
> (svn source: http://svn.red-bean.com/svnbook/trunk/) from DocBook XML
> into PO.
> 
> My experiences (including revision numbers, patches I applied, ...) can be
> found in
> http://www.red-bean.com/pipermail/svnbook-dev/2008-August/004572.html
> and 
> http://www.red-bean.com/pipermail/svnbook-dev/2008-August/004574.html

Some remarks:
 * Did you try using a config file. This might ease the process of
   generating the translations, updating the POT, updating the POs.
   Simply calling "po4a --previous po4a/svnbook.cfg" could be sufficient.
   (example attached)
 * Did you try the includeexternal option (this could also simplify the
   command lines (only call the po4a commands once with only the
   book/book.xml file))
   Note: I'm note sure it's working correctly (at least you have to be in
   the correct directory if you want po4a to find the files). Just tell me
   if you think this option would help you (and should be improved).

The ideas/bugs I noted are:
 * speed improvement (at least I need to understand why it takes so long
   on my laptop (15 minutes))
 * improvement for the gettextization (see below)
 * <option> needs to be inline (see the other bug; fixed in CVS)
 * fix for the nodefault option (fixed in CVS)
 * support for untranslated inline tags (tags not translated if they are
   found alone on a paragraph, but translated "inline" if they are part of
   a bigger translated paragraph

> To summarize: It worked really well, except a few minor problems. The most
> annoying one is this one (beside #494607: Move option to an inline tag).
> 
> po4a-gettextize failed multiple times because of the following text:
> 
> <figure id="svn.intro.architecture.dia-1">
>     <title>Subversion's architecture</title>
>     <graphic fileref="images/ch01dia1.png"/>
> </figure>
> 
> The error I got:
> 
> po4a gettextization: Structure disparity between original and translated
> files:
> msgid (at ../en/book/ch00-preface.xml:902) is of type 'Content of:
> <preface><sect1><sect2><title>' while
> msgstr (at book/ch00-preface.xml:1773 book/ch00-preface.xml:1788) is of type
> 'Content of: <preface><sect1><sect2><figure><title>'.
> Original text: Subversion's Architecture
> Translated text: Die Architektur von Subversion

This is "normal"

The problem is that the English version contains:
      <title>Subversion's Architecture</title>
...
      <figure id="svn.intro.architecture.dia-1">
        <title>Subversion's architecture</title>

(note: two different strings: one with 'A', the other one with 'a' at
the beginning of "architecture")

The German version has the same string for both:
      <title>Die Architektur von Subversion</title>
...
      <figure id="svn.intro.architecture.dia-1">
        <title>Die Architektur von Subversion</title>

During the "gettextization", I put the English strings in front of the
German strings, but the English version has one more string than the
German.

I will check if I can fix it by having a less strict check on the type of
string when a string appear multiple times (if there is a mismatch, it
should be noticed later), or by storing the type of each occurrence.

> After removing it from the English and the German file it worked. Considering
> that also other <figure> tags caused problems and all other text was 
> flawlessly
> processed there must be a problem with it :-)

I would have probably done the same thing.
The goal of the "gettextization" is to speed up the retrieval of existing
translation, it does not need to be perfect, and there is not need to
loose 5 minutes to just win one string.

I'm also sometimes adding something like FIXME1, FIXME2 at the end of
sentences to force them being different while still being identifiable in
the PO file (or just to add missing paragraphs to the translated text).

Cheers,
-- 
Nekral



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to