Commit f2684ace authored by Julien Muchembled's avatar Julien Muchembled

style

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29243 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 320d9894
...@@ -48,9 +48,9 @@ class TranslationProviderBase: ...@@ -48,9 +48,9 @@ class TranslationProviderBase:
""" """
security = ClassSecurityInfo() security = ClassSecurityInfo()
_translation_form = DTMLFile( 'editToolsTranslation', _dtmldir )
_translation_form = DTMLFile('editToolsTranslation', _dtmldir)
manage_options = ( { 'label' : 'Translation' manage_options = ( { 'label' : 'Translation'
, 'action' : 'manage_editTranslationForm' , 'action' : 'manage_editTranslationForm'
...@@ -58,8 +58,8 @@ class TranslationProviderBase: ...@@ -58,8 +58,8 @@ class TranslationProviderBase:
, ,
) )
security.declarePrivate( 'updateInitialPropertyTranslationDomainDict' ) security.declarePrivate('updateInitialPropertyTranslationDomainDict')
def updateInitialPropertyTranslationDomainDict(self, ): def updateInitialPropertyTranslationDomainDict(self):
""" """
Create the initial list of association between property and domain name Create the initial list of association between property and domain name
""" """
...@@ -128,8 +128,8 @@ class TranslationProviderBase: ...@@ -128,8 +128,8 @@ class TranslationProviderBase:
# #
# ZMI methods # ZMI methods
# #
security.declareProtected( ManagePortal, 'manage_editTranslationForm' ) security.declareProtected(ManagePortal, 'manage_editTranslationForm')
def manage_editTranslationForm( self, REQUEST, manage_tabs_message=None ): def manage_editTranslationForm(self, REQUEST, manage_tabs_message=None):
""" Show the 'Translation' management tab. """ Show the 'Translation' management tab.
""" """
translation_list = [] translation_list = []
...@@ -146,7 +146,7 @@ class TranslationProviderBase: ...@@ -146,7 +146,7 @@ class TranslationProviderBase:
# get list of Localizer catalog, add 'empty' one for no traduction # get list of Localizer catalog, add 'empty' one for no traduction
catalog = self.getPortalObject().Localizer.objectIds() + [''] catalog = self.getPortalObject().Localizer.objectIds() + ['']
return self._translation_form( self return self._translation_form( self
, REQUEST , REQUEST
, translations = translation_list , translations = translation_list
...@@ -154,16 +154,16 @@ class TranslationProviderBase: ...@@ -154,16 +154,16 @@ class TranslationProviderBase:
, management_view='Translation' , management_view='Translation'
, manage_tabs_message=manage_tabs_message , manage_tabs_message=manage_tabs_message
) )
security.declareProtected( ManagePortal, 'changeTranslations' )
def changeTranslations( self, properties=None, REQUEST=None ): security.declareProtected(ManagePortal, 'changeTranslations')
def changeTranslations(self, properties=None, REQUEST=None):
""" """
Update our list of translations domain name Update our list of translations domain name
""" """
if properties is None: if properties is None:
properties = REQUEST properties = REQUEST
property_domain_dict = self.getPropertyTranslationDomainDict() property_domain_dict = self.getPropertyTranslationDomainDict()
for prop_name in property_domain_dict.keys(): for prop_name in property_domain_dict.keys():
new_domain_name = properties.get(prop_name) new_domain_name = properties.get(prop_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment