Package translate :: Package convert :: Module po2dtd
[hide private]
[frames] | no frames]

Module po2dtd

source code

script that converts a .po file to a UTF-8 encoded .dtd file as used by mozilla either done using a template or just using the .po file

Classes [hide private]
  redtd
this is a convertor class that creates a new dtd based on a template using translations in a po
  po2dtd
this is a convertor class that creates a new dtd file based on a po file without a template
Functions [hide private]
 
getlabel(unquotedstr)
retrieve the label from a mixed label+accesskey entity
source code
 
getaccesskey(unquotedstr)
retrieve the access key from a mixed label+accesskey entity
source code
 
removeinvalidamps(entity, unquotedstr)
find ampersands that aren't part of an entity definition...
source code
 
getmixedentities(entities)
returns a list of mixed .label and .accesskey entities from a list of entities
source code
 
applytranslation(entity, dtdunit, inputunit, mixedentities)
applies the translation for entity in the po unit to the dtd unit
source code
 
convertdtd(inputfile, outputfile, templatefile, includefuzzy=False) source code
 
main(argv=None) source code
Variables [hide private]
  labelsuffixes = ('.label', '.title')
  accesskeysuffixes = ('.accesskey', '.accessKey', '.akey')