Package moul :: Package file :: Module localization :: Class LocDirParser
[hide private]
[frames] | no frames]

Class LocDirParser



object --+
         |
        LocDirParser

Parse translation LOC files

Nested Classes [hide private]
  contentHandler
Content handler for Myst Online Uru Live locatization

Instance Methods [hide private]
  __init__(self, srcdir, registry=translationRegistry, clear=False)
Constructor
  exists(self)
Test if directory exists
list parseLoc(self, fd, fname='')
Parse a loc file
  findLocs(self)
Find loc files in the directory
  parseLocDir(self)
Parse all loc files at once
  __len__(self)
len() support
  __iter__(self)
Iterator support for GUI progress bar

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, srcdir, registry=translationRegistry, clear=False)
(Constructor)

 
Constructor
Parameters:
  • srcdir (string) - directory containing loc files to parse
  • registry (TranslationRegistry) - a translation registry instance
  • clear (bool) - clear the registry before parsing files?
Overrides: object.__init__

exists(self)

 
Test if directory exists

parseLoc(self, fd, fname='')

 
Parse a loc file
Parameters:
  • fd (file descriptor) - file to handler
  • fname (str) - file name
Returns: list
a list of translations

findLocs(self)

 
Find loc files in the directory

parseLocDir(self)

 
Parse all loc files at once

__len__(self)
(Length operator)

 
len() support

__iter__(self)

 
Iterator support for GUI progress bar