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

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

src/e/r/erp5-HEAD/product/ERP5Type/TranslationProviderBase.py   erp5(Download)
from Acquisition import aq_base
from Products.ERP5Type.Globals import PersistentMapping, Persistent
from Products.ERP5Type.Accessor.Translation import \
  TRANSLATION_DOMAIN_CONTENT_TRANSLATION
 
  def getContentTranslationDomainPropertyNameList(self):
    return [x for x, y in self.getPropertyTranslationDomainDict().iteritems()
      if y.getDomainName() == TRANSLATION_DOMAIN_CONTENT_TRANSLATION]
 
  security.declareProtected(ManagePortal, 'setTranslationDomain')

src/e/r/erp5-HEAD/product/ERP5Type/Tool/PropertySheetTool.py   erp5(Download)
             for object_ in getToolByName(self, 'Localizer').objectValues()
             if object_.meta_type=='MessageCatalog']+
            [Translation.TRANSLATION_DOMAIN_CONTENT_TRANSLATION]
            )
 

src/e/r/erp5-HEAD/product/ERP5/tests/testContentTranslation.py   erp5(Download)
  def setUpOnce(self):
    # set up translation domain on Person type information.
    from Products.ERP5Type.Accessor.Translation import TRANSLATION_DOMAIN_CONTENT_TRANSLATION
    setTranslationDomain = self.portal.portal_types.Person.setTranslationDomain
    setTranslationDomain('first_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)
    setTranslationDomain('last_name', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)
    setTranslationDomain('title', TRANSLATION_DOMAIN_CONTENT_TRANSLATION)