home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / xml2po / ubuntu.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2007-04-29  |  1017 b   |  24 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.4)
  3.  
  4. import libxml2
  5. from docbook import docbookXmlMode
  6.  
  7. class ubuntuXmlMode(docbookXmlMode):
  8.     '''Special-casing Ubuntu DocBook website documentation.'''
  9.     
  10.     def postProcessXmlTranslation(self, doc, language, translators):
  11.         '''Sets a language and translators in "doc" tree.'''
  12.         docbookXmlMode.postProcessXmlTranslation(self, doc, language, translators)
  13.         
  14.         try:
  15.             child = doc.docEntity('language')
  16.             newent = doc.addDocEntity('my_internal_hacky_language_entity_decl', libxml2.XML_INTERNAL_GENERAL_ENTITY, None, None, language)
  17.             newent.setName('language')
  18.             child.replaceNode(newent)
  19.         except:
  20.             newent = doc.addDocEntity('language', libxml2.XML_INTERNAL_GENERAL_ENTITY, None, None, language)
  21.  
  22.  
  23.  
  24.