NOM¶
Locale::Po4a::Sgml - Converteix documents SGML des de/a fitxers PO
DESCRIPCIÓ¶
L'objectiu del projecte po4a (PO per a tot) és facilitar la traducció
  (i sobretot el manteniment de les traduccions) utilitzant les eines de gettext
  en àrees on no eren d'esperar, com ara en la documentació.
Locale::Po4a::SgmL és un mòdul per ajudar en la traducció de
  documents en el format SGML a altres llenguatges [humans].
This module uses 
nsgmls to parse the SGML files. Make sure it is
  installed. Also make sure that the DTD of the SGML files are installed in the
  system.
OPCIONS QUE ACCEPTA AQUEST MÒDUL¶
  - debug
 
  - Llista separada per espais de les paraules clau que
      indiquen quina part voleu depurar. Els valors possibles són: tag,
      generic, entities i refs.
 
  - verbose
 
  - Dóna més informació sobre què està
      passant.
 
  - translate
 
  - Llista separada per espais dels tags extra (a part dels que
      proveeix el DTD) el contingut dels quals ha de formar un msgid extra.
 
  - section
 
  - Llista separada per espais dels tags extra (a part dels que
      proveeix el DTD) que contenen altres tags, alguns dels quals poden ser de
      la categoria translate.
 
  - indent
 
  - Space separated list of tags which increase the indentation
      level.
 
  - verbatim
 
  - La disposició dins d'aquests tags no s'ha de canviar.
      El paràgraf no es justificarà, i no s'afegiran espais
      d'indentació ni noves línies amb propòsits
    cosmètics.
 
  - empty
 
  - Tags que no necessiten tancament.
 
  - ignore
 
  - Tags ignored and considered as plain char data by po4a.
      That is to say that they can be part of an msgid. For example, <b>
      is a good candidate for this category since putting it in the translate
      section would create msgids not being whole sentences, which is bad.
 
  - attributes
 
  - A space separated list of attributes that need to be
      translated. You can specify the attributes by their name (for example,
      "lang"), but you can also prefix it with a tag hierarchy, to
      specify that this attribute will only be translated when it is into the
      specified tag. For example: <bbb><aaa>lang specifies that the
      lang attribute will only be translated if it is in an <aaa> tag,
      which is in a <bbb> tag. The tag names are actually regular
      expressions so you can also write things like <aaa|bbbb>lang to only
      translate lang attributes that are in an <aaa> or a <bbb>
    tag.
 
  - qualify
 
  - A space separated list of attributes for which the
      translation must be qualified by the attribute name. Note that this
      setting automatically adds the given attribute into the 'attributes' list
      too.
 
  - force
 
  - Proceed even if the DTD is unknown or if nsgmls finds
      errors in the input file.
 
  - include-all
 
  - Per defecte, per la comoditat del traductor, se salten els
      msgids que contenen només una entitat (com ara '&version;'). Si
      no es vol aquesta optimització, es pot activar aquesta opció.
      Pot ser útil si el document conté construccions com ara
      "<title>Á</title>", encara que dubto que
      mai passin coses així...
 
  - ignore-inclusion
 
  - Space separated list of entities that won't be inlined. Use
      this option with caution: it may cause nsgmls (used internally) to add
      tags and render the output document invalid.
 
ESTAT D'AQUEST MÒDUL¶
The result is perfect. I.e., the generated documents are exactly the same. But
  there are still some problems:
  - •
 
  - La sortida d'error de nsgmls es redirigeix cap a /dev/null,
      cosa clarament negativa. No sé com millorar-ho.
    
 
    El problema és que he de "protegir" les inclusions
      condicionals (com ara, les coses com "<! [ %foo [" i
      "]]>") abans de passar-ho a nsgmls. Sinó, nsgmls s'ho
      menja, i no sé com restaurar-ho al document final. Per tal
      d'evitar-ho, ho reescric com a "{PO4A-beg-foo}" i
      "{PO4A-end}".
     
    El problema d'això és que "{PO4A-end}" i companyia
      són vàlids en el document (però no en un tag <p> o
      semblant).
     
    Everything works well with nsgmls's output redirected that way, but it will
      prevent us from detecting that the document is badly formatted. 
  - •
 
  - Només funciona amb els dtds de DebianDoc i DocBook
      DTD. Hauria de ser molt fàcil afegir suport per a un nou DTD. El
      mecanisme és el mateix per a tots els DTD, tan sols heu de donar una
      llista dels tags existents i algunes de les seves característiques.
    
 
    Estic d'acord, això s'ha de documentar millor, però encara es
      considera beta, i odio documentar coses que poden/han de canviar. 
  - •
 
  - Atenció, el suport de DTDs encara és força
      experimental. No he llegit cap manual de referència per trobar la
      definició de tots els tags. Només he afegit la definició de
      tags al mòdul fins que ha funcionat per alguns documents que he
      trobat a la xarxa. Si el vostre document utilitza més tags que el
      meu, no funcionarà. Però com he dit abans, hauria de ser molt
      fàcil d'arreglar.
    
 
    Només he provat DocBook amb SAG (Guia d'Administrador de Sistemes,
      System Administrator Guide), però és un document força
      gran, i hauria d'utilitzar la majoria de característiques de DocBook.
     
    Per DebianDoc, he provat amb alguns manuals del DDP, però no tots
      encara. 
  - •
 
  - En cas d'inclusió de fitxers, la cadena de
      referència del fitxer PO (és a dir, línies com ara "#:
      en/titletoc.sgml:9460") serà errònia.
    
 
    Això passa perquè preprocesso el fitxer per protegir les
      inclusions condicionals (és a dir, les coses com "<! [ %foo
      [" i "]]>") i algunes entitats (com &version;) de
      nsgmls perquè vull que es conservin sense canvis en el document
      generat. Per fer-ho, faig una còpia temporal del fitxer d'entrada i
      li faig tots els canvis que vull abans de passar-lo a nsgmls per
      analitzar-lo.
     
    So that it works, I replace the entities asking for a file inclusion by the
      content of the given file (so that I can protect what needs to be in a
      subfile also). But nothing is done so far to correct the references (i.e.,
      filename and line number) afterward. I'm not sure what the best thing to
      do is. 
AUTORS¶
This module is an adapted version of sgmlspl (SGML postprocessor for the SGMLS
  and NSGMLS parsers) which was:
 Copyright (c) 1995 per David Megginson <dmeggins@aix1.uottawa.ca>
L'adaptació per po4a ha estat feta per:
 Denis Barbier <barbier@linuxfr.org>
 Martin Quinson (mquinson#debian.org)
DRET DE CÒPIA I LLICÈNCIA¶
 Copyright (c) 1995 per David Megginson <dmeggins@aix1.uottawa.ca>
 Copyright 2002, 2003, 2004, 2005 per SPI, inc.
Aquest programa és programari lliure; podeu redistribuir-lo i/o
  modificar-lo sota els termes de la GPL (consulteu el fitxer COPYING).