/usr/lib/python2.6/site-packages/oslo_i18n
Edit: /usr/lib/python2.6/site-packages/oslo_i18n/_factory.pyc (7293B)
Ñò
yDVc @ s† d Z d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l Z d g Z e i Z d e
f d „ ƒ YZ d S( s Translation function factory
iÿÿÿÿN( t _lazy( t _locale( t _messaget TranslatorFactoryc B s° e Z d Z d
d „ Z d
d „ Z d
d „ Z d
d „ Z e d „ ƒ Z e d „ ƒ Z
e d „ ƒ Z d „ Z e d „ ƒ Z
e d
„ ƒ Z e d „ ƒ Z e d „ ƒ Z RS( s Create translator functionsc C sH | | _ | d j o% t i | ƒ } t i i | ƒ } n | | _ d S( s Establish a set of translation functions for the domain.
:param domain: Name of translation domain,
specifying a message catalog.
:type domain: str
:param localedir: Directory with translation catalogs.
:type localedir: str
N( t domaint NoneR t get_locale_dir_variable_namet ost environt gett localedir( t selfR R
t
variable_name( ( s5 /tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt __init__( s
c sk ˆ d j o
| i ‰ n t i ˆ d | i d t ƒ} t i o
| i n | i ‰ ‡ ‡ f d † } | S( s¤ Return a translation function ready for use with messages.
The returned function takes a single value, the unicode string
to be translated. The return type varies depending on whether
lazy translation is being done. When lazy translation is
enabled, :class:`Message` objects are returned instead of
regular :class:`unicode` strings.
The domain argument can be specified to override the default
from the factory, but the localedir from the factory is always
used because we assume the log-level translation catalogs are
installed in the same directory as the main application
catalog.
R
t fallbackc s( t i o t i | d ˆ ƒSˆ | ƒ S( s, oslo_i18n.gettextutils translation function.R ( R t USE_LAZYR t Message( t msg( R t m( s5 /tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt fP s
N( R R t gettextt translationR
t Truet sixt PY3t ugettext( R R t tR ( ( R R s5 /tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt _make_translation_func7 s
c sk ˆ d j o
| i ‰ n t i ˆ d | i d t ƒ} t i o
| i n | i ‰ ‡ ‡ f d † } | S( sš Return a translation function ready for use with context messages.
The returned function takes two values, the context of
the unicode string, the unicode string to be translated.
The returned type is the same as
:method:`TranslatorFactory._make_translation_func`.
The domain argument is the same as
:method:`TranslatorFactory._make_translation_func`.
R
R c se t i o&