Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
PlacelessTranslationService.lazycatalog.LazyGettextMessageCatalog Class Reference
Inheritance diagram for PlacelessTranslationService.lazycatalog.LazyGettextMessageCatalog:
Inheritance graph
[legend]
Collaboration diagram for PlacelessTranslationService.lazycatalog.LazyGettextMessageCatalog:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getMessage
def queryMessage

Public Attributes

 language
 domain

Private Member Functions

def _check_reload

Private Attributes

 _path_to_file
 _catalog

Detailed Description

A gettext message catalog which doesn't parse the files until they
   are accessed first.

Definition at line 5 of file lazycatalog.py.


Constructor & Destructor Documentation

def PlacelessTranslationService.lazycatalog.LazyGettextMessageCatalog.__init__ (   self,
  language,
  domain,
  path_to_file 
)
Initialize the message catalog

Definition at line 10 of file lazycatalog.py.

00010 
00011     def __init__(self, language, domain, path_to_file):
00012         """Initialize the message catalog"""
00013         self.language = language
00014         self.domain = domain
00015         self._path_to_file = path_to_file
00016         self._catalog = None


Member Function Documentation

Definition at line 17 of file lazycatalog.py.

00017 
00018     def _check_reload(self):
00019         if self._catalog is None:
00020             self.reload()
00021             self._catalog.add_fallback(_KeyErrorRaisingFallback())

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 22 of file lazycatalog.py.

00022 
00023     def getMessage(self, id):
00024         'See IMessageCatalog'
00025         self._check_reload()
00026         return self._catalog.ugettext(id)

Here is the call graph for this function:

Definition at line 27 of file lazycatalog.py.

00027 
00028     def queryMessage(self, id, default=None):
00029         'See IMessageCatalog'
00030         self._check_reload()
00031         try:
00032             return self._catalog.ugettext(id)
00033         except KeyError:
00034             return default

Here is the call graph for this function:


Member Data Documentation

Definition at line 15 of file lazycatalog.py.

Definition at line 14 of file lazycatalog.py.

Definition at line 13 of file lazycatalog.py.

Definition at line 12 of file lazycatalog.py.


The documentation for this class was generated from the following file: