Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(95)  |  Call(78)  |  Derive(4)  |  Import(13)
Class for proxy objects that delegate to a specified function to evaluate
the actual object.

>>> def greeting(name='world'):
...     return 'Hello, %s!' % name
>>> lazy_greeting = LazyProxy(greeting, name='Joe')
>>> print lazy_greeting
Hello, Joe!
>>> u'  ' + lazy_greeting
u'  Hello, Joe!'(more...)

src/w/e/webapp2_example-HEAD/lib/webapp2_extras/i18n.py   webapp2_example(Download)
        the string.
    """
    return support.LazyProxy(gettext, string, **variables)
 
 

src/c/s/css_crawler-0.0.5/css_crawler/lib/i18n.py   css_crawler(Download)
import gettext
from babel.support import Translations, LazyProxy
 
from nagare.namespaces.xml import _Tag, add_child
import peak.rules
def lazy_ugettext(msg):
    return LazyProxy(ugettext, msg)
 
 
def ungettext(singular, plural, count):
def lazy_ungettext(singular, plural, count):
    return LazyProxy(ungettext, singular, plural, count)
 
 
# Add LazyProxy into render

src/i/n/inyoka-legacy-HEAD/inyoka/i18n/__init__.py   inyoka-legacy(Download)
from weakref import WeakKeyDictionary
from babel import Locale, UnknownLocaleError
from babel.support import Translations as TranslationsBase, LazyProxy
from inyoka.context import ctx
from inyoka.signals import signals
def lazy_gettext(string):
    """A lazy version of :func:`gettext`."""
    return LazyProxy(gettext, string)
 
 
def lazy_ngettext(singular, plural, n):
    """A lazy version of :func:`ngettext`."""
    return LazyProxy(ngettext, singular, plural, n)

src/k/a/KalaPy-0.4.2/kalapy/i18n/utils.py   KalaPy(Download)
from pytz import timezone, UTC
from babel import Locale
from babel.support import LazyProxy, Translations
 
from kalapy.conf import settings
    def lazy(s, **kw):
        return get_translations().ugettext(s) % kw
    return LazyProxy(lazy, string, **kwargs)
 
 
        kw.setdefault('num', n)
        return get_translations().ungettext(s, p, n) % kw
    return LazyProxy(lazy, string, plural, num, **kwargs)
 

src/k/a/kalapy-HEAD/kalapy/i18n/utils.py   kalapy(Download)
from pytz import timezone, UTC
from babel import Locale
from babel.support import LazyProxy, Translations
 
from kalapy.conf import settings
    def lazy(s, **kw):
        return get_translations().ugettext(s) % kw
    return LazyProxy(lazy, string, **kwargs)
 
 
        kw.setdefault('num', n)
        return get_translations().ungettext(s, p, n) % kw
    return LazyProxy(lazy, string, plural, num, **kwargs)
 

src/t/i/tipfy.ext.i18n-0.8/tipfy/ext/i18n.py   tipfy.ext.i18n(Download)
        the string.
    """
    return support.LazyProxy(gettext, string, **variables)
 
 
        the string.
    """
    return support.LazyProxy(ngettext, singular, plural, n, **variables)
 
 

src/t/i/tipfy-1.0b3/tipfy/i18n.py   tipfy(Download)
        the string.
    """
    return support.LazyProxy(gettext, string, **variables)
 
 
        the string.
    """
    return support.LazyProxy(ngettext, singular, plural, n, **variables)
 
 

src/t/i/tipfy-dev-1.8/tipfy/i18n.py   tipfy-dev(Download)
        the string.
    """
    return support.LazyProxy(gettext, string, **variables)
 
 
        the string.
    """
    return support.LazyProxy(ngettext, singular, plural, n, **variables)
 
 

src/t/i/tipfy-HEAD/tipfy/i18n.py   tipfy(Download)
        the string.
    """
    return support.LazyProxy(gettext, string, **variables)
 
 
        the string.
    """
    return support.LazyProxy(ngettext, singular, plural, n, **variables)
 
 

src/b/l/bloodhound-HEAD/trac/trac/util/translation.py   bloodhound(Download)
try:
    from babel import Locale
    from babel.support import LazyProxy, Translations
 
    class TranslationsProxy(object):
        def gettext(self, string, **kwargs):
            def _gettext():
                return safefmt(self.active.ugettext(string), kwargs)
            if not self.isactive:
                return LazyProxy(_gettext)
        def dgettext(self, domain, string, **kwargs):
            def _dgettext():
                return safefmt(self.active.dugettext(domain, string), kwargs)
            if not self.isactive:
                return LazyProxy(_dgettext)
                return safefmt(trans, kwargs)
            if not self.isactive:
                return LazyProxy(_ngettext)
            return _ngettext()
 
                return safefmt(trans, kwargs)
            if not self.isactive:
                return LazyProxy(_dngettext)
            return _dngettext()
 

  1 | 2 | 3 | 4  Next