;ς α˜@c@sdZdklZlZlZdklZdklZdk l Z l Z dk l Z e ƒyeWnej odZdZnXdfd „ƒYZeeƒd efd „ƒYZeeƒd efd „ƒYZeeƒdfd„ƒYZeeƒdS(sΟMessage IDs. Message Id factor based on the i18n/messageid file of Zope 3. Adapted for the Placeless Translation Service by Christian Heimes $Id: MessageID.py,v 1.6 2004/05/04 21:56:03 dreamcatcher Exp $ (sBuiltinFunctionTypes UnicodeTypes StringType(sInitializeClass(sClassSecurityInfo(s translates utranslate(sapplyRequestPatchiis MessageIDBasecBsMtZdZeƒZeeed„Zd„Zd„Zd„Z d„Z RS(s*Message ID. This is a string used as a message ID. It has a domain attribute that is its source domain, and a default attribute that is its default text to display when there is no translation. domain may be None meaning there is no translation domain. default may also be None, in which case the message id itself implicitly serves as the default text. MessageID objects also have a mapping attribute which must be set after construction of the object. This is used when translating and substituting variables. cCsN||_||_|tjo|i|_n ||_||_h|_dS(N(sustrsselfsdomainsdefaultsNonesdefault_encodingsmapping(sselfsustrsdomainsdefaultsdefault_encoding((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__init__7s     cCsdS(N((sself((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys translateAscCsdS(N((sself((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__str__DscCs|iƒSdS(N(sselfs translate(sself((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__call__GscCsKt|ƒ|tƒ}|ot|ƒtjo|Sntd|ƒ‚dS(s0try to emulate class MessageID(unicode) s!'MessageId' has no attribute '%s'N(sgetattrsselfsfuncsNonesattrstypesBuiltinFunctionTypesAttributeError(sselfsfuncsattr((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__getattr__XXXJs ( s__name__s __module__s__doc__sClassSecurityInfossecuritysNones__init__s translates__str__s__call__s_MessageIDBase__getattr__XXX(((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys MessageIDBase(s     s MessageIDcBs6tZdZeƒZeidƒd„Zd„ZRS(snon unicode MessageID s translatec Cs/td|id|id|id|iƒSdS(s!translate the message id sdomainsmsgidsmappingsdefaultN(s translatesselfsdomainsustrsmappingsdefault(sself((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys translate[s    cCs|iƒSdS(N(sselfs translate(sself((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__str__ds(s__name__s __module__s__doc__sClassSecurityInfossecuritys declarePublics translates__str__(((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys MessageIDUs    sMessageIDUnicodecBsHtZdZeƒZeeed„Zeidƒd„Zd„Z RS(sunicode MessageID cCsΈti|||||ƒ|ot|ƒtj ot ||ƒ}n t |ƒ}||_|t jo ||_n@|ot|ƒtj ot ||ƒ|_nt |ƒ|_dS(N( s MessageIDBases__init__sselfsustrsdomainsdefaultsdefault_encodingstypes UnicodeTypesunicodesNone(sselfsustrsdomainsdefaultsdefault_encoding((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__init__os    s translatec Cs/td|id|id|id|iƒSdS(s!translate the message id sdomainsmsgidsmappingsdefaultN(s utranslatesselfsdomainsustrsmappingsdefault(sself((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys translates    cCs|iƒSdS(N(sselfs translate(sself((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__str__ˆs( s__name__s __module__s__doc__sClassSecurityInfossecuritysNones__init__s declarePublics translates__str__(((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pysMessageIDUnicodejs    sMessageIDFactorycBs2tZdZeƒZeed„Zed„ZRS(s$Factory for creating MessageIDs cCs||_||_||_dS(N(sdomainsselfs_domains as_unicodes _as_unicodesdefault_encodings_default_encoding(sselfsdomains as_unicodesdefault_encoding((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__init__“s  cCsV|io&t|d|id|d|iƒSn#t|d|id|d|iƒSdS(s}used for _() ustr - the message id default - the default string if the message id isn't the default sdomainsdefaultsdefault_encodingN(sselfs _as_unicodesMessageIDUnicodesustrs_domainsdefaults_default_encodings MessageID(sselfsustrsdefault((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys__call__˜s ( s__name__s __module__s__doc__sClassSecurityInfossecuritysFalsesNones__init__s__call__(((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pysMessageIDFactoryŽs  N(s__doc__stypessBuiltinFunctionTypes UnicodeTypes StringTypesGlobalssInitializeClasss AccessControlsClassSecurityInfos$Products.PlacelessTranslationServices translates utranslates PatchStringIOsapplyRequestPatchsTrues NameErrorsFalses MessageIDBases MessageIDsMessageIDUnicodesMessageIDFactory(s StringTypes MessageIDBasesFalsesClassSecurityInfosMessageIDUnicodesInitializeClasssBuiltinFunctionTypes UnicodeTypesMessageIDFactorys MessageIDsapplyRequestPatchs translatesTrues utranslate((se/mnt/gmirror/ports/www/zope-placelesstranslationservice/work/PlacelessTranslationService/MessageID.pys?s&    *  !