Package flumotion :: Package common :: Module messages :: Class Translator
[show private | hide private]
[frames | no frames]

Class Translator

Loggable --+
           |
          Translator


I translate translatables and messages. I need to be told where locale directories can be found for all domains I need to translate for.
Method Summary
  __init__(self)
  addLocaleDir(self, domain, dir)
Add a locale directory for the given text domain.
  translate(self, message, lang)
Translate a message, in the given language.
  translateTranslatable(self, translatable, lang)
Translate a translatable object, in the given language.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Loggable
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

addLocaleDir(self, domain, dir)

Add a locale directory for the given text domain.

translate(self, message, lang=None)

Translate a message, in the given language.

translateTranslatable(self, translatable, lang=None)

Translate a translatable object, in the given language.
Parameters:
lang - language code (or the current locale if None)

Class Variable Details

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'translator'                                                           

Generated by Epydoc 2.1 on Sat Apr 14 13:16:51 2007 http://epydoc.sf.net