Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions | Private Attributes
gettext.NullTranslations Class Reference
Inheritance diagram for gettext.NullTranslations:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def add_fallback
def gettext
def lgettext
def ngettext
def lngettext
def info
def charset
def output_charset
def set_output_charset
def install

Private Member Functions

def _parse

Private Attributes

 _info
 _charset
 _output_charset
 _fallback

Detailed Description

Definition at line 153 of file gettext.py.


Constructor & Destructor Documentation

def gettext.NullTranslations.__init__ (   self,
  fp = None 
)

Definition at line 154 of file gettext.py.

00154 
00155     def __init__(self, fp=None):
00156         self._info = {}
00157         self._charset = None
00158         self._output_charset = None
00159         self._fallback = None
00160         if fp is not None:
00161             self._parse(fp)

Here is the caller graph for this function:


Member Function Documentation

def gettext.NullTranslations._parse (   self,
  fp 
) [private]

Reimplemented in gettext.GNUTranslations.

Definition at line 162 of file gettext.py.

00162 
00163     def _parse(self, fp):
00164         pass

def gettext.NullTranslations.add_fallback (   self,
  fallback 
)

Definition at line 165 of file gettext.py.

00165 
00166     def add_fallback(self, fallback):
00167         if self._fallback:
00168             self._fallback.add_fallback(fallback)
00169         else:
00170             self._fallback = fallback

Definition at line 200 of file gettext.py.

00200 
00201     def charset(self):
00202         return self._charset

def gettext.NullTranslations.gettext (   self,
  message 
)

Reimplemented in gettext.GNUTranslations.

Definition at line 171 of file gettext.py.

00171 
00172     def gettext(self, message):
00173         if self._fallback:
00174             return self._fallback.gettext(message)
00175         return message

Here is the caller graph for this function:

Definition at line 197 of file gettext.py.

00197 
00198     def info(self):
00199         return self._info

Here is the caller graph for this function:

def gettext.NullTranslations.install (   self,
  names = None 
)

Definition at line 209 of file gettext.py.

00209 
00210     def install(self, names=None):
00211         import builtins
00212         builtins.__dict__['_'] = self.gettext
00213         if hasattr(names, "__contains__"):
00214             if "gettext" in names:
00215                 builtins.__dict__['gettext'] = builtins.__dict__['_']
00216             if "ngettext" in names:
00217                 builtins.__dict__['ngettext'] = self.ngettext
00218             if "lgettext" in names:
00219                 builtins.__dict__['lgettext'] = self.lgettext
00220             if "lngettext" in names:
00221                 builtins.__dict__['lngettext'] = self.lngettext
00222 

Here is the call graph for this function:

def gettext.NullTranslations.lgettext (   self,
  message 
)

Reimplemented in gettext.GNUTranslations.

Definition at line 176 of file gettext.py.

00176 
00177     def lgettext(self, message):
00178         if self._fallback:
00179             return self._fallback.lgettext(message)
00180         return message

Here is the caller graph for this function:

def gettext.NullTranslations.lngettext (   self,
  msgid1,
  msgid2,
  n 
)

Reimplemented in gettext.GNUTranslations.

Definition at line 189 of file gettext.py.

00189 
00190     def lngettext(self, msgid1, msgid2, n):
00191         if self._fallback:
00192             return self._fallback.lngettext(msgid1, msgid2, n)
00193         if n == 1:
00194             return msgid1
00195         else:
00196             return msgid2

Here is the caller graph for this function:

def gettext.NullTranslations.ngettext (   self,
  msgid1,
  msgid2,
  n 
)

Reimplemented in gettext.GNUTranslations.

Definition at line 181 of file gettext.py.

00181 
00182     def ngettext(self, msgid1, msgid2, n):
00183         if self._fallback:
00184             return self._fallback.ngettext(msgid1, msgid2, n)
00185         if n == 1:
00186             return msgid1
00187         else:
00188             return msgid2

Here is the caller graph for this function:

Definition at line 203 of file gettext.py.

00203 
00204     def output_charset(self):
00205         return self._output_charset

def gettext.NullTranslations.set_output_charset (   self,
  charset 
)

Definition at line 206 of file gettext.py.

00206 
00207     def set_output_charset(self, charset):
00208         self._output_charset = charset


Member Data Documentation

Reimplemented in gettext.GNUTranslations.

Definition at line 156 of file gettext.py.

Definition at line 158 of file gettext.py.

Definition at line 155 of file gettext.py.

Definition at line 157 of file gettext.py.


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