/usr/lib/python2.6/site-packages/oslo_i18n
NameSizeModeActions
locale/-0755rm
tests/-0755rm
fixture.py56740644editdlrm
fixture.pyc73980644editdlrm
log.py35420644editdlrm
log.pyc28730644editdlrm
_factory.py70460644editdlrm
_factory.pyc72930644editdlrm
_gettextutils.py29800644editdlrm
_gettextutils.pyc27820644editdlrm
_i18n.py9340644editdlrm
_i18n.pyc3690644editdlrm
_lazy.py12660644editdlrm
_lazy.pyc8570644editdlrm
_locale.py9350644editdlrm
_locale.pyc5580644editdlrm
_message.py92600644editdlrm
_message.pyc67620644editdlrm
_translate.py28710644editdlrm
_translate.pyc25540644editdlrm
__init__.py6730644editdlrm
__init__.pyc2580644editdlrm
Edit: /usr/lib/python2.6/site-packages/oslo_i18n/_factory.pyc (7293B)
Ñò yDVc @s†dZddkZddkZddkZddklZddklZddklZdgZei Z de fd„ƒYZ dS(sTranslation function factory iÿÿÿÿN(t_lazy(t_locale(t_messagetTranslatorFactorycBs°eZdZd d„Zd d„Zd d„Zd d„Zed„ƒZ ed„ƒZ ed„ƒZ d„Z ed „ƒZ ed „ƒZed „ƒZed „ƒZRS(sCreate translator functionscCsH||_|djo%ti|ƒ}tii|ƒ}n||_dS(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(tdomaintNoneRtget_locale_dir_variable_nametostenvirontgett localedir(tselfRR t variable_name((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt__init__(s  cskˆdjo |i‰ntiˆd|idtƒ}tio |in|i‰‡‡fd†}|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 tfallbackcs(tioti|dˆƒSˆ|ƒS(s,oslo_i18n.gettextutils translation function.R(RtUSE_LAZYRtMessage(tmsg(Rtm(s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pytfPs N( RRtgettextt translationR tTruetsixtPY3tugettext(R RttR((RRs5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt_make_translation_func7s     cskˆdjo |i‰ntiˆd|idtƒ}tio |in|i‰‡‡fd†}|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 Rcsetio&||f}ti|dˆdtƒSd|t|f}ˆ|ƒ}t|jo|S|S(s9oslo.i18n.gettextutils translation with context function.Rthas_contextual_forms%s%s%s(RRRRRtCONTEXT_SEPARATOR(tctxRtmsgidtmsgctxts(RR(s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyRls    N( RRRRR RRRR(R RRR((RRs5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt!_make_contextual_translation_funcWs      cskˆdjo |i‰ntiˆd|idtƒ}tio |in|i ‰‡‡fd†}|S(sÎReturn a plural translation function ready for use with messages. The returned function takes three values, the single form of the unicode string, the plural form of the unicode string, the count of items 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 RcsCtio)|||f}ti|dˆdtƒSˆ|||ƒS(s3oslo.i18n.gettextutils plural translation function.Rthas_plural_form(RRRRR(t msgsinglet msgpluraltmsgcountR(RR(s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyR‘s  N( RRRRR RRRtngettextt ungettext(R RRR((RRs5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt_make_plural_translation_func{s     cCs |iƒS(s!The default translation function.(R(R ((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pytprimaryšscCs |iƒS(s¯The contextual translation function. The returned function takes two values, the context of the unicode string, the unicode string to be translated. (R"(R ((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pytcontextual_formŸscCs |iƒS(sàThe plural translation function. The returned function takes three values, the single form of the unicode string, the plural form of the unicode string, the count of items to be translated. (R)(R ((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt plural_form©s cCs|i|id|ƒS(Ns-log-(RR(R tlevel((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt_make_log_translation_func´scCs |idƒS(s"Translate info-level log messages.tinfo(R.(R ((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pytlog_info·scCs |idƒS(s%Translate warning-level log messages.twarning(R.(R ((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt log_warning¼scCs |idƒS(s#Translate error-level log messages.terror(R.(R ((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt log_errorÁscCs |idƒS(s&Translate critical-level log messages.tcritical(R.(R ((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyt log_criticalÆsN(t__name__t __module__t__doc__RR RR"R)tpropertyR*R+R,R.R0R2R4R6(((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyR%s  $   ( R9RRRt oslo_i18nRRRt__all__RtobjectR(((s5/tmp/pip-build-lt8jXN/oslo.i18n/oslo_i18n/_factory.pyts