diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-04-19 08:58:54 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-04-19 08:58:54 +0000 |
| commit | cdae91d72b7bfa5edb26e12e721891a3ce2f2aa7 (patch) | |
| tree | 5345a838f8f1aa868f8dc1d819ba1d034f9375c3 /repoze/bfg/interfaces.py | |
| parent | f5c6c574ada26ec0b2766f5ca20bb2b5b7393ec5 (diff) | |
| download | pyramid-cdae91d72b7bfa5edb26e12e721891a3ce2f2aa7.tar.gz pyramid-cdae91d72b7bfa5edb26e12e721891a3ce2f2aa7.tar.bz2 pyramid-cdae91d72b7bfa5edb26e12e721891a3ce2f2aa7.zip | |
Pass along translate function to templates.
Diffstat (limited to 'repoze/bfg/interfaces.py')
| -rw-r--r-- | repoze/bfg/interfaces.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 92003a9f9..f09ad7e36 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -232,10 +232,16 @@ VH_ROOT_KEY = 'HTTP_X_VHM_ROOT' class ITranslatorFactory(Interface): """ Internal interface representing an i18n translator factory """ - def __call__(self, request): + def __call__(request): """ Return a translator """ class ITranslator(Interface): - def __call__(self, tstr): + def __call__(tstr): """ Return a translation based on the translation string tstr """ - + +class IChameleonTranslate(Interface): + """ Internal interface representing a chameleon translate function """ + def __call__(msgid, domain=None, mapping=None, context=None, + target_language=None, default=None): + """ Translate a mess of arguments to a Unicode object """ + |
