Re: xml2po -e

Today at 16:37, Matthew East wrote:

> I recently had some help on this list regarding the use of xml2po. We
> have made a pot template using xml2po -e, expanding the templates, but
> unfortunately this has resulted in the licences and revision history of
> the document appearing in the template, which several translators have
> complained about, given that there are official translations of the
> licences available, and that translating these parts is essentially
> unnecessary.

Why don't you include license using xinclude as well?

That will allow you to keep translations for legal.xml separate.

> Is there any way to exclude these entities from the pot template? Other
> than not passing the -e flag to xml2po?

No, not really.  But provided you have switched over to xincludes
instead of file inclusion via entities (except for legal.xml), you
should be fine by using xml2po *without* the "-e" option.

The thing is that xml2po currently has 3 modes of operation:
- expand only entities not related to another file inclusion (this
  is hacky because of libxml2 python bindings), this is the default
- expand all entities (-e)
- expand no entities (-k): this doesn't work in the merge step, so
  don't use it yet

Basically, you are now asking for default xml2po behaviour (basically,
try to expand only "cdata" entities).  Again, xml2po can't
differentiate between these two inclusions: what's *technically*
different from including fdl.xml on one relative path from including
eg. "chapter1.xml" on another relative path?

"-e" is recommended simply because when you are NOT using xi:include,
you won't be able to work on included non-well-formed (ill-formed :)
snippets (unless you make sure they are well-formed, but most of the
existing documentation doesn't use well-formed snippets, when it would
be easy to switch over to xi:include anyway). 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]