Some of the articles in the FreeBSD documentation use entities to include large blocks of data. For example, one article is just a very large list of PGP keys for developers: https://www.freebsd.org/doc/en_US.ISO8859-1/articles/pgpkeys/index.html

The DocBook article.xml is only 2K, because it does things like this:

  <sect1 xml:id="pgpkeys-officers">
    <title>Officers</title>

    &section.pgpkeys-officers;
  </sect1>

We use xmllint to normalize the article into a single XML file for use with PO translation tools. Of course, all entities are expanded into text at that point.

It would be really nice to mark that particular entity as one that should be preserved in the translated file. Is it possible to do that with processing instructions or some other method? For example:

  <sect1 xml:id="pgpkeys-officers">
    <title>Officers</title>

    <?translate off?>
    &section.pgpkeys-officers;
    <?translate on?>
  </sect1>

In the normalized file, it could be a string to indicate to translators that it should be left alone:

  <sect1 xml:id="pgpkeys-officers">
    <title>Officers</title>

    <?translate off?>
    do not translate: section.pgpkeys-officers
    <?translate on?>
  </sect1>

Of course, it has to be changed back when the translated XML file is generated.

Is there a standard or elegant way to do this?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to